Lecture 5 Flashcards

1
Q

What is context switching?

A

In a single‐processor, multi‐processing systems, processes time‐share the CPU resources, called context switching

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

What is a CPU schedular?

A

A CPU Schedular (e.g. Short‐term Schedular) fetches processes from Ready‐Queue and allocates

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

What is the aim of processor scheduling?

A

Aim is to assign processes to be executed by the processor in a way that meets system objectives, such as response time, throughput, and processor efficiency

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

What are the 3 different types of processor scheduling?

A

Long term scheduling

Medium term scheduling

Short term scheduling

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

What does the Long-term schedular do?

A

Determines which programs are admitted to the system for processing

Controls the degree of multi-programming

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

What does the Medium-Term Scheduling do?

A

Part of the swapping function
• Swapping-in decisions are based on the need to
manage the degree of multi-programming
• Considers the memory requirements of the
swapped-out processes

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

What does the short-Term Scheduling do?

A
  • Known as the dispatcher
  • Executes most frequently
  • Makes the fine-grained decision of which process to execute next
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the short term scheduling criteria for User-oriented?

A

Response time in an interactive system

Relate to other behaviour of the system as perceived
by the individual user or process

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

What is the short term scheduling criteria for System-oriented?

A

Performance: Focus is on effective and efficient utilization of the processor (rate at which processes
are completed)
 Minor importance on single-user systems

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

What is nonpreemptive in Decision mode?

A

Nonpreemptive

• Once a process is in the running state, it will continue until it terminates or blocks itself for I/O

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

Name 6 Scheduling algorithms

A
First-Come-First -Serve(FIFO)
Shortest job first
PRIOIRTY scheduling
Shortest remaining time
Round robin
Multi queue scheduling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Preemptive in Decision mode?

A

Currently running process may be interrupted and moved to ready state by the OS

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

What is the First-Come-First-Served (FCFS) algorithm?

A

FIFO(queue)

The process that has been in the ready queue the longest is selected for running

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

Some principles of the FCFS Algorithm?

A

Performs much better for long processes than short ones

Tends to favour processor-bound processes over I/O bound processes

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

What is the shortest job first Algorithm?

A
  • A short process will jump to the head of the queue

* Possibility of starvation for longer processes

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

2 Cons of Shortest job first Algorithm?

A

One difficulty is the need to know, or at least estimate, the required processing time of each process

If the programmer’s estimate is substantially under the actual running time, the system may abort the job

17
Q

What is the priority Scheduling Algorithm?

A

Always the process with the highest priority is being executed first

Uses one queue for each priority level.

18
Q

Cons of Priority Scheduling algorithm?

A

• Problem: Indefinite blocking or starvation
 A PS algorithm can leave some low-priority processes waiting indefinitely
 Low priority processes may wait too long to run on lightly loaded time,
 In a heavenly loaded system low-priority processes may never run due to system crash.

19
Q

What is the solution to the problems with Priority scheduling?

A

Solution: Aging

20
Q

What is the shortest remaining time first Algorithm?

A

Scheduler always chooses the process that has the shortest expected remaining processing time

21
Q

Con of Shortest remaining time first algorithm?

A

Risk of starvation of longer processes

22
Q

What is the round robin Algorithm?

A

Uses preemption based on a clock

• Also known as time slicing because each process is given a slice of time before being preempted

23
Q

1 advantage of round robin algorithm?

A

Particularly effective in a general-purpose time-sharing

system or transaction processing system

24
Q

1 con of Round Robin algorithm

A

Its relative treatment of processor-bound and I/O-bound processes

25
Q

What is Rate‐Monotonic Scheduling (RMS) in terms of Real Time Scheduling?

A

More frequent tasks are given higher priority

26
Q

What is Earliest Deadline First Scheduling (EDF) in terms of Real Time Scheduling?

A

Task with earliest deadline gets higher priority

27
Q

What is traditional UNIX Scheduling?

A
  • Designed to provide good response time for interactive users while ensuring that low-priority background jobs do not starve
  • Employs multilevel feedback using round robin within each of the priority queues