1/14
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is an operating system?
A program or set of programs that manages the operations of the computer for the user. It acts like a bridge between the user and hardware.
What are the roles of the operating system?
Memory Management
Processor Scheduling
Backing Store Management
Management of all input and output
Hides the complexities of managing and communicating with its hardware from the user via an API
What is meant by memory management?
Allocation - assigning blocks of memory to programs when they are launched
Deallocation - freeing memory back when a program closes so it can be reused
Keeping track of which areas of memory are currently in use and which are free
Preventing conflict - ensuring programs cannot access or overwrite each other's memory space
Virtual memory - using secondary storage as an extension of RAM when physical memory is full, though this is slower
What does the operating system if RAM becomes full?
The OS moves data from inactive programs in RAM to an area of secondary storage called virtual memory
This process is called paging - data is moved in fixed-size chunks called pages
When the inactive program is needed again, its pages are swapped back into RAM
Performance consequence - secondary storage is much slower than RAM, so excessive use of virtual memory causes significant slowdown, known as thrashing
What is meant by processor scheduling?
The process of determining the order and duration for which processes are allocated CPU time
What are the goals of processor scheduling?
Maximise throughput - complete as many processes as possible in a given time
Fairness - ensure all processes and users receive appropriate CPU time
Minimise response time - particularly important for interactive systems
Maximise resource utilisation - keep hardware components as busy as possible
Prioritisation - allow higher priority processes to access the CPU first
What is meant by Backing Store Management?
The OS process of managing secondary/backing storage (e.g. hard drives, SSDs)
What are the responsibilities of Backing Store Management?
File management - creating, deleting, reading and writing files
Space allocation - keeping track of which areas of the disk are in use and which are free
Directories - organising files into a hierarchical folder structure so they can be located efficiently
File permissions - controlling which users or programs can read, write or execute files, particularly important in multi-user systems
Fragmentation management (HDDs Only) - over time files become fragmented across the disk, reducing read/write speed. The OS manages defragmentation to keep files contiguous
What is meant by Peripheral Management?
The OS managing communication between the CPU and peripheral devices.
What are the responsibilities of Peripheral Management?
Allocation - assigning peripherals to processes without causing conflicts
Device drivers - using driver software to translate OS commands into device-specific instructions
Spooling - queuing requests for a peripheral (e.g. printer) when multiple processes need it simultaneously, handling them one at a time
Error handling - detecting and reporting peripheral errors (e.g. printer out of paper)
What is an interrupt?
A signal sent to the CPU by hardware or software requesting immediate attention.
What happens when the CPU receives an interrupt?
Finishes its current instruction
Saves its current state to the stack
Identifies the interrupt and runs the appropriate Interrupt Service Routine (ISR)
Restores its previous state from the stack and resumes the original task
What is an Interrupt Service Routine (ISR)?
A small program run by the OS in response to a specific interrupt
Each type of interrupt has its own corresponding ISR
Once the ISR completes, control is returned to the original process
How are interrupts prioritised?
Every interrupt is assigned a priority level
Higher priority interrupts can interrupt a currently running ISR
Lower priority interrupts are queued until the CPU is free
Give examples of hardware and software interrupts:
Hardware: keyboard input, mouse click, printer error, power failure
Software: division by zero, program requesting OS services, timer expiry