Chapter 7 - Functions of an Operating System (1.2) Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is an operating system?

A

program/set of programs that manages the operations of the computer for user

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

Where is the operating system held?

A

permanent storage

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

What are some functions of an operating system? (6)

A
  1. provides a user interface
  2. memory management
  3. interrupt service routines
  4. processor scheduling
  5. backing store management
  6. management of all input and output
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is paging?

A

When memory is split up into equal sized sections known as pages, can be swapped between main memory and the hard disk as needed

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

What is segmentation?

A

Splitting up memory in segments which can vary in size, represents the structure and logical flow of the program

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

What is virtual memory?

A

Uses a section of the hard drive in RAM when there’s no more space in main memory to run apps, moves rarely used programs here through paging which frees up memory for other programs in RAM

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

What’s the issue with paging, segmentation and virtual memory?

A

Disk thrashing (when pages are swapped too frequently between the hard disk and main memory, causing the computer to slow down)

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

Describe the process of interrupts.

A

At the end of the fetch decode execute cycle (during the execute phase), the processor checks for any interrupts in the interrupt register. if there are any, if the priority of the interrupt is higher than the priority of the current instruction being executed, the current instruction’s contents are pushed onto a stack and the interrupt is executed. If the interrupt is of same or lower priority, its contents are pushed onto a stack and is fetched once the current instruction’s contents are executed. If an interrupt of higher priority is in the interrupt register when the first interrupt has been executed, the first interrupt’s contents are pushed onto a stack and the second interrupt is executed. Stacks work in a FIFO (first in first out) order, so the first interrupt’s contents would be put back into registers before the original instruction.

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

What is a scheduler?

A

The operating system module responsible for making sure that processor time is used as efficiently as possible

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

Scheduling algorithms can either be..? (2)

A

Pre-emptive (jobs are actively made to start and stop by the operating system)
Non pre-emptive (once a job is started, it’s left alone until completion)

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

Describe the round robin scheduling algorithm.

A

Each job is given​ a time slice​ within which it is allowed to execute. If the process hasn’t completed before before the time slice ends or a higher priority interrupt occurs, the OS gives the CPU the next process. Once each job in the queue has used its first time slice, the OS again grants each job a time slice, until a job has been completed, where it’s then removed from the queue.

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

What is an advantage of the round robin scheduling algorithm?

A

Ensures every job is executed.

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

What are 2 disadvantages of the round robin scheduling algorithm?

A
  1. Longer jobs will take way more time to complete due to it being inefficiently split into multiple cycles
  2. Doesn’t take into account job priority
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe the first come first served scheduling algorithm.

A

Jobs are processed in the order in which they arrive.

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

What is a disadvantage of the first come first served scheduling algorithm?

A

Doesn’t take into account job priority.

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

Describe the shortest remaining time scheduling algorithm.

A

The queue storing jobs to be processed is ordered according to the time left for completion, jobs with the least time to completion are executed first. If a job with a shorter remaining time joins the queue, the current job being executed is pushed back into the queue.

17
Q

What is a disadvantage of the shortest remaining time scheduling algorithm?

A

Risk of processor starvation if shorter jobs keep on getting added, leaving the longer jobs with no execution time

18
Q

Describe the shortest job first scheduling algorithm.

A

Process with the estimated shortest running time is run next until execution

19
Q

What system is the shortest job first algorithm suited for?

A

Batch systems.

20
Q

What are some disadvantages of the shortest job first algorithm? (2)

A
  1. Processor won’t always be able to estimate how long each job will take
  2. Risk of processor starvation for longer jobs if shorter jobs keep getting added
21
Q

Describe the multi-level feedback queues scheduling algorithm.

A

Uses multiple queues, with jobs moving between queues depending on how much processor time they use

22
Q

What is an advantage of multi-level feedback queues?

A

Maximises processor use and prevents bottlenecks from occurring

23
Q

What is a disadvantage of multi-level feedback queues?

A

Can be difficult to implement due to deciding which job to prioritise

24
Q

What is backing store management?

A

Transferring files and applications from backing storage (e.g. hard drive) into memory

25
Q

What is peripheral management?

A

The operating system communicating with peripherals (e.g. printers or keyboards)