By Mohamed Gamal
Lecture 1: Introduction
Operating System
Reference
ABOUTTHE BOOK
Computer Operating System Concepts
• Author: Abraham Silberschatz, Peter
B. Galvin, Greg Gagne
• Publisher: Wiley
• Edition: 9th
• ISBN 13: 978-1-118-652794
Syllabus
Overview
Introduction
Computer System Structure
Operating System Structure
Computer
System Structure
Computer Operations
I/O Stricture
Storage Structure
Deep Dive into
the Operating
System
OS Structure
OS Services & System Calls
Processes & Threads
Deadlocks
Numbering System
The topics of today’s lecture:
Agenda
- The computer is an electronic machine that performs the
following five basic operations:
• Input
• Process
• Output
• Store
• Control
Basic Computer Configuration
Input
Process
Output
Store
Control
What’s an operating system?
– A program that acts as an intermediary between a user of a computer
and the computer hardware.
– Operating System goals:
• Execute user programs
• Use the computer hardware in an efficient manner
• Make user’s life easier ;)
– Operating System examples:
• Windows
• Unix / Linux
• MacOS
What’s an operating system?
OSes User Interfaces
– Operating systems were first developed in the late 1950s to
manage tape storage.
– The General Motors Research Lab implemented the first OS in the
early 1950s for their IBM 701
– In the late 1960s, the first version of the Unix OS was developed
– The first OS built by Microsoft was DOS, built in 1981.
– The present-day popular OS Windows first came to existence in
1985 when a GUI was created and paired with MS-DOS.
History of Operating System
User
Application
Operating System
Hardware
Computer system components
1) Computer Hardware
CPU
Memory
I/O
Devices
2) Operating System
– OS controls and coordinates the use of hardware among various
application programs for users
▪ It manages and allocates the resources
▪ It controls execution of user programs and operations of I/O
devices
– OS is a Resource allocator and Control program
– Kernel — the one program running at all times
3) Application Programs
– Video Games
– Web browsers
– Spread sheets
– Word processors
– Compilers
– …
3) Application vs. System Programs
– System programs, also known as operating system utilities or
system utilities, are software programs that are shipped with
the OS and are an integral part of the operating system.
• Status Information
• File Modification
• Drivers
• …
4) Users
– People (e.g., normal users)
– Machines (e.g., servers, embedded systems … etc.)
– Other Computers (e.g., remote or networked devices … etc.)
Users Machines Other Computers
Mainframe Systems
– A very large powerful and expensive computer
capable of supporting hundreds, or even
thousands, of users simultaneously.
– Reduce setup time by batching similar jobs.
– Automatic job sequencing
• Automatically transfers control from one job to
another.
• First rudimentary operating system
Mainframe Systems (Cont.)
– Memory Layout for a simple batch system
Loader
Job Sequencing
Jobs
Memory
.bat files
Mainframe Systems (Cont.)
– Multi-programmed Batch Systems
• Several jobs are kept in main memory at the same time,
and the CPU is multiplexed among them
– OS features needed
• I/O routine supplied by the system
– Memory management
• The system must allocate the memory to several jobs
– CPU/Job scheduling
• The system must choose among several jobs ready to run
512M
Mainframe Systems (Cont.)
– Time-Sharing Systems (Interactive Computing)
• The CPU is multiplexed among several jobs that are kept in
memory and on disk
• The CPU is allocated to a job only if the job is in memory
• A job is swapped in and out of memory to the disk
• On-line/Interactive communication between the user and the
system is provided
› When the operating system finishes the execution of one
command, it seeks the next “control statement” from the user’s
keyboard
Desktop Systems (Microcomputer)
– Personal computers (PCs)
• Dedicated to a single user
– I/O devices
• Keyboards
• Mouse
• Display Monitors
• Printers
– User convenience and responsiveness
• May run several different types of operating systems
› E.g., Windows, MacOS, Linux
Parallel Systems
– Systems with more than one CPU in close communication
• Also known as multiprocessor/multicore systems
– Tightly coupled system
• processors share memory and a clock; communication usually takes
place through the shared memory
– Advantages of parallel system:
• Increased throughput
• Economical
• Increased reliability
• graceful degradation
Fetch → Decode → Execute → Store
Shared Memory
Distributed Systems
– Distribute the computation among several physical processors
– Loosely coupled system
• Each processor has its own local memory
• processors communicate with one another through various communications
lines, such as high-speed buses or telephone lines
– Advantages of distributed systems
• Resources Sharing
• Computation speed up
• Reliability
– Google, YouTube … etc.
Private Memory
Distributed Systems (Cont.)
– Requires networking infrastructure
– Local area networks (LAN) or Wide area networks (WAN)
– May be either client-server or peer-to-peer systems
Clustered Systems
– Each cluster is a collection of computing nodes controlled and accessed by a
single master node.
– Essentially a group of high-end systems connected through a LAN.
– Homogeneous, same OS, near-identical hardware.
– Advantages:
• Provides high reliability and performance.
• Cheaper to build a supercomputer by putting together many simple computers,
rather than buying a high-performance one.
Beowulf
clusters
Clustered Systems – Example
Grid Systems
– Lots of nodes from everywhere:
• Heterogeneous
• Dispersed across several organizations
• Can easily span a WAN
– Virtual organizations concept
• Google servers everywhere!
Cloud Systems
– Grid was a hit about 10 years ago!
– Grid is divided into
• Cloud computing
• Edge/Fog Computing
Cloud Systems (Cont.)
– Application (SaaS)
• MS Office Suite
– Platform (PaaS)
• MS Azure
– Infrastructure (IaaS)
• Amazon S3
– Hardware (IaaS)
• CPU, Memory, …
Virtualization
– Allows operating systems to run applications within other OSes.
Real-Time Operating Systems (reactive)
– Intended to serve real-time applications that process data as it comes in,
typically without buffer delays.
– Real time operating systems are generally special-purpose ones designed
to run embedded or specialized systems.
– Requirements
• Less processing time (i.e., speed)
• Significant constraints on hardware design
• Great accuracy
– Disadvantages
• Very Costly
• Large memory required
ATM (Embedded OS)
Handheld Systems
– Personal Digital Assistants (PDAs)
– Cellular telephones
– More OS features (e.g., GPS, gyroscope, …)
– Issues:
• Limited memory
• Slow processors
• Small display screens
• Battery bottleneck
– Popular Examples:
• Apple iOS
• Google Android
Migration of OS Concepts and Features
Command Line
Command Explanation
C: Change the current drive to the C: drive
CD <path> Change directory to a specified path
CD .. Navigate one step backward
CD directory_name
Navigate to the folder directory_name in the current working
directory
DIR List all files and folders in the current directory
TREE Show the folders in the current directory
TREE /f Show the folders and files in the current directory
MOVE <file1> <file2> Move a file or files
COPY <file> <directory> Copy a file to a directory
DEL <file> Delete a file
Command Line
Command Explanation
MD or MKDIR Create a new directory
RD or RMDIR Delete a directory
REN or RENAME Rename a file or directory
cls Clear the screen
echo. > filename.extension Create an empty file
echo content > filename.extension Create a file with some content inside it
copy con filename.extension Edit the file using the CMD itself
type filename.extension Show the contents of the file in the CMD
filename.extension Open and show the contents of the file
explorer . Open the current working directory
Command Line
Command Explanation
HELP <command> Display usage of a command
VER Display the current operating system version
SYSTEMINFO List system configuration
HOSTNAME Show the computer’s hostname on the network
DATE Display/set system date
IPCONFIG Display Windows IP network configurations
SHUTDOWN /R Restart the computer
SHUTDOWN /S /T 60 Shut down the computer 60 seconds from now
EXIT Exits and closes the command line
End of lecture 1
ThankYou!

