1. Functions of an Operating System Flashcards
Define the term operating system
A collection of programs that provide an interface between the user and the computer
Name the 8 features that an operating system provides
- Memory management
- Resource management
- File management
- I/O management
- Interrupt management
- Utility software
- Security
- User interface
Name the 3 techniques used by the OS to ensure memory is shared effectively by programs
- Paging
- Segmentation
- Virtual memory
Describe how paging works
- Memory split up into equal-sized sections (pages)
2. Pages swapped between main memory and hard disk as needed
Describe how segmentation works
- Memory split up into logical sized divisions (segments)
- Segments vary in size
- Segments represent structure and logical flow of program
Describe how virtual memory works
- A section of hard drive acts as RAM when space in main memory is insufficient
- Sections of programs not currently being used are temporarily moved to virtual memory through paging
- This frees up memory for other programs in RAM
Define the term disk thrashing
A disadvantage of virtual memory when the computer freezes due to pages being swapped too frequently between hard disk and main memory
Define the term interrupt
Signals generated by software or hardware to indicate to processor that a process needs attention
What is considered when allocating processor time?
The interrupt’s priority
Where are interrupts stored?
Within an abstract data structure called a priority queue in an interrupt register
What is an ISR (Interrupt Service Routine)?
A software process invoked by an interrupt request
Describe what happens when an interrupt exists with a higher priority to the current process
- Current contents of registers in CPU are transferred into stack
- Relevant ISR is loaded into RAM
- Flag is set to signal ISR has begun
- Flag is reset once ISR has finished
- Process is repeated
Describe what happens when there are no interrupts with a higher priority to the current process
- Contents of stack are put back into registers
2. FDE cycle resumes
What is scheduling?
How the OS ensures all sections of programs being run (jobs) receive a fair amount of processing time
What is a preemptive scheduling algorithm?
When jobs are actively made to start and stop by the OS