2.1 (SYSTEM SOFTWARE) Flashcards

1
Q

Functions of an OS?

A

Resource management
File Management
Interrupt handling
Security
Providing a platform for software to run
Providing a user interface
Providing utilities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

State utilities an OS may provide (5)

A

Encryption, compression, defragmentation, system backup, disk cleanup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How is memory management made more efficient?

A

Paging
Segmentation
Virtual memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is paging?

A

Chunking of primary memory into pages (equal sized blocks)
As users move between applications the memory is dynamically allocated
Paging can lead to internal fragmentation due to unused space in a page not being able to be used
(eg a 60kb file in a 64kb page would have 4 kb of unused space)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is segmentation?

A

Chunking memory into blocks that correspond to different types of data
These can be different sizes
Space efficient due to only allocating space depending on the amount an application needs
Can lead to external fragmentation due to blocks taken away can’t be guaranteed to be the same size as a new block, leaving gaps
In turn the maximum block size that can be added is reduced

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is virtual memory?

A

If a computer is running low on primary memory it can allocate a section of secondary storage as an extension of the main memory
This allows the OS to offload date from the primary memory to the virtual memory, creating an illusion of larger memory, allowing for further multitasking
However this is considerably slower than RAM
Over reliance leads to performance issues

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an interrupt?

A

Signal to the processor to stop the current task, to perform different task temporarily
When an interrupt occurs, the processor suspends the current program and transfers control to an interrupt service routine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Types of interrupts and how they occur (3)

A

Hardware:
Generated by peripherals (I/O requests)
Software:
Triggered by the software or the operating system (Requests to open a file, division by 0 errors)
Trap:
Intentionally triggered by a program (Debugging, unexpected error handling)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Interrupt Process

A

1.
Interrupt generation
Interrupt controller passes this to the interrupt handler for assesment
2.
Interrupt handler decides if the interrupt needs to be dealt with now or later
If yes the current contents of the processor are saved into the stack
3.
The processor fetches te corresponding Interrupt service routine (ISR) to the interrupt type
4.
The processor transfers control to the ISR and executes the routine to handle the specific interrupt
5.
After the ISR completes the processor restores the contents of the registers (off the stack)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is an ISR?

A

A special function that handles a particular interrupt type
Each type of interrupt has a corresponding routine eg.printer jams
ISRs should be concise, efficient and carefully deseigned to minimise the time taken to execute as they often handle time sensitive events

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe interrupt priority

A

Interrupt prioritisation means the processor can acknowledge and switch to
resolving a higher-priority interrupt
Prioritising interrupts is vital because many things can go wrong at the same time
Lower-priority ISRs may be temporarily suspended until the higher-priority ISR
completes the execution
Nesting of interrupts refers to the ability of the processor to handle interrupts
within interrupts
Proper management of nested interrupts avoids potential conflicts and ensures
system stability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is scheduling?

A

Deciding which tasks to process, for how long, and in what order is achieved
through scheduling algorithms
A CPU is responsible for processing tasks as fast as possible
Different algorithms are used to prioritise and process tasks that need CPU time
The algorithms have different uses, benefits and drawbacks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the categories of scheduling and how do they work with pros and cons?

A

Pre-emptive:
Allocates the CPU for a specific time quantum to a process
Allows interruption of processes currently being handled
It can result in low-priority processes being neglected if high-priority processes
arrive frequently
Example algorithms include Round Robin and Shortest Remaining Time First
Non pre-emptive:
Once the CPU is allocated to a process, the process holds it until it completes its
burst time or switches to a ‘waiting’ state
A process cannot be interrupted unless it completes or its burst time (amount of time a task is expected to take) is reached
If a process with a long burst time is running, shorter processes will be neglected
Example algorithms include First Come First Serve and Shortest Job First

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Give each Scheduling algorithms pros and cons (5)

A

Round robin:
Pros:
All processes get a fair share of the CPU
Good for time-sharing systems
Predictable, as every process gets equal time
Cons:
Choosing the right time quantum can be difficult
This can lead to a high turnaround time and waiting time for long processes
First come first serve:
Pros:
Simple and easy to understand
Fair in the sense that processes are served in the order they arrive
Cons:
This can lead to poor performance if a long process
arrives before shorter processes
High-priority tasks wait for their turn in the queue
Multi level feedback queues:
Pros:
Smaller tasks are prioritised
Creates a prioritisation system where similar-sized tasks are queued together
Cons:
More complex than other algorithms
Setting the correct parameters (e.g., number of queues, ageing rules) can be complex
Shortest job first:
Pros:
Minimises waiting time
Efficient and fast for short processes
Cons:
Requires knowing the burst time of processes in advance
Long processes can starve if short processes keep arriving
Shortest time remaining:
Pros:
Ideal for jobs that have shorter burst times
It is pre-emptive, so it can be aligned with CPU for best
performance (time quantum)
Cons:
Like SJF, it requires knowing the burst time of processes in advance
High context switching overhead due to pre-emption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Distributed OS

A

Run on multiple machines appearing as a single unit, used for efficient task distribution and load balancing
Hadoop is an open-source OS designed to process big data using multiple nodes in a distributed network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Embedded OS

A

Designed for specific tasks, is the system running inside a device that is not primarily a computer system, e.g.
microwave, dishwasher, washing machine
loT (internet of things) devices and many household devices contain embedded
OS. These devices don’t typically run a well-known OS. They run a proprietary OS that has a simple set of functions.

17
Q

Multitasking OS

A

Allows multiple tasks to run concurrently on a single
processor, manages system resources and allocates CPU time to different processes
Windows, MacOS, and Linux are multi-tasking OS that can run multiple applications simultaneously.

18
Q

Multi user OS

A

Supports multiple users accessing computer resources
concurrently, efficiently manages resource allocation, and provides features for data security and user privacy
Windows, MacOS, and Linux are multi-user OSs where multiple users can log in and run independent processes.

19
Q

Real time OS (RTOS)

A

Designed for immediate data processing, and can ensure tasks are processed in specific timeframes, highly efficient
Real-time OS are used in industries like aerospace and
automotive where low latency is critical to safety.

20
Q

What does the BIOS do?

A

Basic input / output system
Performs POST which ensures hardware is working properly and if successful performs bootstrapping (loading OS)
Stored in ROM
Main uses in

21
Q

What is a driver?

A

A driver is a software that enables an OS to communicate with a external device (not just peripherals)
e.g. Printeers, NICs, graphics cards

22
Q

What is a virtual machine?

A

Software used to emulate another machine
Can be used to emulate different hardware