1. Functions of an Operating System Flashcards

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

Define the term operating system

A

A collection of programs that provide an interface between the user and the computer

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

Name the 8 features that an operating system provides

A
  1. Memory management
  2. Resource management
  3. File management
  4. I/O management
  5. Interrupt management
  6. Utility software
  7. Security
  8. User interface
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Name the 3 techniques used by the OS to ensure memory is shared effectively by programs

A
  1. Paging
  2. Segmentation
  3. Virtual memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe how paging works

A
  1. Memory split up into equal-sized sections (pages)

2. Pages swapped between main memory and hard disk as needed

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

Describe how segmentation works

A
  1. Memory split up into logical sized divisions (segments)
  2. Segments vary in size
  3. Segments represent structure and logical flow of program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe how virtual memory works

A
  1. A section of hard drive acts as RAM when space in main memory is insufficient
  2. Sections of programs not currently being used are temporarily moved to virtual memory through paging
  3. This 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

Define the term disk thrashing

A

A disadvantage of virtual memory when the computer freezes due to pages being swapped too frequently between hard disk and main memory

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

Define the term interrupt

A

Signals generated by software or hardware to indicate to processor that a process needs attention

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

What is considered when allocating processor time?

A

The interrupt’s priority

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

Where are interrupts stored?

A

Within an abstract data structure called a priority queue in an interrupt register

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

What is an ISR (Interrupt Service Routine)?

A

A software process invoked by an interrupt request

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

Describe what happens when an interrupt exists with a higher priority to the current process

A
  1. Current contents of registers in CPU are transferred into stack
  2. Relevant ISR is loaded into RAM
  3. Flag is set to signal ISR has begun
  4. Flag is reset once ISR has finished
  5. Process is repeated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Describe what happens when there are no interrupts with a higher priority to the current process

A
  1. Contents of stack are put back into registers

2. FDE cycle resumes

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

What is scheduling?

A

How the OS ensures all sections of programs being run (jobs) receive a fair amount of processing time

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

What is a preemptive scheduling algorithm?

A

When jobs are actively made to start and stop by the OS

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

What is a non-preemptive scheduling algorithm?

A

Once a job is started, it is left alone until it is completed

17
Q

Name the 3 examples of preemptive scheduling algorithms

A
  1. Multilevel Feedback Queues
  2. Shortest Remaining Time
  3. Round Robin
18
Q

Name the 2 examples of non-preemptive scheduling algorithms

A
  1. First Come First Served

2. Shortest Job First

19
Q

Describe how round robin works

A
  1. Each job is given a section of processor time (time slice) within which it runs
  2. Once each job in queue has used its first time slice, they are given another slice of processor time until a job is completed
  3. Completed jobs are removed from queue
20
Q

What is the advantage of round robin?

A

All jobs will eventually be attended to

21
Q

What are the 2 disadvantages of round robin?

A
  1. Longer jobs take much longer time for completion

2. Does not account for job priority or urgency

22
Q

Describe how first come first served works

A

Jobs processed in chronological order by which they entered queue

23
Q

What is the advantage of first come first served?

A

Straightforward to implement

24
Q

What is the disadvantage of first come first served?

A

Does not account for job priority or urgency

25
Q

Describe how multilevel feedback queues work

A

Makes use of multiple queues, each ordered based on different priority

26
Q

What is the advantage of multilevel feedback queues?

A

Takes into consideration different job priorities

27
Q

What is the disadvantage of multilevel feedback queues?

A

Difficult to implement

28
Q

Describe how shortest job first works

A

The queue storing jobs to be processed is ordered according to time required for completion so longest jobs are serviced at the end

29
Q

What is the advantage of shortest job first?

A

Suited to batch systems since waiting time is reduced

30
Q

What are the disadvantages of shortest job first?

A
  1. Requires processor to calculate how long each job will take
  2. Processor starvation if short jobs are continuously added to queue
  3. Does not account for job priority or urgency
31
Q

Define the term processor starvation

A

When a particular process does not receive enough processor time to execute and be completed

32
Q

Describe how shortest remaining time works

A

Queue storing jobs to be processed us ordered according to time left for completion so jobs with least time left are serviced first

33
Q

What is the advantage of shortest remaining time?

A

Throughput is increased as shorter processes can be quickly completed

34
Q

What are the disadvantages of shortest remaining time?

A
  1. Processor starvation if short jobs are continuously added to queue
  2. Does not account for job priority or urgency