Presentation is loading. Please wait.

Presentation is loading. Please wait.

Operating System Overview

Similar presentations


Presentation on theme: "Operating System Overview"— Presentation transcript:

1 Operating System Overview
Tarek Abdelzaher Lawrence Angrave Vikram Adve Copyright ©: Nahrstedt, Angrave, Abdelzaher

2 Today’s Objectives By the end of the hour you should be able to:
Copyright ©: Nahrstedt, Angrave, Abdelzaher Today’s Objectives By the end of the hour you should be able to: Explain the main purpose of operating systems and describe milestones of OS evolution Explain fundamental machine concepts such as: Instruction processing, Memory hierarchy, Interrupts, and I/O Explain fundamental OS concepts such as: System calls, processes, synchronization, Files Explain the POSIX standard (UNIX specification)

3 Copyright ©: Nahrstedt, Angrave, Abdelzaher
Today’s Applications Application Software Browser Second Life Yahoo Chat Client Pop Mail Hardware Network

4 Application Requirements
Copyright ©: Nahrstedt, Angrave, Abdelzaher Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Read/write Display Print Send/receive Hardware Network

5 Application Requirements
Copyright ©: Nahrstedt, Angrave, Abdelzaher Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Read/write Display Print Store Read/write Display Print Send/receive Send/receive Hardware Network

6 Application Requirements
Copyright ©: Nahrstedt, Angrave, Abdelzaher Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Read/write Display Print Print Store Store Send/receive Read/write Display Print Display Send/receive Send/receive Read/write Hardware Network

7 Application Requirements
Copyright ©: Nahrstedt, Angrave, Abdelzaher Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Read/write Store Display Print Store Print Store Store Send/receive Send/receive Read/write Display Print Display Send/receive Send/receive Display Read/write Read/write Print Hardware Network

8 Delegate Common Functions?
Copyright ©: Nahrstedt, Angrave, Abdelzaher Delegate Common Functions? Application Software Browser Second Life Yahoo Chat Client Pop Mail Read/write Store Display Print Store Print Store Store Send/receive Send/receive Read/write Display Print Display Send/receive Send/receive Display Read/write Read/write Print Hardware Network

9 Delegate Common Functions to an Operating System
Copyright ©: Nahrstedt, Angrave, Abdelzaher Delegate Common Functions to an Operating System Application Software Web Server Second Life Yahoo Chat Pop Mail Operating System Read/Write Standard Output Device Control File System Communication Hardware Network

10 OS Exports a Virtual Machine Interface
Copyright ©: Nahrstedt, Angrave, Abdelzaher OS Exports a Virtual Machine Interface Application Software Web Server Second Life Yahoo Chat Pop Mail Standard Operating System Interface (Virtual Machine) Operating System Read/Write Standard Output Device Control File System Communication Hardware Network

11 Increase Portability = Minimize Machine-Specific Code
Copyright ©: Nahrstedt, Angrave, Abdelzaher Increase Portability = Minimize Machine-Specific Code Application Software Web Server Second Life Yahoo Chat Pop Mail Standard Operating System Interface (Virtual Machine) Operating System (machine independent part) Read/Write Standard Output Device Control File System Communication Machine specific part Hardware Network

12 Increase Portability = Minimize Machine-Specific Code
Copyright ©: Nahrstedt, Angrave, Abdelzaher Increase Portability = Minimize Machine-Specific Code Application Software Web Server Second Life Yahoo Chat Pop Mail Standard Operating System Interface (Virtual Machine) Operating System (machine independent part) Portable Read/Write Standard Output Device Control File System Communication Machine specific part Hardware Network

13 OS Runs on Multiple Platforms while Presenting same Interface
Copyright ©: Nahrstedt, Angrave, Abdelzaher OS Runs on Multiple Platforms while Presenting same Interface Application Software Web Server Second Life Yahoo Chat Pop Mail Standard Operating System Interface (Virtual Machine) Operating System (machine independent part) Portable Read/Write Standard Output Device Control File System Communication

