1.2.1 // System Software Flashcards
What’s the OS’s main purpose, and what are some of it’s functions?
One sentence for purpose, and list it’s 4 main functions.
It manages hardware and provides an interface between the user and the application software.
It’s main functions are:
1. Providing a User Interface
2. Memory Management
3. Interrupt Handling
4. Processor Scheduling.
What is the purpose of Memory Management?
Don’t speak about a specific type of MM, give general information.
- Organises the use of (Main) Memory by converting logical addresses to physical addresses.
- Allows programs to share and allocate memory
- Protects data and programs from eachother
- Allows programs larger than Main Memory to run.
What’s Paging, and why is it useful?
Speak about Virtual Memory and programs larger than RAM.
- A MM technique where parts of the program are swapped from Virtual Memory to RAM when needed; It’s only used when RAM is full.
- It’s useful as it lets programs larger than RAM to be run.
How does Paging work, and what are it’s properties?
Speak about divisions, and non-contiguity.
- The Memory Manager divides RAM into equal sized sections called Pages. These pages are equal sizes in the Hard Disk too. (4KB)
- Because Paging uses Physical Division, Pages can be present in any location and order. (Non-Contiguous)
What are the Advantages of Paging?
- Pages having fixed sizes // Allocating Pages and working out their location is much easier
- Memory Efficient // All pages can be used with no space between them.
- Automatic // Programmer/users don’t need to worry about Paging.
On the other hand, memory within a page may be wasted as programs are unlikely to take up that exact amount of space.
What is Segmentation, and why is it useful?
- An MM technique where memory can be divided into logical segments which can be of different lengths.
- It’s useful because only the exact space needed is used per program.
Segments can relate to part of a program, e.g. a subroutine or function.
What are the Disadvantages of Segmentation?
- Wasted Space // As programs are loaded and removed from memory, wasted space may form between segments.
- Programmer Concerns // Programmers often need to specify segments in some architectures.
However, segments being dynamic can reduce internal fragmentation.
What is Virtual Memory, and when is it used?
- VM is a higher level MM technique where an area of the Hard Disk is designated to store pages of programs until they are needed in RAM.
What is Disk Thrashing, and how does it happen?
Talk about insufficient RAM
- Disk Thrashing happens when pages are being repeatedly swapped from VM to RAM. This happens more if the computer has insufficient RAM.
- It can noticeably slow down the Hard Disk’s transfer speeds.
What’s an Interrupt, and what sort of things can cause one?
Talk about priority and the CPU.
- A signal to the processor that makes it halt it’s current task(s) to focus on executing a higher-priority event.
Things that can cause an Interrupt include:
* Hardware devices such as an I/O device
* Software during an error
* A scheduled Interrupt from the Internal Clock
* Power Failure
The CPU checks for any interrupts to be processed AFTER the execution stage of the FDE cycle.
How does the CPU use the Stack to handle Interrupts?
Speak about Register contents, the ISR, and pushing & popping.
- When an interrupt is detected, fetching is delayed and the contents of the CPU registers are pushed onto a Stack.
- The CPU then calls the ISR (Interrupt Service Routine) to process the Interrupt. When processing finishes, register values are popped from the stack back into the CPU.
The Stack is a LIFO data structure; meaning the last data pushed on will be the first one popped and retrieved.
What’s Interrupt Priority, and how is the Stack involved?
Some Interrupts are of a higher priority than others…
- When a higher-priority Interrupt is recieved, the current Interrupts’ register contents will be pushed onto the stack and the higher-priority Interrupt processed.
What is Processor Scheduling, and what is it’s main purpose?
Speak about CPU engagement and execution starting.
- A technique used by the OS to allocate time for each application to use the CPU, creating the illusion of multi-tasking.
It’s main objectives are:
* Maximising CPU engagement by minimising when the CPU is idle
* Allowing all processes to be given resources, ensuring fairness.
* Minimising response time between starting execution after being scheduled.
What is Round Robin, and how does the CPU know when to switch between time slices?
- A PS technique where (by FIFO) a time slice is allocated by which the CPU’s resources can be used.
- The CPU knows when to switch between time slices by acknowledging if the job has been completed at the end of each time slice.
FIFO: First In, First Out
Round Robin is great for ensuring fairness, and maximising CPU engagement.
What are the Drawbacks of Round Robin?