1.2.1 System Software Flashcards
What is an OS?
Operating System. A program or set of programs that manage the computers hardware and interactions with the user
What are the functions of the operating system?
Providing a user interface
Managing the CPU, scheduling, and interrupts
Managing memory and storage allocation
Managing hardware and peripherals
Managing user permissions and account information
Providing utilites and libraries
What is paging?
Splitting memory into equal fixed size chunks/units/blocks
What is segmentation?
Splitting memory into variable sized chunks/units/blocks
What is a logical address?
The position of a page/segment within a program
What is a physical address?
The position of a page/segment in memory
Why is memory management important?
Security - Memory is reserved for each progra and cannot be overwritten by other programs
Multitaksing - Allows multiple programs to run at once
Explain how virtual memory works?
Memory contents are divided into pages or segments.
If RAM is full,
then pages or segments not currently in use will be moved to an area in storage called virtual memory to make room.
When the pages or segments are needed, they are moved back to memory again.
What is an advantage of virtual memory?
Makes room in RAM
What is a disadvantage of virtual memory?
It’s slower to acces pages/segments in virtual memory than pages in RAM.
Extra processing time involved in moving pages/segments.
What is an interrupt?
A signal to the processor indicating that a device/process needs attention.
What is an ISR?
Interrupt Service Routine. A program that is run when an interrupt happens.
What are the three reasons for an interrupt?
Power Failure
Clock interrupt (scheduled)
Input/Output device signal
How are interupts handled in the FDE cycle?
When the computer completes an FDE cycle
it will check the priority of the interrupt.
If the interrupt is a higher priority then the current tasks, then the current contents of all registers will be stored in the stack in memory.
The relevant inerrupt service routine is then loaded by placing the address of the first instruction in the Program Counter.
When the ISR is complete, the previous state is popped from the stack and loaded back into the registers.
If a higher priority interupt arrives while completing the ISR that will be added to the stack and the new interrupt will be dealt with.
What are the five main scheduling algorithms?
Round robin
First come first served
Shortest job first
Shortest remaining time
Multi-level feedback queues
How does the round robin scheduling algorithm work?
Processes are allocated a fixed slice of CPU time and are cycled through in the order that they arrived, switching processes at the end of each time slice or when a higher priority interrupt arrives.
What is a disadvantage of the round robin scheduling algorithm?
Extra time is spent switching jobs
What are the advantages of the round robin scheduling algorithm?
No risk of starvation.
Easy to adapt to prioritise tasks by allowing high priority tasks to have multiple time slices per cycle.
How does the first come first served scheduling algorithm work?
Processes are executed in the order that they arrive with no system of priorities