14 OS Runs on Multiple Platforms while Presenting same Interface
Copyright ©: Nahrstedt, Angrave, Abdelzaher OS Runs on Multiple Platforms while Presenting same Interface Application Software Web Server Second Life Yahoo Chat Pop Mail Standard Operating System Interface (Virtual Machine) Operating System (machine independent part) Portable Read/Write Standard Output Device Control File System Communication Machine specific part Hardware Network

15 POSIX – The UNIX Interface Standard
Copyright ©: Nahrstedt, Angrave, Abdelzaher POSIX – The UNIX Interface Standard Application Software Web Server Second Life Yahoo Chat Pop Mail The POSIX Standard Specifies UNIX Interface Operating System (machine independent part) Portable Read/Write Standard Output Device Control File System Communication Machine specific part Hardware Network

16 A peek into Unix Application Libraries User space/level
Copyright ©: Nahrstedt, Angrave, Abdelzaher A peek into Unix Application Libraries User space/level Kernel space/level Portable OS Layer Machine-dependent layer User/kernel modes are supported by hardware Some systems do not have clear user-kernel boundary

17 Unix: Application Application (E.g., emacs) Libraries
Copyright ©: Nahrstedt, Angrave, Abdelzaher Unix: Application Application (E.g., emacs) Written by programmer Compiled by programmer Uses function calls Libraries Portable OS Layer Machine-dependent layer

18 Unix: Libraries Application Libraries (e.g., stdio.h)
Copyright ©: Nahrstedt, Angrave, Abdelzaher Unix: Libraries Application Provided pre-compiled Defined in headers Input to linker (compiler) Invoked like functions Libraries (e.g., stdio.h) Portable OS Layer Machine-dependent layer

19 Typical Unix OS Structure
Copyright ©: Nahrstedt, Angrave, Abdelzaher Typical Unix OS Structure Application Libraries Machine-dependent layer Portable OS Layer system calls (read, open..) All “high-level” code

20 Typical Unix OS Structure
Copyright ©: Nahrstedt, Angrave, Abdelzaher Typical Unix OS Structure Application Bootstrap System initialization Interrupt and exception I/O device driver Memory management Kernel/user mode switching Processor management Libraries Portable OS Layer Machine-dependent layer

21 Summary: What is an Operating System?
Copyright ©: Nahrstedt, Angrave, Abdelzaher Summary: What is an Operating System? It is an extended machine Hides the messy details which must be performed Presents user with a virtual machine, easier to use It is a resource manager Each program gets time with the resource Each program gets space on the resource

22 History of Operating Systems
Copyright ©: Nahrstedt, Angrave, Abdelzaher History of Operating Systems Early systems bring cards to 1401 read cards to tape put tape on 7094 which does computing put tape on 1401 which prints output Batch  Multiprogramming  Time sharing  Personal

23 History of Operating Systems
Copyright ©: Nahrstedt, Angrave, Abdelzaher History of Operating Systems Structure of a typical job – 2nd generation

24 History of Operating Systems
Copyright ©: Nahrstedt, Angrave, Abdelzaher History of Operating Systems Multiprogramming/timesharing system three jobs in memory – 3rd generation

25 History of Operating Systems
Copyright ©: Nahrstedt, Angrave, Abdelzaher History of Operating Systems Memory Management Process Management Multiprogramming/timesharing system three jobs in memory – 3rd generation

26 History of Computer Generations
Copyright ©: Nahrstedt, Angrave, Abdelzaher History of Computer Generations First generation 1945 – 1955 vacuum tubes, plug boards Second generation transistors, batch systems Third generation – 1980 ICs and multiprogramming Fourth generation 1980 – present personal computers

27 Computer Hardware Review
Copyright ©: Nahrstedt, Angrave, Abdelzaher Computer Hardware Review Bus Components of a simple personal computer

28 Computer Hardware Review
Copyright ©: Nahrstedt, Angrave, Abdelzaher Computer Hardware Review CPU Bus Components of a simple personal computer

