1.2.1 Systems Software Flashcards
1
Q
Operating system
A
- a collection of programs that provide an interface between the user and computer
2
Q
Functions of the OS
A
- provides a user interface [1]
- manages/controls hardware [1]
- provides a platform for software to run [1]
- handles interrupts [1]
- provides security [1]
- provides utilities for system maintenance [1]
- input/output management (device drivers)
- file management (moving editing deleting files and folders)
- resource management (scheduling)
- memory management (paging segmentation and virtual memory)
3
Q
Utilities
A
- software program with a specific function linked to the maintenance of the OS [1]
- file encryption : encodes files before transfer allowing users to send files over networks securely
- file compression : reduces file size to take up less storage space or for faster transfer over a network [1]
- disk defragmentation : physically reorganises files on a hard disk so they can be found and accessed faster [1]
- backup software : creates system snapshots and will restore them on demand /makes regular copies of files In case of loss [1]
- disk clean up: scans the Hard disk for duplicate or corrupted files and removes them freeing up hard disk space
4
Q
Memory management
A
- is a fundamental role of the OS
- deals with the allocation and deallocation of RAM to ensure RAM is used efficiently and not wasted [1]
- benefit : enables multitasking allowing multiple programs to run at once [1]
5
Q
Memory management techniques
A
- paging
- segmentation
- virtual memory
6
Q
Paging
A
- main memory is split into fixed sizes sections called pages [1]
- uses physical divisions
- pages are swapped between main memory and hard disk as needed
7
Q
Paging benefits + drawbacks
A
- benefits : facilitates efficient memory management and enable use of virtual memory
- programs/data can be held in non contiguous memory locations [1]
- to avoid having to move content around to fit in new programs
- drawbacks : can lead to internal fragmentation (pockets of wasted space within pages)
- unused space in pages is wasteful as other unrelated data cannot be stored on this page
8
Q
Segmentation
A
- divides main memory into logical sized divisions called segments which can vary in size [1]
- are complete sections of programs
- segments represent the structure and logical flow of the program
- eg. In a video editing application different segments may be created for video data, audio data, effects and UI elements
9
Q
Segmentation advantages + disadvantages
A
- benefits : is space efficient due to only allocating space depending on the amount an application needs
- drawbacks : can result in external fragmentation [1]
10
Q
PAGING VS SEGMENTATION similarities
A
- both allow programs to run despite insuffienct memory [1]
- both are ways of splitting up memory [1]
- both allow programs to be stored non continuously in memory [1]
- both pages and segments use virtual memory (are stored on a disk) [1]
- both pages and segments are transferred into memory when needed [1]
11
Q
PAGING VS SEGMENTATION differences
A
- paging uses fixed sized memory blocks , segmentation uses variable length memory block [1]
- paging uses physical divisions, segmentation use logical divisions [1]
- pages are made to fit sections of memory , segments are complete sections of programs
12
Q
Virtual memory
A
- virtual memory is a section of hardrive/secondary storage device [1]
- when memory intensive applications exceed available RAM
- the OS moves less frequently accessed pages to virtual memory [1]
- this frees up space for other programs in RAM [1]
- pages are transferred back into RAM from virtual memory as needed [1]
13
Q
Virtual memory advantages
A
- allows more extensive programs to be run
- facilitates effective multitasking
14
Q
Virtual memory disadvantages
A
- slower to access than physical memory which degrades performance if overused
- can lead to disk thrashing, when the computer freezes due to pages being swapped too frequently between the hard disk and main memory [1]
15
Q
What is an interrupt?
A
a signal to the processor indicating that a device/process needs attention [1]
16
Q
Interrupt service routine
A
- The processor checks the interrupt register at the end of each FDE cycle [1]
- If an interrupt exists with a higher priority to the current process :
- the current contents of the registers in the CPU are transferred into a stack [1]
- the relevant ISR is loaded into RAM by loading the relevant value into the PC [1]
- when the ISR is complete and if there are no interrupts with a higher priority to the current process [1]
- the contents of the stack are popped/loaded back into the register [1]
- the FDE cycle resumes [1]
17
Q
Scheduling + why is it necessary ?
A
- the method used by the OS to ensure all jobs get sufficient/fair processor time ensuring efficient use of resources /processor time [1]
- as many jobs as possible are processed in the least possible it time [1]
- scheduling algorithms can be pre- emptive or non-pre-emptive
18
Q
Pre-emptive
A
- assigns the CPU to a process for a limited amount of time
- allows interruption of processes currently being handled
- it can result in low priority processes being neglected if high priority processes arrive frequently
- e.g round robin , STRF, multi level feedback queues
19
Q
Non pre-emptive
A
- Allocates the CPU for unlimited time slots
- so once the CPU is given to a process that process keeps using it until it’s completed
- a process can’t be interrupted unless it completes or it’s burst time is reached
20
Q
Round robin
A
- is pre-emptive
- each process is given a fixed/equal amount of time [1]
- if the process hasn’t been completed by the end of its time quantum, it returns to the back of the ready queue [1]
21
Q
Round robin advantages
A
- all processes/jobs will eventually be attended to
- all process get an equal/fair share of the CPU
22
Q
Round robin disadvantages
A
- choosing the right time quantum can be difficult
- doesn’t take into account job priority/urgency
23
Q
First come first served
A
- is non-pre-emptive
- jobs are processed on a FIFO basis [1]
- whichever process is received first , is executed first
- each job is equal priority [1]
- e.g for printer queue : all documents have equal priority [1]
- whichever document is received first is printed first [1]
24
Q
First come first serve advantages+ disadvantages
A
- benefits: is easy to implement
- drawbacks: does not take into account job priority/urgency
- short process can starve if a long process arrives before a short process
25
Multi level feedback queues
- is pre emptive
- uses queues with different priorities [1]
- jobs can be moved between queues [1] e.g if they exceed the time quantum
- shorter and more critical task are processed first
26
MLFQ advantages
- shorter task are prioritised
- helps avoid starvation by allowing processes to move between queues
27
MLFQ disadvantages
difficult to implement/more complex than other algorithms
28
Shortest job first
- non- pre-emptive
- process which has shortest time remaining is completed first [1]
29
SJF advantages
- minimise waiting time
- efficient and fast for short processes
30
SJF disadvantage
- requires knowing the burst of processes in advance
- long processes can starve if short processes keep arriving
31
Shortest time remaining First (strf)
- jobs with the shortest time remaining are processed first
- If a shorter job arrives while a process is running, the current process will be preempted and requeued until it has the shortest remaining time.
32
Strf Advantages
Ideal for jobs with short burst times
33
Strf disadvantages
- can lead to processor starvation/ longer processes can starve if shorter processes keep arriving
34
Types of OS
- distributed OS
- Embedded OS
- multi-tasking OS
- multiuser OS
- real-time OS
35
Distributed OS
Allows multiple computers to work together on a single task (sharing the load) [1]
36
Embedded OS
has a dedicated function and is read only/cannot be changed + stored in the ROM [1]
37
Multitasking OS
runs multiple programs at the same time [1]
38
Multi-user OS
- allows multiple users to access computer resources at the same time [1]
39
Real time OS
- designed for immediate data processing and can ensure tasks are processed in specific/guaranteed time frames
- commonly used in time critical computer systems eg. Automotive - self driving cars where low latency is critical to safety
40
BIOS (basic input output system)
- basic input output system is the first program that runs when a computer is switched on
- is stored in ROM [1]
- it performs a power on self test (POST) that ensures all the hardware components and working properly [1]
- is used to call the bootstrap which boots up the operating system [1]
41
Device drivers
- A piece of software that enables communication between an OS and (external) hardware [1]
- eg printers, graphics cards, network cards
- are specific to the computers architecture
- are specific to the OS
42
Virtual machines
- a theoretical computer and a software implementation of a computer system [1]
- VMs are entitled OSs running inside another OS
- running a VM helps access software that is only designed to run on specific OSs
43
Virtual machines uses
- enables multiple OS to be run on a single machine
- can be used to create isolated test environments that leave the host operating system unaffected, debugging and development without affecting the main system [1]