1. 2. 1 Systems Software Flashcards
1
Q
Operating Systems
A
- Term refers to collection of programs, work together to provide interface between user and computer
- OS allows user to communicate with PC, perform low level tasks involving management of PC memory and resources
- Desktop OS (Windows, macOS), Mobile OS (iOS, Android)
2
Q
Features provided by the operating system
A
- Memory management (Paging, Segmentation, Virtual memory)
- Resource management (Scheduling)
- File management (Moving, Editing, Deleting files and folders)
- Input/Output management (Device Drivers)
- Interrupt management
- Utility software (Disk Defrag, Backup, Formatting, Encryption, Anti-Virus)
- Security (Firewall)
- User interface
3
Q
Memory Management
A
- Memory (RAM) must be shared fairly between programs and applications in use
- Role of OS to determine and allocate processor time that each task receives
- This is done through paging, segmentation and the use of virtual memory
4
Q
Paging
A
- Memory split up into equal-sized sections (pages)
- Programs made up of certain number of pages
- Can be swapped between RAM and HDD if needed
5
Q
Segmentation
A
- Memory split into logical sized divisions (segments)
- Segments vary in size, representative of structure and logical flow of program
- Segments allocated to blocks of code such as conditional statements or loops
6
Q
Virtual Memory
A
- Section of HDD, acts as RAM when RAM has insufficient space to store programs being used
- Sections of program not currently in use, temporarily moved to virtual memory through paging
- Frees up memory for other programs in RAM
7
Q
Disk Thrashing
A
- Issue with using Paging, Segmentation and Virtual memory, disk thrashing
- Computer “freezes”, result of pages being swapped too frequently between RAM and Virtual memory
- More time spent transferring pages between two then running program
- Issue progressively worse as virtual memory filled up more
- Solution is more RAM
8
Q
Interrupts
A
- Signals generated by software or hardware, indicate to processor that process needs attention
- Different types of interrupts, different priorities (level of urgency)
- Needs to be considered by OS when allocating processor time
- Interrupts stored in order of priority in priority queue (abstract data structure)
- Priority queue stored in a special register known as the interrupt register
- Job of OS ensure interrupts serviced fairly, done using Interrupt Service Routine (ISR)
- An Interrupt Service Routine is a program that handles processor interrupts
- Examples of interrupts, Printer signalling completion of print job, peripheral signalling power failure
9
Q
Interrupt Service Routine
A
- Processor checks contents of interrupt register at end of each fetch-execute cycle
- If interrupt exists, higher priority than current process being executed
- Content of registers transferred to stack
- Processor responds to interrupt by loading appropriate ISR into RAM
- Flag set to signal ISR begun
- Once interrupt serviced, flag reset, interrupt queue checked for further interrupts (higher priority than current process originally being executed)
- If more interrupts to be serviced, process above repeats till all priority interrupts serviced
- If no more interrupts or lower priority, contents stack transferred back to registers
- Fetch-execute cycle resumes as before
10
Q
Scheduling
A
- OS ensures all sections of programs being run (known as “jobs”) receive fair amount of processing time
- Scheduling algorithms implemented to do so, can be either pre-emptive or non-pre-emptive
- Pre-emptive, jobs made to start and stop by OS (Multilevel Feedback Queues, Shortest Remaining Time, Round Robin)
- Non-pre-emptive, job starts left alone till completion (First Come First Served, Shortest Job First)
- Scheduling algorithm used is dependent on the task
11
Q
Round robin
A
- Each job given section of processor time (time slice), within which it is allowed to execute
- Once each job used first time slice, OS grants each job another equal slice of processor time
- Continues till job has completed, removed from the queue
- Longer jobs take longer time for coemption, execution inefficiently split up
- Algorithm does not take into account job priority
12
Q
First come first served
A
Jobs processed in order of arrival, straightforward to implement, does not take priority into account
13
Q
Multilevel feedback queues
A
- Multiple queues, ordered based on priority, difficult to implement
- Hard to decide which job to prioritise based on combo of priorities
14
Q
Shortest job first
A
- Queue ordered according to time required for completion, longest job serviced last
- Suited to batch systems, shorter jobs given preference to minimise waiting time
- Requires processor to calculate how long each job takes, not always possible
- Risk of processor starvation if short jobs continue to be added to job queue
- Processor starvation is when a process does not receive enough processor time in order to execute and be completed
15
Q
Shortest remaining time
A
- Queue ordered according to time left for completion, jobs with least time to completion serviced first
- Risk of processor starvation for longer jobs
- Does not take priority into account