260 likes | 324 Views
Chapitre 1.2. Systèmes d’exploitation. Layered Operating System model. Operating. Application. Hardware. System. Absolute Binary Loader. Central Memory. s3,t4. s3,t4. ABL. Command Interpreter. Central Memory. chess. s3,t4. Fmgr. Cmnd.Int. ABL. Interactive usage.
E N D
Chapitre 1.2 Systèmes d’exploitation
Layered Operating System model Operating Application Hardware System
Absolute Binary Loader Central Memory s3,t4 s3,t4 ABL
Command Interpreter Central Memory chess s3,t4 Fmgr. Cmnd.Int. ABL
Organizes data on disk Hides the details of physical files Offers standardized file organizations Sequential Random Access Indexed Sequential Maintains File Directories File Manager
Random Access Files • Space inefficient • Fast access
Sequential Files • Space efficient • Slow access
Indexed Sequential Files • Good compromise: • Space efficient • Access reasonably fast
chess Cmnd.Int. Fmgr. ABL Command Interpreter
Control by Command Interpreter Cmnd Interpreter Program X Start User Pgm Return to CMND.INT
Interrupts Interrupt Handler
DDA = 1 2 3 4 5 6 7 8 9 p1 #0 ND P2 COPY p2 #0 SC P3 COPY * 0 # p10 SC #10 SC P11 MUL p11 ADD SC KDA SC P12 p12 #0 KFL P13 COPY p13 ND #1 ND P14 ADD p3 ND #3 P3 P4 NE? p4 SC #321 P1 P5 NE? p5 #1 DDA P1 COPY Data Memory ND = SC = Arithmetic Unit KFL = KDA = Control Unit Interrupt Program Memory Interrupt handler p14 RTI
Interrupt Handler Interrupt Handler Program X Start User Pgm Find cause int. Control Unit Return to int.handlr
Interrupt Handler Based System Command interpreter User program Interrupt handler File manager A.B.L.
Single-task Systems task completed active I/O completion activation start I/O Blocked (= busy waiting) load waiting for cpu
Multi-task Systems task completed active preemption start I/O activation load waiting for cpu I/O completion (interrupt) blocked swap out
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 ? Multitasking Issues
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 SchedulerAll programs have a priority and the one waiting with the highest priority becomes active.
Process Priorities active -1 +1 p = p0 waiting for cpu blocked +1
Manual selection (starting an application under Windows) Automatic selection based on priorities Based on the Round Robin algorithm Job SchedulerSelects the programs to be loaded in Central Memory
Preempted tasks after t seconds Input queue Completed tasks Central memory New tasks Round Robin
Allocates memory to each program Static Allocation Good Job Scheduling mandatory. Dynamic Allocation: Virtual Memory Job Scheduling not so important. Memory Management
Virtual Memory Page Table 1 cm 004 2 pm 1003 3 pm 1004 4 pm 1007 5 cm 002 6 pm 1009 CM PM
Program A Program B Program C Program D Output Spooling