1 / 39

Principles of Operating Systems: Design & Applications

Principles of Operating Systems: Design & Applications. Chapter 1 Introduction to Operating Systems. Objectives. be able to discuss ways of defining the operating system understand the different roles the OS plays have a general picture of the areas of OS responsibility

vine
Download Presentation

Principles of Operating Systems: Design & Applications

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. Principles of Operating Systems: Design & Applications Chapter 1 Introduction to Operating Systems

  2. Objectives • be able to discuss ways of defining the operating system • understand the different roles the OS plays • have a general picture of the areas of OS responsibility • have a general understanding of the evolution of operating systems

  3. Objectives (cont.)‏ • understand some of the general trends in OS development • be able to describe the bootstrapping process • understand how system calls work

  4. What is an Operating System? • Everything in the distribution? • Just the kernel? • Our working definition: The kernel and any programs necessary to provide services to applications Principles of Operating Systems: Design & Applications 4

  5. What is an Operating System? • Manages the hardware resources among competing entities • Provides common services to applications • Interfaces applications to hardware Principles of Operating Systems: Design & Applications 5

  6. Resource Manager • Allocates scarce resources • Protects entities from interfering with each other • Protects itself and the overall system from both malicious and accidental damage • Programs run at the pleasure of the OS Principles of Operating Systems: Design & Applications 6

  7. Service Provider • Provides common functionality, simplifying applications • Provides standard interfaces, making applications more consistent Principles of Operating Systems: Design & Applications 7

  8. Virtual Machine • Defines a number of characteristics not found on the hardware • Presents a cleaner and easier “machine” for applications to run on • Hides the boundary between OS and hardware, allowing flexibility in hardware design while still running the same programs Principles of Operating Systems: Design & Applications 8

  9. Areas of OS Responsibility • Hardware • CPU • Memory • I/O Devices • File Systems • Security Principles of Operating Systems: Design & Applications 9

  10. Areas of OS Responsibility • Others not covered here • Networking • User Interfaces Principles of Operating Systems: Design & Applications 10

  11. Process Management • Manages CPU in terms of running programs, called processes • Schedules processes, picking the next one to get the CPU • Switches between processes, called context switching Principles of Operating Systems: Design & Applications 11

  12. Process-Related Services • Creating processes • Terminating processes • Changing process parameters (e.g. priority)‏ • Providing interprocess communication • Providing process synchronization Principles of Operating Systems: Design & Applications 12

  13. Memory Management • Assigns areas of memory belonging to processes to areas of physical memory • Manages requests that exceed available physical memory • Controls sharing of memory Principles of Operating Systems: Design & Applications 13

  14. Memory-Related Services • Direct allocation requests • Direct freeing of memory • Serving memory needs implicit in other services • Managing sharing of areas of memory Principles of Operating Systems: Design & Applications 14

  15. I/O Device Management • Provides common device interface tasks • Manages exclusive access • Hides device details Principles of Operating Systems: Design & Applications 15

  16. I/O-Related Services • Establish access to a device • Release a device • Read from a device • Write to a device • Grant exclusive access to a device • Provide special device operations Principles of Operating Systems: Design & Applications 16

  17. File System Management • Provides translation from names to resources • Manages persistent storage of data • Presents a device-independent interface • Protects resources from unauthorized access Principles of Operating Systems: Design & Applications 17

  18. File System-Related Services • Open a file • Close a file • Read from a file • Write to a file • Seek within a file • Query and modify file parameters Principles of Operating Systems: Design & Applications 18

  19. Security • Part of other management responsibilities • Authenticates the identity of a requester • Authorizes access according to a security policy Principles of Operating Systems: Design & Applications 19

  20. Networking • Implements protocol stacks • Provides services for: • Establishing connections to remote systems • Listening for connections from remote systems • Exchanging data with remote systems Principles of Operating Systems: Design & Applications 20

  21. Early OS History • No OS on earliest machines • Collections of useful routines: • First code reuse • Foreshadowed the service provider aspect of operating systems • Machines scheduled with sign-up sheets Principles of Operating Systems: Design & Applications 21

  22. Batch Operating Systems • Most CPU time wasted during time slots • Separate users from the CPU for more efficient CPU usage • Take programs, run them to completion, and produce results • Trade off efficient CPU usage for loss of user effectiveness • Potentially long time between submitting a job and getting results Principles of Operating Systems: Design & Applications 22

  23. Time-Sharing Operaing Systems • Shorter time slots mean more efficient CPU usage • Take short time slots to the limit • Rapidly switch among running programs and provide multiple user interfaces • Useful even with a single user Principles of Operating Systems: Design & Applications 23

  24. Distributed Operating Systems • After allowing multiple users and programs, multiple machines comes next • Manage multiple computing systems as a single pool of computing resources • Share file systems • Support multiple CPUs cooperating on a single task Principles of Operating Systems: Design & Applications 24

  25. Key Trends • Move away from one user, one program, one computer-break the triangle of “ones” • Make interfaces more uniform • Trade off CPU cycles for user convenience: • CPU time gets less expensive • Human time gets more expensive Principles of Operating Systems: Design & Applications 25

  26. The Triangle of Ones Principles of Operating Systems: Design & Applications 26

  27. Operating System Structure • Monolithic • Kernel structured as a single program • Usual design techniques • Often criticized Principles of Operating Systems: Design & Applications 27

  28. Operating System Structure (cont.)‏ • Layered Design • Dependency on only lower layers • Tricky to structure • Often requires splitting subsystems into multiple layers Principles of Operating Systems: Design & Applications 28

  29. Layered Design Example Principles of Operating Systems: Design & Applications 29

  30. Microkernels • Move much of the traditional kernel functionality into separate programs • Reduce the size of the kernel • Components communicate with messages passed through the microkernel Principles of Operating Systems: Design & Applications 30

  31. Microkernel Example Principles of Operating Systems: Design & Applications 31

  32. Virtual Machine OS • Virtualize the hardware • Create the illusion of multiple machines • Each guest believes it has the hardware to itself • Allows different OSs to run at the same time Principles of Operating Systems: Design & Applications 32

  33. Virtual Machine Example Principles of Operating Systems: Design & Applications 33

  34. Bootstrapping • Load the kernel into memory and transfer control to it • Loaders are like miniOSs • Understand enough memory management to put kernel into memory • Understand enough I/O and file systems to locate kernel and read it into memory Principles of Operating Systems: Design & Applications 34

  35. PC Bootstrapping Sequence • BIOS loads Master Boot Record (MBR) from first block on the disk • MBR load first block from active partition • Partition boot block: • Some load the kernel directly • Some load a secondary loader which loads the kernel Principles of Operating Systems: Design & Applications 35

  36. System Calls • Interface between apps and kernel • Looks like a function call in high-level languages • Usually implemented with a software interrupt • Processed in a higher-privilege processor mode Principles of Operating Systems: Design & Applications 36

  37. Summary • OS roles • Resource manager, service provider, virtual machine • OS responsibilities • CPU, memory, I/O devices, file systems, security, networking • Historical evolution • No OS→Batch→Time-sharing→Distributed • Increased concurrency at each step Principles of Operating Systems: Design & Applications 37

  38. Summary (cont.)‏ • OS organizations • Monolithic, layered, microkernel, virtual machine • Bootstrapping • OS-like loaders • Locate the kernel, load it, and run it • System Calls • Key to service provider role • Application/OS interface Principles of Operating Systems: Design & Applications 38

  39. Principles of Operating Systems: Design & Applications 39

More Related