CompSci - Operating Systems Flashcards
(22 cards)
OS Types
Batch
Single-User
Multi-User
Multi-Tasking
Multi-Programming
OS Types - Batch
Executes several tasks simultaneously without user interaction
Used for data processing like billing
OS Types - Single-User
Operated by one user at a time
The user interacts with a personal computer.
OS Types - Multi-User
Operated by several users at a time
Used for DBMSs and cloud platforms
OS Types - Multi-Tasking
Can quickly switch between processing several tasks, giving the illusion of parallelism
Used for personal computing
OS Types - Multi-Programming
Allows to load several programs into memory at once, optimising CPU utilisation during it.
Used for personal computing.
Causes of Interrupts
Hardware interrupts
Software interrupts
Timer interrupts
User interrupts
Software Interrupts
Triggered by important software instructions or errors
Hardware Interrupts
Triggered by I/O signals or component failure
Timer Interrupts
Triggered at regular intervals for multitasking
User Interrupts
User input
Interrupts
Signals that signify that immediate attention is required for something. Anything being currently processed is temporarily paused.
Interrupt Handling
OS suspends the current interrupt handling routine
Current CPU state is saved in memory
OS initiates the higher priority interrupt handling routine
Once it’s finished, the OS reloads the CPU state and it resumes its previous function.
Interrupt Priorities
Since multiple interrupts can occur at once, the OS needs to be able to decide which to deal with first.
High / Imminent component failure
Medium / Timer interrupt
Low / I/O signals
Factors In Allocating Priorities To Interrupts
Urgency
Stability Significance
Frequency of Occurence
Resource Dependence
Purpose of Memory Partitioning
Dividing RAM into blocks of memory so that several programs can be loaded and run simultaneously.
Multi-programming support
Efficient memory use
Isolation
Consequences of Memory Partitioning
pretty much the same as fixed and variable fields
Fixed Partitioning:
Redundant space
Easy to process
Variable Partitioning:
Complex to process
No redundant space
Methods of Data Transfer
CPU is responsible for moving data, constantly checks if the device is ready
The device sends interrupts as “handshakes” to signify that data was sent
A dedicated controller moves the data
Buffers
Temporary memory areas to hold data in peripheral devices while it is being transferred between devices to account for difference in speed of the devices.
Single Buffering / One memory area is used
Double Buffering / Two memory areas are used, so that one can be filled while the other emptied.
Double buffers increases active time of the device, optimise CPU usage and lower time delay for interrupt handling.
Resource Priority Management
Processor allocation - Manages which tasks can be processed in a queue
Hardware allocation - Manages access to hardware resources like memory
Prevents overload
Maintains system responsiveness
Balances tasks for maximum optimisation
States of A Process
Running - Being executed
Ready - Waiting for CPU allocation
Blocked - Waiting for an event to occur
CPU Process Management
Time-Slicing - CPU time is divided into units that is distributed among processes
Polling - CPU costantly checks a device to see if it’s ready
Threading - CPU processes several tasks within one process, paralellism