2.1 Systems Software Flashcards
What is an operating system?
A program that provides an interface between the user and computer or between software/hardware.
What is the purpose of an operating system?
Enables the user to communicate with the computer and perform low-level tasks involving the management/upkeep of computer resources.
What are the features of operating systems?
- memory management
- resource management (scheduling)
- file management
- i/o management (drivers)
- interrupt management
- utility software
- security (firewall)
- user interface
What is paging?
When memory is split up into equal-sized sections (pages) with programs being made up of a certain number of pages. Pages can then be swapped between main memory and secondary storage as needed.
What are 3 aspects of memory management?
paging
segmentation
virtual memory
What is segmentation?
When memory is split up into variable, logical-sized divisions (segments). Segments may be allocated to blocks of code such as a loop or function.
What is virtual memory?
When a section of the hard drive acts as an extension to main memory and temporarily stores programs that are not in use.
What is the purpose of virtual memory?
Allows you to run more programs at the same time, even when RAM doesn’t have enough space to store all of the programs.
What is the issue with virtual memory?
Disk thrashing which is when the computer slows down as pages are being swapped between RAM and secondary storage too frequently. This results in more time being spent swapping pages than running the program.
What is an interrupt?
A hardware or software generated signal that indicates to the CPU that a process needs urgent attention.
Where are interrupts stored and in what order?
They are stored in priority order in a priority queue in the interrupt register.
What are the steps in servicing an interrupt?
- CPU checks the contents of the interrupt register after each fde
- If an interrupt exists of higher priority than the current process, the contents of the special purpose registers are transferred to a stack
- The appropriate ISR is loaded into RAM
- The memory address of the start of the ISR is copied into the PC
- A flag is set to signal the ISR has began
- When the ISR is complete, the flag is reset
- The contents of the stack are reloaded into the special purpose registers unless another interrupt of higher priority exists
What does ISR stand for?
interrupt service routine
What is the purpose of scheduling algorithms?
Ensure all programs receive a fair amount of processing time.
What are 2 types of scheduling algorithms?
pre-emptive
non pre-emptive
What is the difference between pre-emptive/non pre-emptive scheduling algorithms?
Pre-emptive algorithms actively start/stop jobs whereas non pre-emptive algorithms allow a job to run till completion once it has began.
What are 5 scheduling algorithms and which category does each fall into?
pre-emptive -
- round robin
- shortest remaining time
- multilevel feedback queues
non pre-emptive -
- first come first serve
- shortest job first
How does RR work?
Each job in a queue is given an equal slice of processor time. Once all of the jobs have had their time slice, the process repeats.
What is the advantage of RR?
Ensures every single job receives processor time.