29 Copyright ©: Nahrstedt, Angrave, Abdelzaher
CPU Fetch instruction from code memory Fetch operands from data memory Perform operation (and store result) Go to next instruction

30 Copyright ©: Nahrstedt, Angrave, Abdelzaher
CPU Registers Fetch instruction from code memory Fetch operands from data memory Perform operation (and store result) Go to next instruction Note: CPU must maintain certain state Current instructions to fetch (program counter) Location of code memory segment Location of data memory segment

31 Copyright ©: Nahrstedt, Angrave, Abdelzaher
CPU Register Examples Hold instruction operands Point to start of Code segment Data segment Stack segment Point to current position of Instruction pointer Stack pointer

32 Code Layout for Process
Copyright ©: Nahrstedt, Angrave, Abdelzaher Code Layout for Process Processes have three segments: text, data, stack

33 Copyright ©: Nahrstedt, Angrave, Abdelzaher
Memory Hierarchy Typical memory hierarchy numbers shown are rough approximations (old generation of computers)

34 Computer Hardware Review
Copyright ©: Nahrstedt, Angrave, Abdelzaher Computer Hardware Review CPU Memory Bus Components of a simple personal computer

35 Computer Hardware Review
Copyright ©: Nahrstedt, Angrave, Abdelzaher Computer Hardware Review CPU Memory I/O Devices Bus Components of a simple personal computer

36 Computer Hardware Review Example I/O Device: Disk
Copyright ©: Nahrstedt, Angrave, Abdelzaher Computer Hardware Review Example I/O Device: Disk Structure of a disk drive

37 Example of modern architecture
Copyright ©: Nahrstedt, Angrave, Abdelzaher Example of modern architecture Graphics Processor MPEG Comp. Digital Video Copper Fibre Channel Network Interface Fibre Channel Network Interface IEEE 1394 Discrete IO IO CPU+Multi- Level Cache PCI Bus 0a PCI Bus 1a Shared Memory Ethernet RS-485 PCI Bus 0b PCI Bus 1b System Controller Power PC 1000 MHz 64 Bit Wide Memory Bus 256 MB DDR SDRAM 125 MHz 64 Bit PCI-X 100 MHz 32 Bit PCI 66 MHz 33 MHz PCI to PCI Bridge PCI-X to PCI Bridge Port 1 Port 2 Inactive

38 Interrupts CPU hardware has the interrupt report line that the CPU senses after executing each instruction Why interrupts? Real life analogy for interrupts An alarm sets off when the food/laundry is ready You can do other things in between and handle the event once notified

39 Operating System Review: Processes
Copyright ©: Nahrstedt, Angrave, Abdelzaher Operating System Review: Processes A process tree A created two child processes, B and C B created three child processes, D, E, and F

40 Copyright ©: Nahrstedt, Angrave, Abdelzaher
Context Switching How would you switch CPU execution from one process to another?

41 Semaphores (synchronization)
Copyright ©: Nahrstedt, Angrave, Abdelzaher Semaphores (synchronization) Control access to shared resources (like shared data structures) Prevent race conditions, synchronize access to shared resources. Needed for concurrent programming (we will discuss a lot about this topic)

42 Copyright ©: Nahrstedt, Angrave, Abdelzaher
Why Synchronization? Processes and threads can be preempted at arbitrary times, which may generate problems. Example: What is the execution outcome of the following two threads (initially x=0)? Thread 1: Read X Add 1 Write X Thread 2: Read X Add 1 Write X 42

43 Copyright ©: Nahrstedt, Angrave, Abdelzaher
Why Synchronization? Example: What is the execution outcome of the following two threads (initially x=0)? Depending on the execution order of thread 1 and 2, the outcome can be x=1 or x=2. Thread 1: Read X Add 1 Write X Thread 2: Read X Add 1 Write X 43

44 Inter-process Communication
Copyright ©: Nahrstedt, Angrave, Abdelzaher Inter-process Communication Two processes connected by a pipe


Download ppt "Operating System Overview"

Similar presentations


Ads by Google