Computing - Operating Systems
AQA Computer Science 2022
The operating system and its role
What is the role of an operating system?
Hide the complexities of the hardware from the user.
What is a virtual machine?
A layer of software that allows one computer to simulate another and to run more than one operating system.
Application programming interfaces
What is the purpose of an API?
To hide the true complexities of an operation to the end user.
In what way is an API like a restaurant?
- An API is like a waiter in a restaurant
- You look at the menu and give the waiter (i.e. the API) your request
- The waiter takes the request to the kitchen (i.e. the OS)
- The kitchen sends back the prepared dish via the waiter
Resource management
What is the primary function of an OS?
Handling resource management.
What 4 primary resources does the OS manage?
- Processor scheduling
- Backing store management
- Memory management
- I/O devices
What is processor scheduling?
Where the OS controls what instructions are sent to the processor.
What does processor scheduling allow?
Allows programs to run simultaneously, since multiple instructions are queued.
What is backing storage?
Any non-volatile data storage that will hold a computer’s data.
What is backing store management?
Allows the reading and writing of files. Keeping track of free space.
What is memory management?
Where the OS allocates each process some memory.
What happens if there is not enough memory on the RAM to allocate memory?
The OS allocated virtual memory on the hard drive instead.
What are the three primary scheduling algorithms?
- Round robin - each process uses the processor in turn
- Shortest job next
- Priority system/queue
What is IO device management?
Where the OS communicates with I/O devices and handles drivers.
Interrupts
What is interrupt handling?
Where the OS deals with software and hardware interrupts.
What is an interrupt?
A signal from a hardware device or program that causes the operating system to stop processing its current instructions and switch priority.
What 4 things happen when an interrupt occurs?
- Current processor state is saved
- Source of the interrupt is identified
- Appropriate interrupt service routine called
- Processor state is restored