General Flashcards
What are the roles of the OS?
- Provide an environment in which we can run programs
*I/O operations, file system access, accounting, shared
libraries, communication between processes - Allocate and manage scarce resources
- Memory, CPU, network activity
- Control processes
- Process creation, execution, protection, error/conflict
detection and response, security
How does the OS remain in control?
Interrupts that return control of the CPU to the OS.
Synchronous VS. Asynchronous
Synchronous:
Executing program needs to be aware of event as it happens
Asynchronous:
The event happens independently of the executing program and the program can deal with it later
Event detection by:
- Polling
- Interrupts
Polling:
- The program continually asks the device/system about whether or not a particular event has happened
-Integrated into the normal flow of the program
Interrupts:
-The entity that is causing the event notifies the program (via the OS) when the event happens.
-Program flow is diverted to deal with the event as it happens.
modeled as an exception to the normal flow of the program.