1 / 27

Mid Term review

Mid Term review. CSC345. What is an Operating System? Various systems and their pros and cons E.g. multi-tasking vs. Batch OS definitions Resource allocator Control program Kernel. Abstract View of System Components. Important OS Features/services. Process Management (CPU scheduling)

wood
Download Presentation

Mid Term review

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. Mid Term review CSC345

  2. What is an Operating System? • Various systems and their pros and cons • E.g. multi-tasking vs. Batch • OS definitions • Resource allocator • Control program • Kernel

  3. Abstract View of System Components

  4. Important OS Features/services • Process Management (CPU scheduling) • Main Memory Management • File Management • I/O System Management • Secondary Management • Networking • Protection System • Command-Interpreter System

  5. Memory Tables Process Image Memory I/O Tables User data User program System stack PCB I/O File File Tables Processes Primary Table Process 1 Process 2 … Process N OS Control Structure

  6. New Ready Running Exit Suspend Blocked Process State Diagram dispatch admit time-out release activate event wait suspend

  7. System call vs. System program

  8. Chapter 2: Computer-System Structures • Computer System Operation • I/O Structure • Storage Structure • Storage Hierarchy • Hardware Protection • General System Architecture

  9. Two I/O Methods Synchronous Asynchronous

  10. Dual mode operation & why ?

  11. Use of A System Call to Perform I/O

  12. Use of A Base and Limit Register

  13. Hardware Address Protection

  14. OS structure & Layered Approach • The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface. • With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers.

  15. UNIX System Structure

  16. Process Management • Process vs. Thread creation • Process scheduling • Process Termination • Unix process creation fork() & exec() • Identify parent vs. child • How to find out process infomation

  17. Process Control Block (PCB)

  18. Process vs. Thread creation

  19. Multithreading Models • Many-to-One • One-to-One • Many-to-Many ---------------------------------------------- • Pthread, JAVA thread, Kernel vs. User thread

  20. CPU Switch From Process to Process

  21. Process Scheduling Queues • Job queue – set of all processes in the system. • Ready queue – set of all processes residing in main memory, ready and waiting to execute. • Device queues – set of processes waiting for an I/O device. • Process migration between the various queues.

  22. Representation of Process Scheduling

  23. Schedulers • Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue. • Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU. • Midterm scheduler

  24. Addition of Medium Term Scheduling

  25. Context Switch • When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process. • Context-switch time is overhead; the system does no useful work while switching. • Time dependent on hardware support.

  26. User program & Kernel interface Note: This picture is excerpted from Write a Linux Hardware Device Driver, Andrew O’Shauqhnessy, Unix world

  27. Two I/O Methods Synchronous Asynchronous Pooling or interrupt

More Related