1 / 45

Operating System Overview

Operating System Overview. Today’s Objectives. 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:

Download Presentation

Operating System Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Operating System Overview

  2. Today’s Objectives • 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. Today’s Applications Application Software Browser Second Life Yahoo Chat Client Pop Mail Hardware Network

  4. Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Read/write Display Print Send/receive Hardware Network

  5. Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Display Read/write Print Store Read/write Display Print Send/receive Send/receive Hardware Network

  6. Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Print Display Read/write Store Print Send/receive Store Display Read/write Print Display Send/receive Send/receive Read/write Hardware Network

  7. Application Requirements Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Print Read/write Store Display Store Print Send/receive Store Send/receive Display Read/write Print Display Send/receive Send/receive Display Read/write Read/write Print Hardware Network

  8. Delegate Common Functions? Application Software Browser Second Life Yahoo Chat Client Pop Mail Store Print Read/write Store Display Store Print Send/receive Store Send/receive Display Read/write Print Display Send/receive Send/receive Display Read/write Read/write Print Hardware Network

  9. 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 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 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 Network Hardware

  12. 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 Network Hardware

  13. 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 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 Network Hardware

  15. 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 Network Hardware

  16. 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) • Written by programmer • Compiled by programmer • Uses function calls Libraries Portable OS Layer Machine-dependent layer

  18. Unix: Libraries Application • Provided pre-compiled • Defined in headers • Input to linker (compiler) • Invoked like functions • May be “resolved” when program is loaded Libraries (e.g., stdio.h) Portable OS Layer Machine-dependent layer

  19. Typical Unix OS Structure Application Libraries Portable OS Layer Machine-dependent layer • system calls (read, open..) • All “high-level” code

  20. 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? • 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 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 • Structure of a typical job – 2nd generation

  24. History of Operating Systems • Multiprogramming/timesharing system • three jobs in memory – 3rd generation

  25. History of Operating Systems • Multiprogramming/timesharing system • three jobs in memory – 3rd generation Memory Management Process Management

  26. History of Computer Generations • First generation 1945 – 1955 • vacuum tubes, plug boards • Second generation 1955 - 1965 • transistors, batch systems • Third generation 1965 – 1980 • ICs and multiprogramming • Fourth generation 1980 – present • personal computers

  27. Computer Hardware Review Components of a simple personal computer Bus

  28. Large Pentium system

  29. Computer Hardware Review Components of a simple personal computer CPU Bus

  30. CPU • Fetch instruction from code memory • Fetch operands from data memory • Perform operation (and store result) • Go to next instruction

  31. 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

  32. 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

  33. 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 • Why stack?

  34. Code Layout for Process • Processes have three segments: text, data, stack

  35. Code Layout for Process • Processes have three segments: text, data, stack Where is this stored?

  36. Computer Hardware Review Components of a simple personal computer CPU Memory Bus

  37. Memory Hierarchy • Typical memory hierarchy • numbers shown are rough approximations

  38. Computer Hardware Review Components of a simple personal computer CPU Memory I/O Devices Bus

  39. I/O Interrupt Mechanism • Steps in starting an I/O device and getting interrupt • How the CPU is interrupted (a) (b)

  40. Computer Hardware ReviewExample I/O Device: Disk Structure of a disk drive

  41. Operating System Review:Processes • A process tree • A created two child processes, B and C • B created three child processes, D, E, and F

  42. Context Switching • How would you switch CPU execution from one process to another?

  43. Semaphores • Control access to resources

  44. Shared Resources, Conflicts, and Deadlocks (a) A potential deadlock. (b) an actual deadlock.

  45. Inter-process Communication Two processes connected by a pipe

More Related