Chapter 15 Flashcards

1
Q

What is SJF

A

Shortest job first is a scheduling algorithm in which the process with the smallest execution time is selected for execution next. Shortest job first can be either preemptive or non-preemptive.

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

What are 2 versions of SJF

A

preemptive

non-preemptive

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

What is preemptive and non-preemptive version of SJF

A

Tasks are usually assigned with priorities. At times it is necessary to run a certain task that has a higher priority before another task although it is running. Therefore, the running task is interrupted for some time and resumed later when the priority task has finished its execution. This is called preemptive scheduling.
Eg: Round robin

In non-preemptive scheduling, a running task is executed till completion. It cannot be interrupted.
Eg First In First Out

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

Which is optimal non-preemptive scheduler

A

SJF is optimal scheduling algorithm and no scheduler gives such good performance.

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

What is CPU burst time and CPU burst

A

While scheduling, each process gets to use the CPU for it’s slice. The slice that it gets, is called the CPU burst. In simple terms, the duration for which a process gets control of the CPU is the CPU burst time, and the concept of gaining control of the CPU is the CPU burst.

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

Does Preemptive SJF also called Shortest remaining time first (SRTF)

A

Yes

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

What is arrival time

A

Time at which the process arrives in the ready queue.

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

What is exponential averaging

A

We can not know exactly the length of next CPU burst. We can only estimate the length of next CPU burst. It can only be done by using the length of previous CPU bursts using the exponential averaging.

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

Does a process can have multiple CPU burst in its life time

A

Yes

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

What is priority scheduling algorithm

A

Priority scheduling algorithm is used in a system when every process is assigned a priority. A priority number(integer) is associated with each process. Its a rule the smaller the number of priority has the highest priority.

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

What is starvation problem

A

If there is high priority process use to come in system then low priority process will not get chance to proceed. It is called starvation problem.

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

What is solution of starvation problem

A

Aging. As time progress increases the priority of task increases. Example of a shop keeper. Old customer waiting in queue will get high priority because he is waiting for sometime.

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

What about task have 0 priority

A

It has highest priority

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