OS Chapter 4
OS Chapter 4
Operation of an OS:
Boot procedure: When A COmputer is switched on, the boot procedure AnAlyzes its
confifigurAtion— CPU type, memory size, I/O devices, And detAils of other hArdwAre
connected to the computer (see Section 1.3). It then loAds A pArt of the OS in
memory, initiAlizes its dAtA structures with this informAtion, And hAnds over control
of the computer system to it.
System cAlls leAd to softwAre interrupts
I/O operAton or end of time slice leAds to hArdwAre interrupts
Diagram of OS Operation
Causes CPU to go to ISR
The interrupt servicing routine performs a context save action to save information about the interrupted program and activates an event handler
NOTE
P2 Scheduler
CPUswitching occurs
twiceduring processingof
the an
P3
perform event handling and then to the process selected by the scheduler.
P4
P1
The scheduler then selects a process and switches the CPU to it.
Structure of an OS:
Policy: A policy is the guiding principle under which the operAting system
will perform the function.
MechAnism: A mechAnism is A specifific ACtion needed to implement A policy.
A policy decides whAt should be done, while A mechAnism determines how
something should be done And ACtuAlly does it.
period of time. The sole OS lAyer hAd An interfACe with the bAre mAChine. Hence
Architecture-dependent code wAs spreAd throughout the OS, And so there wAs
poor portAbility. It Also mAde testing And debugging diffificult, leAding to high
costs of mAintenAnce And enhAncement. These problems led to the seArch for
AlternAtive wAys to structure An OS
LAYERED STRUCTURE
virtuAl mAChine into the interfACes And resources of the host mAChine. Full virtu
AlizAtion would imply thAt the host mAChine And A VirtuAl mAChine hAVe identicAl
cApAbilities, hence An OS cAn operAte identicAlly while running on A bAre mAChine
And on A VirtuAl mAChine supported by A VM OS.
PArAVirtuAlizAtion
replACes A nonvirtuAlizAble instruction, i.e., An instruction thAt cAnnot be mAde
AVAilAble in A VM, by eAsily virtuAlized instructions.