2.3.4. Computer System Structures - Process Protection.pptx

Download Report

Transcript 2.3.4. Computer System Structures - Process Protection.pptx

Computer System Structures
System Operation
Protecting Processes from each other
Instruction protection
Address space protection
Interrupt protection
Textbook Silberschatz, Chapter 2
Process Protection
 Goal: Run multiple applications in such a way that they are
protected from one another
 Keep User Programs from Crashing OS
 Keep User Programs from Crashing each other
 Keep Parts of OS from crashing other parts.
 Some of the required mechanisms:
 Dual Mode Operation - provides Instruction protection
 Address Translation
- provides Address space
protection
 Interrupt Protection
- protects interrupts from other
interrupts
Instruction protection
 Dual mode provides protection for instructions
distinguishing instructions for User and Kernel
modes.
Address Space, Address Translation
CPU
Virtual
Addresses
MMU
Physical
Addresses
 Address Space
 A group of memory addresses used by something
(process, module,…)
 Each program (process) and kernel has potentially
different address spaces.
 Address Translation:
 Translate from Virtual Addresses (emitted by CPU) into
Physical Addresses (of memory)
 Mapping often performed in Hardware by Memory
Management Unit (MMU)
Address space protection
 Simple Policy:
 Programs are not allowed to read/write memory of other
Programs or of Operating System
The mechanism of the change of the mapping also should
be protected.
Interrupt protection
Mechanisms:
 Interrupt deferring
 interrupts levels
 interrupt masking
 interrupt disabling
 When the interrupt happens the hardware
Disables all other interrupts to protect this
interrupt from the new coming ones.
 RTI reenables interrupts on hardware level
(inside the instruction), returns to user
The mechanism of the interrupt mode
control also should be protected  if the interrupt is enabled in the handling
routine then the routine could be
(special instructions in kernel
interrupted.
mode).