Introduction to Operating System - Lecture 1

  • 1.
    By Mohamed Gamal Lecture1: Introduction Operating System
  • 2.
    Reference ABOUTTHE BOOK Computer OperatingSystem Concepts • Author: Abraham Silberschatz, Peter B. Galvin, Greg Gagne • Publisher: Wiley • Edition: 9th • ISBN 13: 978-1-118-652794
  • 3.
    Syllabus Overview Introduction Computer System Structure OperatingSystem Structure Computer System Structure Computer Operations I/O Stricture Storage Structure Deep Dive into the Operating System OS Structure OS Services & System Calls Processes & Threads Deadlocks Numbering System
  • 4.
    The topics oftoday’s lecture: Agenda
  • 5.
    - The computeris an electronic machine that performs the following five basic operations: • Input • Process • Output • Store • Control Basic Computer Configuration Input Process Output Store Control
  • 7.
  • 8.
    – A programthat acts as an intermediary between a user of a computer and the computer hardware. – Operating System goals: • Execute user programs • Use the computer hardware in an efficient manner • Make user’s life easier ;) – Operating System examples: • Windows • Unix / Linux • MacOS What’s an operating system?
  • 9.
  • 10.
    – Operating systemswere first developed in the late 1950s to manage tape storage. – The General Motors Research Lab implemented the first OS in the early 1950s for their IBM 701 – In the late 1960s, the first version of the Unix OS was developed – The first OS built by Microsoft was DOS, built in 1981. – The present-day popular OS Windows first came to existence in 1985 when a GUI was created and paired with MS-DOS. History of Operating System
  • 11.
  • 12.
  • 13.
    2) Operating System –OS controls and coordinates the use of hardware among various application programs for users ▪ It manages and allocates the resources ▪ It controls execution of user programs and operations of I/O devices – OS is a Resource allocator and Control program – Kernel — the one program running at all times
  • 14.
    3) Application Programs –Video Games – Web browsers – Spread sheets – Word processors – Compilers – …
  • 15.
    3) Application vs.System Programs – System programs, also known as operating system utilities or system utilities, are software programs that are shipped with the OS and are an integral part of the operating system. • Status Information • File Modification • Drivers • …
  • 16.
    4) Users – People(e.g., normal users) – Machines (e.g., servers, embedded systems … etc.) – Other Computers (e.g., remote or networked devices … etc.) Users Machines Other Computers
  • 18.
    Mainframe Systems – Avery large powerful and expensive computer capable of supporting hundreds, or even thousands, of users simultaneously. – Reduce setup time by batching similar jobs. – Automatic job sequencing • Automatically transfers control from one job to another. • First rudimentary operating system
  • 19.
    Mainframe Systems (Cont.) –Memory Layout for a simple batch system Loader Job Sequencing Jobs Memory .bat files
  • 20.
    Mainframe Systems (Cont.) –Multi-programmed Batch Systems • Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them – OS features needed • I/O routine supplied by the system – Memory management • The system must allocate the memory to several jobs – CPU/Job scheduling • The system must choose among several jobs ready to run 512M
  • 21.
    Mainframe Systems (Cont.) –Time-Sharing Systems (Interactive Computing) • The CPU is multiplexed among several jobs that are kept in memory and on disk • The CPU is allocated to a job only if the job is in memory • A job is swapped in and out of memory to the disk • On-line/Interactive communication between the user and the system is provided › When the operating system finishes the execution of one command, it seeks the next “control statement” from the user’s keyboard
  • 23.
    Desktop Systems (Microcomputer) –Personal computers (PCs) • Dedicated to a single user – I/O devices • Keyboards • Mouse • Display Monitors • Printers – User convenience and responsiveness • May run several different types of operating systems › E.g., Windows, MacOS, Linux
  • 25.
    Parallel Systems – Systemswith more than one CPU in close communication • Also known as multiprocessor/multicore systems – Tightly coupled system • processors share memory and a clock; communication usually takes place through the shared memory – Advantages of parallel system: • Increased throughput • Economical • Increased reliability • graceful degradation Fetch → Decode → Execute → Store Shared Memory
  • 27.
    Distributed Systems – Distributethe computation among several physical processors – Loosely coupled system • Each processor has its own local memory • processors communicate with one another through various communications lines, such as high-speed buses or telephone lines – Advantages of distributed systems • Resources Sharing • Computation speed up • Reliability – Google, YouTube … etc. Private Memory
  • 28.
    Distributed Systems (Cont.) –Requires networking infrastructure – Local area networks (LAN) or Wide area networks (WAN) – May be either client-server or peer-to-peer systems
  • 30.
    Clustered Systems – Eachcluster is a collection of computing nodes controlled and accessed by a single master node. – Essentially a group of high-end systems connected through a LAN. – Homogeneous, same OS, near-identical hardware. – Advantages: • Provides high reliability and performance. • Cheaper to build a supercomputer by putting together many simple computers, rather than buying a high-performance one. Beowulf clusters
  • 31.
  • 33.
    Grid Systems – Lotsof nodes from everywhere: • Heterogeneous • Dispersed across several organizations • Can easily span a WAN – Virtual organizations concept • Google servers everywhere!
  • 35.
    Cloud Systems – Gridwas a hit about 10 years ago! – Grid is divided into • Cloud computing • Edge/Fog Computing
  • 36.
    Cloud Systems (Cont.) –Application (SaaS) • MS Office Suite – Platform (PaaS) • MS Azure – Infrastructure (IaaS) • Amazon S3 – Hardware (IaaS) • CPU, Memory, …
  • 37.
    Virtualization – Allows operatingsystems to run applications within other OSes.
  • 39.
    Real-Time Operating Systems(reactive) – Intended to serve real-time applications that process data as it comes in, typically without buffer delays. – Real time operating systems are generally special-purpose ones designed to run embedded or specialized systems. – Requirements • Less processing time (i.e., speed) • Significant constraints on hardware design • Great accuracy – Disadvantages • Very Costly • Large memory required ATM (Embedded OS)
  • 41.
    Handheld Systems – PersonalDigital Assistants (PDAs) – Cellular telephones – More OS features (e.g., GPS, gyroscope, …) – Issues: • Limited memory • Slow processors • Small display screens • Battery bottleneck – Popular Examples: • Apple iOS • Google Android
  • 42.
    Migration of OSConcepts and Features
  • 44.
    Command Line Command Explanation C:Change the current drive to the C: drive CD <path> Change directory to a specified path CD .. Navigate one step backward CD directory_name Navigate to the folder directory_name in the current working directory DIR List all files and folders in the current directory TREE Show the folders in the current directory TREE /f Show the folders and files in the current directory MOVE <file1> <file2> Move a file or files COPY <file> <directory> Copy a file to a directory DEL <file> Delete a file
  • 45.
    Command Line Command Explanation MDor MKDIR Create a new directory RD or RMDIR Delete a directory REN or RENAME Rename a file or directory cls Clear the screen echo. > filename.extension Create an empty file echo content > filename.extension Create a file with some content inside it copy con filename.extension Edit the file using the CMD itself type filename.extension Show the contents of the file in the CMD filename.extension Open and show the contents of the file explorer . Open the current working directory
  • 46.
    Command Line Command Explanation HELP<command> Display usage of a command VER Display the current operating system version SYSTEMINFO List system configuration HOSTNAME Show the computer’s hostname on the network DATE Display/set system date IPCONFIG Display Windows IP network configurations SHUTDOWN /R Restart the computer SHUTDOWN /S /T 60 Shut down the computer 60 seconds from now EXIT Exits and closes the command line
  • 47.
    End of lecture1 ThankYou!