2.1 System Sofware Flashcards
What are operating systems?
OS manages hardware and provides an interface for the users and the application software
What functions does the OS provide?
- User interface
- Memory management
- Interrupt handling
- Processor scheduling
User interface
Allows the operating system to hide the complexity of hardware
Memory management
- Programs and data need to be loaded into RAM
- Operating systems must manage allocation of RAM to different programs
- There may not be sufficient RAM for all desired processes to be completely loaded into RAM at once
Pages
- Available memory is divided into fixed size chunks called pages
- Each page has an address
What process does paging fix?
- A process loaded into RAM is allocated sufficient pages, but those pages may not be contiguous in physical terms
How do page tables fix problems?
A page table maps between the logical locations and the physical memory locations
Segments
Spaces of memory that can relate to parts of a program
Segmentation
Dividing memory into segments
Virtual memory
Some of the pages of a current process are stored in virtual memory until they are swapped into RAM
Disk Thrashing
Where the computer has to constantly swap pages between virtual and primary memory and therefore slows down the computer
Interrupts
CPU instructions can be interrupted when necessary
How are interrupts processed?
CPU checks at the end of each clock cycle whether there are any interrupts to be processed
What happens when an interrupt is detected?
The processor stops fetching instructions and instead pushes the current contents of its registers onto a stack
Interrupt priority
Interrupts can themselves be interrupted if the new interrupt is of a higher priority