Presentation on theme: "Chapter 1.2 Operating Systems. Layered Operating System model Hardware Operating System Application."— Presentation transcript:
Chapter 1.2 Operating Systems
Layered Operating System model Hardware Operating System Application
Absolute Binary Loader ABL Central Memory s3,t4
Command Interpreter ABL Central Memory chess s3,t4 Cmnd.Int. Fmgr.
File Manager Organizes data on disk Hides the details of physical files Offers standardized file organizations –Sequential –Random Access –Indexed Sequential Maintains File Directories
Random Access Files Space inefficient Fast access
Sequential Files Space efficient Slow access
Indexed Sequential Files Good compromise: Space efficient Access reasonably fast
Command Interpreter ABL chess Cmnd.Int. Fmgr.
Control by Command Interpreter Program X Return to CMND.INT Start User Pgm Cmnd Interpreter
Single-task Systems active waiting for cpu Blocked (= busy waiting) task completed start I/O activation load I/O completion
Interrupts Interrupt Handler
Program X Return to int.handlr Start User Pgm Interrupt Handler Find cause int. Control Unit
Interrupt Handler Based System Command interpreter User program File manager A.B.L. Interrupt handler
active waiting for cpu blocked task completed start I/O preemption activation load swap out I/O completion (interrupt) Multi-task Systems
Multitasking Issues Process Scheduling Which program becomes active when ? Job Scheduling (or Queue Management) Which programs reside in Central Memory ? Memory Management How much memory gets each program ? Output Spooling How to keep output of programs apart ?
Process Scheduler All programs have a priority and the one waiting with the highest priority becomes active. Non-preemptive Scheduling: Priorities are compared whenever the active program blocks itself a clock tick occurs (typically every 10 mS) Preemptive Scheduling Priorities are continuously compared.
Process Priorities active blocked +1 p = p 0 waiting for cpu +1
Job Scheduler Selects the programs to be loaded in Central Memory Manual selection (starting an application under Windows) Automatic selection –based on priorities –Based on the Round Robin algorithm
Round Robin Central memory Preempted tasks after t seconds New tasks Input queue Completed tasks
Memory Management Allocates memory to each program –Static Allocation Good Job Scheduling mandatory. –Dynamic Allocation: Virtual Memory Job Scheduling not so important.
Virtual Memory Page Table cm pm CMPM cm pm
Output Spooling Program AProgram BProgram CProgram D