1.2.1: Systems Software Flashcards
(55 cards)
What is an Operating System?
- A collection of programs that work together to provide an interface between the user and computer
What do the programs in an Operating System do?
- Enable the user to communicate with the computer and perform certain low-level tasks involving the management of computer memory and resources
Where are Operating Systems needed?
- Essential in devices such as laptops, mobile phones, and games consoles
What does the Operating System provide?
- Memory Management (Paging, Segmentation, Virtual Memory): Determining and allocating the length of processor time each task receives
- Resource Management (Scheduling)
- File Management (Moving, Editing, Deleting)
- Input/Output Management (Device Drivers)
- Interrupt Management
- Utility Software (Disk Defragmenter, Backup, Formatting)
- Security (Firewall)
- User Interface
Why is Memory Management needed?
- Computer memory must be shared fairly between multiple programs and applications being used
- Often main memory is not large enough to store all the programs being used
What is Paging?
- When memory is split up into equal - sized (Commonly 4 KB) pages, with programs being made up of a certain number of equally sized pages
- Pages can be swapped between main memory and hard disc as needed
What is Segmentation?
- The splitting up of memory into logical sized segments that vary in size
- Segments are representative of the structure and logical flow of the program, with segments being allocated to blocks of code such as conditional statements or loops
What are the similarities between Paging and Segmentation?
- Both allow programs to run despite insufficient memory
- Pages and Segments are stored on disk
- Pages and Segments are transferred into memory when needed
What are the differences between Paging and Segmentation?
- Pages are fixed sizes: Segments are different sizes
- Pages are made to fit sections of memory: Segments are complete sections of programs
- Pages are physical divisions: Segments are logical divisions
What is Virtual Memory?
- A section of the hard drive set up to act as RAM when there is not enough physical RAM to store open programs
How does Virtual Memory work?
- Programs are transferred out to VM from the RAM when they are not currently in use
- Programs are transferred back into RAM from VM when they are needed
What are Interrupts?
- Signals generated by software or hardware to indicate to the processor that a process needs attention
How are Interrupts stored?
- Different types of interrupts have different types of priorities: How urgent they are must be taken into account by the OS when allocating processor time
- Interrupts are stored in order of their priority with an abstract data structure called a Priority Queue in an Interrupt Register
How are Interrupts carried out?
- It is the job of the OS to ensure interrupts are serviced fairly by the processor through the Interrupt Service Routine (ISR)
What is the first stage of the Interrupt Service Routine?
- The processor checks the contents of the Interrupt Register at the end of each FDE cycle
What is the second stage of the Interrupt Service Routine?
- If an interrupt exists that is of higher priority to the process being executed, the current contents of the special purpose registers in the CPU are temporarily transferred into a stack
What is the third stage of the Interrupt Service Routine?
- The processor responds to the interrupt by loading the appropriate ISR into RAM: A flag is set to signal that the ISR has begun
What is the fourth stage of the Interrupt Service Routine?
- Once the interrupt has been serviced the flag is reset
What is the fifth stage of the Interrupt Service Routine?
- The interrupt queue is checked again for further interrupts of a higher priority to the process that was originally executed
What is the sixth stage of the Interrupt Service Routine?
- If there are more interrupts to be serviced, the process is repeated until all priority interrupts have been serviced
What is the seventh stage of the Interrupt Service Routine?
- If there are no more interrupts or interrupts are of a lower priority to the current process, the contents of the stack are transferred back into the registers in memory and the FDE cycle resumes
What is Shortest Time Remaining (SRT) Scheduling?
- Pre-emptive
- The ready queue is sorted by estimated completion time
- Processes that arrive with a shorter completion time than the current running process are moved to the running state
What is a risk of Shortest Remaining Time (SRT) Scheduling?
- Processor starvation (When a process does not receive enough time in order to execute and be completed) for longer jobs if short jobs are added to the job queue
What is Round Robin (RR) Scheduling?
- Pre-emptive
- Each process is given a maximum length of processor time (time slice) in the running state, after which it is put back into the ready queue