1 / 38

Chapter 2 Operating System Overview

Operating Systems: Internals and Design Principles, 6/E William Stallings. Chapter 2 Operating System Overview. Operating System. A program that controls the execution of application programs An interface between applications and hardware. Evolution of Operating Systems. Serial processing

deo
Download Presentation

Chapter 2 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 Systems:Internals and Design Principles, 6/EWilliam Stallings Chapter 2Operating System Overview

  2. Operating System • A program that controls the execution of application programs • An interface between applications and hardware

  3. Evolution of Operating Systems • Serial processing • No operating system • Machines run from a console with display lights, toggle switches, input device, and printer

  4. Evolution of Operating Systems • Serial processing • Setup included loading the compiler, source program, saving compiled program, and loading and linking: mounting/dismounting tapes or setting up card decks • Schedule time • Problems with this type of machine sharing?

  5. Evolution of Operating Systems • Simple batch system • Monitor • Software that controls the sequence of events • Batch jobs together • Program returns control to monitor when finished

  6. Job Control Language • Special type of programming language • Provides instruction to the monitor • What compiler to use • What data to use

  7. Hardware Features • Memory protection • Do not allow the memory area containing the monitor to be altered • Timer • Prevents a job from monopolizing the system

  8. Hardware Features • Privileged instructions • Certain machine level instructions can only be executed by the monitor • Interrupts • Early computer models did not have this capability • User mode vs. Kernel mode?

  9. Memory Protection • User program executes in user mode • Certain instructions may not be executed • Certain memory areas are protected from user’s use and may not be accessed

  10. Memory Protection • Monitor executes in system mode • Kernel mode • Privileged instructions are executed • Protected areas of memory may be accessed

  11. Limitations? • Simple batch system • Monitor • Software that controls the sequence of events • Batch jobs together • Program returns control to monitor when finished • What are the limitations?

  12. System Utilization Example

  13. Uniprogramming • Processor must wait for (blocked) I/O instruction to complete before preceding

  14. Program Flow of Control

  15. Program Flow of Control

  16. Multiprogramming • When one job needs to wait for I/O, the processor can switch to the other job

  17. Multiprogramming

  18. Example

  19. Utilization Histograms

  20. Time Sharing Systems • Using multiprogramming to handle multiple interactivejobs • Processor’s time is shared among multiple users • Multiple users simultaneously access the system through terminals • How would Time Sharing Systems differ from Batch Multiprogramming Systems?

  21. Batch Multiprogramming versus Time Sharing • How would you schedule the following jobs: J1(0, 100), J2(1, 10), J3(2, 3), J4(3, 5), J5(4, 2) • in a batch system • in a time-sharing system

  22. CTSS Operation

  23. OS Design Challenges • Time sharing and multiprogramming lead to challenges in • Process management (multiple programs time share the system, mutual exclusion, synchronization, resource contention etc) • Memory management (OS, multiple programs are in the memory) • Scheduling of processor(s) and I/O device

  24. Operating System Objectives • Convenience • Efficiency • Ability to evolve

  25. Four Interfaces • Figure 3-6. Various interfaces offered by computer systems.

  26. Four Interfaces (1) • An interface between the hardware and software consisting of machine instructions • that can be invoked by any program

  27. Four Interfaces (2) • An interface between the hardware and software, consisting of machine instructions • that can be invoked only by privileged programs, such as an operating system

  28. Four Interfaces (3) • An interface consisting of system calls as offered by an operating system

  29. Four Interfaces (4) • An interface consisting of library calls • Generally forming what is known as an application programming interface (API) • In many cases, the aforementioned system calls are hidden by an API

  30. Layers and Views

  31. Services Provided by the OS • Program development • Editors and debuggers • e.g., emacs, vi, gdb • Program execution • Load instructions & data, control scheduling • Access I/O devices • Hide the peculiar I/O instructions or control signals required for each device, access it by simple read and write function calls

  32. Services Provided by the OS • Controlled access to files • Control who can access which files • System access • Protect resources and data from unauthorized users • Resolve conflicts for resource contention

  33. Services Provided by the OS • Error detection and response • Internal and external hardware errors • Software errors • Operating system cannot grant request of application

  34. Services Provided by the OS • Accounting • Collect usage statistics • Monitor performance • Used to anticipate future enhancements • Used for billing purposes

  35. Operating System • Responsible for managing resources • Memory, processor, I/O devices • Functions same way as ordinary computer software • It is a program that is executed • Operating system relinquishes control of the processor, but directs the processor so that the processor will allow it to regain control

  36. OS as Resource Manager

  37. Kernel • Portion of operating system that is in main memory • Contains most frequently used functions • Also called the nucleus

  38. Evolution of Operating Systems • Hardware upgrades plus new types of hardware (for instance, paging hardware)/ New services / Fixes

More Related