1.2.1 - Operating Systems Flashcards
What is the operating system?
The operating system is the most fundamental piece of system software. It is the software that manages the computer.
What is the purpose of an operating system?
- To act as a platform on which the other software can run.
- To handle the operations common to different pieces of software running on the same system, like writing and reading to secondary storage.
Name 4 examples of OS functions that do not relate to memory or storage.
- Processor scheduling, determining the order in which processes will be executed.
- Handling interrupts, dealing with requests that disrupt the processor.
- Providing the user interface, how users interact with a computer.
- Providing security, ensuring resources are protected through permissions and passwords.
Name 3 examples of OS functions relating to memory or storage.
- Memory management, recording how memory is divided to efficiently allocate it.
- Secondary storage management, to track where files and programs are stored and which parts are available.
- I/O Management, ensuring efficient communications with devices and managing functionality issues.
What can happen without memory management?
Each different program will be using its own data. Without memory management, one program could change the data of another, and a maliciously coded program could access or amend the data of another program.
What is paging?
Paging is splitting programs up into physical units of the same size, stored in page frames. The operating system uses a page table to keep track of where the pages are stored, meaning all the pages of a process don’t have to be stored contiguously.
What is segmentation?
Segmentation is splitting programs up into segments of different sizes to fit the varying memory requirements of each process. The segments don’t need to be stored continuously across a fixed address space, and can be moved in and out of memory as required.
How is processor time allocated to urgent processes?
Interrupts are used (a signal sent to the processor to request immediate attention.) When the processor receives this request, it suspends what it is doing and runs the process associated with the interrupt.
Why might a processor be interrupted?
It could be interrupted because:
A hardware device has signalled it has data to process.
A hardware device has finished a task.
A software process needs a service to be provided or OS function to be performed.
A certain amount of time has expired.
A hardware failure has occurred.
What is an ISR and where is it found?
An ISR is a mini program designed to respond to an interrupt’s request. It can be built into an operating system or provided via device drivers.
What happens if an interrupt is raised at the end of a fde cycle?
The contents of the PC and other registers are copied to an area of memory called a stack.
All other lower-priority interrupts are put on hold.
The relevant ISR is loaded by changing the PC to where the ISR starts in memory.
The ISR executes.
The previous values are restored and interrupts re-established.
What is the job of a scheduler?
A scheduler is a program that manages the amount of time different processes have in the CPU.
What is the round robin scheduling algorithm?
In round robin scheduling, processor time is divided equally among all tasks.
Each process is given a fixed time period called a time slice, and if it hasn’t finished when the time is up it stops running and the computer switches to the next process.
What are the advantages and disadvantages of round robin?
Every task is allocated processor time without a long wait.
However, it doesn’t scale well, because as more processes run, the time slice for each gets smaller so more urgent processes are less likely to be completed quickly.
What is the first come, first served scheduling algorithm?
Processes run from start to finish in the order in which the processor receives their request to run.