Beruflich Dokumente
Kultur Dokumente
Operating System
• Operating system primarily is a resource manager
– Resources
• Hardware
– Processors
– Memory
– Input/output devices
– Communication devices
• Software applications
– MS Word
– Internet Explorer
– Windows Live Messenger
– Real Player
Operating System
Operating System
Computer System Architecture
Operating System Components and
Services
• User Mode
• Kernel Mode
Operating System Architecture
• Monolithic
• Layered
• Microkernel
• Hybrid
Monolithic Architecture
• Monolithic operating system
– Every component contained in kernel
• Any component can directly communicate with any
other
– Tend to be highly efficient
– Disadvantage is difficulty determining source of
subtle errors
Monolithic Architecture
Layered Architecture
• Layered approach to operating systems
– Tries to improve on monolithic kernel designs
• Groups components that perform similar functions into
layers
– Each layer communicates only with layers immediately above
and below it
– Processes’ requests might pass through many layers before
completion
– System throughput can be less than monolithic
kernels
• Additional methods must be invoked to pass data and
control
Layered Architecture
Microkernel Architecture
• Microkernel operating system architecture
– Provides only small number of services
• Attempt to keep kernel small and scalable
– High degree of modularity
• Extensible, portable and scalable
– Increased level of intermodule communication
• Can degrade system performance
Microkernel Architecture
Memory Management
Processor Management
Virtual Computers
Virtual Computers
OS Types
• Server operating systems
– Offer services like print, file, or web
– UNIX, Windows 2000, Linux
• Multiprocessor operating systems
– Parallel computing
• Personal computer operating systems
– Single user with a good GUI, such as Windows 98, Windows 2000, Macintosh
OS, Linux
• Real-time operating systems
– E.g. industrial process control systems where each job must be completed in
the specified time.
– Hard real-time (nuclear reactor control systems) or soft-real time systems (e.g
multimedia systems) depending on the acceptance of missing deadlines
• Embedded operating systems:
– Real-time systems with some resource constraints like memory, CPU, power.
• Distributed operating systems:
– Systems distributed over the networks
Distributed Operating systems
OS History
• First generation 1945 - 1955
– Technology: vacuum tubes & plugboards
– Programming: setting some switches
– Programming language: machine language
– Tasks: tables of sine, cosine, logarithms
– OS: none
• Second generation 1955 – 1965
– Technology: Transistors
– Programming: Punched cards
– Programming languages: FORTRAN & Assembly
– Tasks: Scientific
– Computer: Mainframes
– OS: Batch system
OS History
• Third generation 1965 – 1980
– Technology: Integrated circuits
– Programming: Punched cards
– Programming languages: FORTRAN & Assembly
– Tasks: Scientific & commercial
– Computers: IBM 360, DEC PDPs
– OS: Multiprogramming/timesharing, spooling
• OSes Developed:
– MULTICS (father of all modern OSes)
– UNIX (System V, BSD)
– POSIX (by IEEE)
– MINIX (by Tanenbaum)
OS History
• Fourth generation 1980-Present
– Technology: VLSI
– Programming: High level
– Programming languages: C/C++, Java, ……
– Computer: PC
– OS: Windows, MacOS, Linux ……
Normal Flow of Execution
(Control Flow)
Interrupted flow of execution
Flow of execution with I/O
Interrupted flow of execution with I/O
System Calls
• A special machine instruction
– that causes an interrupt
– various names: syscall, trap
• Usually not generated by HLLs
– but in assembly language functions
Interrupt Vs. System Call
• Interrupts • System call
– Hardware origin – Software origin
– Asynchronous – Synchronous
– Hardware Signals – OS Services
– Signal_Complete() – Read()
– Harddisk read complete
System Call Interface
• The system call interface is the description of the
set of system calls supported by the OS.
• The OS interface is pretty much defined by the
system call interface.
• Typical types of system calls
– Process control
– File management
– Device management
– Information management
– Communication management
System Call Interface
System Call Interface
Application Program Interface
• A set of routines
– Programmers use routines to request services
from the operating system
– Programs call API functions, which may access the
OS by making system calls
– Examples of APIs include:
• Portable Operating System Interface (POSIX) standard
• Windows API
Application Program Interface
Example of Standard API
• Consider the ReadFile() function in the Win32 API—a function for reading from a file