Presentation is loading. Please wait.

Presentation is loading. Please wait.

© D. J. Foreman, Structure of an O/S. © D. J. Foreman, Overview  Required functionality –Handle interrupts –Manage resources Processes.

Similar presentations


Presentation on theme: "© D. J. Foreman, Structure of an O/S. © D. J. Foreman, Overview  Required functionality –Handle interrupts –Manage resources Processes."— Presentation transcript:

1 © D. J. Foreman, 2008 1 Structure of an O/S

2 © D. J. Foreman, 2008 2 Overview  Required functionality –Handle interrupts –Manage resources Processes (users, programs) Devices (disks, terminals, CPU's) Storage (memory, pages, segments)  Optional functionality (may be built-in or add-on) –GUI –File system –Networking

3 © D. J. Foreman, 2008 3 Handling Interrupts -1  Assume user process running  Interrupt occurs (disk I/O completion, etc)  Hardware action (parallel) –Save Inst Ctr –Turn on privilege mode –Turn on memory access –Turn off interrupts –Load state vector for this kind of interrupt

4 © D. J. Foreman, 2008 4 Handling Interrupts -2  O/S actions –Save registers in reserved storage (no registers used for this operation) –Branch to handler for this kind of interrupt –Interrupt handler processes the interrupt Error handling Enabling user (may have been in wait state) –Handler returns to core of kernel –Process's state info saved in PCB –Core calls scheduler –Core calls dispatcher

5 © D. J. Foreman, 2008 5 Service call handler  Receives control from core of kernel  Table lookup of interrupt code  Calls function to handle specific code  Returns to core

6 © D. J. Foreman, 2008 6 Scheduler  Maintains list of all processes  Updates status of each process  Determines which processes can be run

7 © D. J. Foreman, 2008 7 Dispatcher  Uses results of scheduler  Selects a runnable process  Restores state of process  Loads state vector for NSI of process –Load Inst Ctr –Turn off privilege mode –Turn off memory access –Turn on interrupts

8 © D. J. Foreman, 2008 8 Installing an O/S on VM 'load myos (rldsave' 'gen myos' 'access 222 w' 'copyfile myos module a = = w (rep' 'salipl 222 (mo myos origin 1000 volid MYOS comments SAPL loaded'


Download ppt "© D. J. Foreman, Structure of an O/S. © D. J. Foreman, Overview  Required functionality –Handle interrupts –Manage resources Processes."

Similar presentations


Ads by Google