1 / 15

Concepts and Structures

Concepts and Structures. Main difficulties with OS design. synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion must permit only one program at a time to perform a transaction on a portion of data deadlock

leigh
Download Presentation

Concepts and Structures

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. Concepts and Structures

  2. Main difficulties with OS design • synchronization • ensure a program waiting for an I/O device receives the signal • mutual exclusion • must permit only one program at a time to perform a transaction on a portion of data • deadlock • It might happen that 2 or more pgms wait endlessly after each other to perform an operation.

  3. Major OS Concepts • Processes • Memory management • Information protection and security • Scheduling and resource management • System structure

  4. Process • Introduced to obtain a systematic way of monitoring and controlling pgm execution • A process is a program in execution with: • program text • associated data (variables, buffers…) • execution context: i.e. all the information thatthe CPU needs to execute the process, • content of the processor registers • the OS needs to manage the process:priority of the process • the event (if any) after which the process is waiting • other data (that we will introduce later)

  5. Multithreading • A process is a collection of one or more threads that can run simultaneously • All threads within the same process share the same data and resources and a part of the process’s execution context • It is easier to create or destroy a thread or switch among threads (of the same process) than to do these with processes

  6. File System • Implements long-term store (often on disk) • root, file-hierarchy, working directory, access permissions • special files -- block and character specials (abstraction of devices) • standard in/out/err • Use of a VFS (virtual File System) for portability and extensibility

  7. Virtual Memory • It allows programs to address memory from a logical point of view without regard to the amount that is physically available • While a program is running only a portion of the program and data is kept in (real) memory Other portions are kept in blocks on disk • The user has access to a memory space that is larger than real memory • All memory references made by a program are to virtual memory which can be either • a linear address space • a collection of segments (variable-length blocks) • The hardware (mapper) must map virtual memory address to real memory address • If a reference is made to a virtual address not in memory, then the desired block of data is swapped in

  8. Scheduling • Differential responsiveness • discriminate between different classes of jobs • Fairness • give equal and fair access to all processes of the same class • Efficiency • maximize throughput, minimize response time, and accommodate as many users as possible

  9. System Calls • interface between operating system and user programs • allow creation, usage & destruction of software objects like processes, files, memory, ... • process related: fork(), exec(), ... • memory related: • file related: • I/O related:

  10. Command line interpreter • issue a prompt, get the command, parse it, and execute it. • I/O redirections • Pipes • Job control -- foreground/background

  11. Operating System Structure Monolithic operating systems • Because of it’s enormous complexity, we view the OS system as a series of levels • Each level performs a related subset of functions • Each level relies on the next lower level to perform more primitive functions • Well defined interfaces: one level can be modified without affecting other levels • This decomposes a problem into a number of more manageable sub problems

  12. Layered systems -- THE, Multics. • Technische Hogeschool Eidenhoven (THE o.s.) the first layered operating system (has six layers) • processor allocation & multiprogramming • memory & drum management • operator-process communication • input/output management • user programs • operator • Multics operating system employs layers of rings

  13. Virtual machines -- VM/370 • Virtual machine monitor runs on the bare hardware and does the multiprogramming providing several virtual machines, all copies of the bare machine. • Modern incarnations of this concept includes emulations of hardware platforms.

  14. Client-Server -- NextStep, NT

  15. Microkernel architecture • Only a few essential functions in the kernel • primitive memory management (address space) • Interprocess communication (IPC) • basic scheduling • Other OS services are provided by processes running in user mode (servers) • device drivers, file system, virtual memory… • More flexibility, extensibility, portability… • A performance penalty by replacing service calls with message exchanges between process...

More Related