1.2.1 Systems Software Flashcards
What is an operating system?
a set of programs that manages the operations of the computer for the user. It acts as a bridge between the user and the computer’s hardware, as they cannot communicate directly
How is the OS loaded?
when the computer is switched on, the boot loader in ROM loads the OS into RAM
What are some examples of operating systems?
windows, iOS, macOS, linux
What are the functions of an operating system?
memory management
interrupt service routines
processor scheduling
user interface
What is memory management?
Allows a user to work on several tasks at the same time- e.g spotify, word and outlook. Memory management includes paging, segmentation and virtual memory. The OS manages the allocation of RAM to the different programs, as there may not be sufficient RAM for all processes to be loaded into RAM at once
What is paging (memory management)?
The available memory is divided into fixed size chunks called pages, each of which has an address. The process loaded into RAM is allocated sufficient pages, but the pages may not necessarily be next to each other (contigious). A page table then maps between the logical and physical memory locations
What is segmentation? (memory management)
Memory is divided into segments which can relate to part of a program, e.g a particular function or subroutine
What is virtual memory?
A small area of secondary storage can be designated as virtual memory if the demand for RAM exceeds the amount on the computer. Some of the pages of the current processes are stored in virtual memory until they are needed, at which point they are swapped into RAM
What is disk thrashing?
If many processes are running while there is insufficient RAM, lots of time is spent swapping pages in and out of virtual memory. Repeatedly swapping pages can noticeably slow down the computer- this is disk thrashing
What is the purpose of interrupts?
It is important that the CPU can be interrupted when necessary- for example:
printer runs out of paper
error occurs in a program
power failure
scheduled interrupt
I/O device sends an interrupt signal
When does the CPU check for interrupts?
At the end of each clock cycle (F,D,E,IRS)
What happens when an interrupt is detected?
1) The processor stops fetching instructions and pushes the current contents of its registers into a stack
2) The CPU uses an interrupt service routine (ISR) to process the interrupt
3) The old instructions are popped from the stack and reloaded into the CPU
What happens if a higher priority interrupt is received during an ISR?
The original interrupt will be pushed onto the stack, then carried out once the higher priority interrupt has been processed
What is scheduling?
A single CPU can only process instructions for one application at a time, so the OS must schedule when each application can use the CPU, giving the illusion of multi-tasking.
What are the aims of scheduling?
To process as many jobs as possible in the least amount of time while ensuring fairness between multiple users
What are the different types of scheduling?
Round robin
FCFS
Shortest remaining time
Shortest job first
Multi-level feedback queue
Describe round robin scheduling
Each job is allocated a certain time slice. If the job has not been completed by the end of that time slice, the next job begins and the unfinished job is sent to the back of the queue
Describe FCFS scheduling
the first job to arrive is executed until it is completed. It is the simplest method
What is the difference between shortest remaining time and shortest job first?
With shortest job first, the order is decided before any jobs are executed and the order doesn’t change. In shortest time remaining, a shorter, new job can take over from the current process
Describe multi-level feedback queues
multiple queues are created with different priority levels. If a job uses too much CPU time it is moved to a lower priority queue and if a process has waited for a long time it can be moved to a higher priority queue