comsci Flashcards
define interrupts
-CPU is fast, IO device and other services are slow
-CPU doesnt stop and wait
-When IO services are finished use interrupt to get CPUS attention
How is the modern OS interrupt Driven?
-With the interrupt vector.
-With the interrupt handler
- with soft interrupts like; traps and system calls
Why cant user interact with HW directly?
because of Mode bit and system calls
What is Mode bit?
-motivation
-user operation and kernel operation seperate but difficult to distinguish user or kernel
-Hardware support for system protection
-1 kernel operation
-0 user operation
What is a system call?
Interface between user and kernel
- All IO, Hardware, System calls are handled by the kernel
-Users must make systems calls to access any system resources
What is the 5 process transition diagram?
- transition from waiting-> running, possible?
- transition from running -> waiting?
-transition from running -> ready?
What are the two types of concurrency?
-interloped which involves time shearing
-parallel which involves multiple CPUs
What is the PCB? WHere is it located?
Process control block located in the kernel
What does the PCB contain/handle?
-process ID
-Register values
-scheduling related info
-page table
-opened file info
What are the two types of scheduling?
Preemptive and non-preemptive
What is preemptive scheduling?
A process can be paused by the scheduler at any time during its execution
What is non-preemptive scheduling?
- The process itself decides to give up the CPU when its computations are in a
stable state - Scheduler doesn’t stop/pause process
What is the duty of the dispatcher?
switch between 2 user processes
What are the 5 scheduling algorithms?
FCFS, SJF, SRFJ, RR, Priority
What is race condition?
Race condition happens when two or more processes access and manipulate the same data concurrently and the outcome depends on the order of access (this is not desirable)