review questions on chapter iii—scheduling cosc 4330/6310 summer 2013

Post on 02-Jan-2016

216 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Review Questions onReview Questions onChapter III—Scheduling Chapter III—Scheduling

COSC 4330/6310COSC 4330/6310

Summer 2013Summer 2013

First QuestionFirst Question

In the Round Robin policy, what the In the Round Robin policy, what the advantages and disadvantages of advantages and disadvantages of selecting a small time quantum? selecting a small time quantum? (2×5 points)(2×5 points)

First QuestionFirst Question

In the Round Robin policy, what the In the Round Robin policy, what the advantages and disadvantages of advantages and disadvantages of selecting a small time quantum? selecting a small time quantum? (2×5 points)(2×5 points)

The main advantage of small time The main advantage of small time slices is a faster response time for slices is a faster response time for interactive requestsinteractive requests

First QuestionFirst Question

In the Round Robin policy, what the In the Round Robin policy, what the advantages and disadvantages of advantages and disadvantages of selecting a small time quantum? selecting a small time quantum? (2×5 points)(2×5 points)

The main advantage of small time The main advantage of small time slices is a faster response time for slices is a faster response time for interactive requestsinteractive requests

Their main disadvantage is too much Their main disadvantage is too much CPU time taken by context switchesCPU time taken by context switches

Second QuestionSecond Question

Consider the following set of parameters for Consider the following set of parameters for a System V Release 4 scheduler with four a System V Release 4 scheduler with four priority levels:priority levels:

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

800 X 1 1000 1 # 0800 X 1 1000 1 # 0

400 0 2 1000 2 # 1400 0 2 1000 2 # 1

200 1 3 200 3 # 2200 1 3 200 3 # 2

100 2 Y 200 3 # 3100 2 Y 200 3 # 3

Which are the sole reasonable values for X Which are the sole reasonable values for X and Y? and Y?

• X=__ and Y= __X=__ and Y= __

Second QuestionSecond Question

Consider the following set of parameters for Consider the following set of parameters for a System V Release 4 scheduler with four a System V Release 4 scheduler with four priority levels:priority levels:

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

800 X 1 1000 1 # 0800 X 1 1000 1 # 0

400 0 2 1000 2 # 1400 0 2 1000 2 # 1

200 1 3 200 3 # 2200 1 3 200 3 # 2

100 2 Y 200 3 # 3100 2 Y 200 3 # 3

Which are the sole reasonable values for X Which are the sole reasonable values for X and Y? and Y?

• X=_X=_00_ and Y= ___ and Y= __

Second QuestionSecond Question

Consider the following set of parameters for Consider the following set of parameters for a System V Release 4 scheduler with four a System V Release 4 scheduler with four priority levels:priority levels:

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

800 X 1 1000 1 # 0800 X 1 1000 1 # 0

400 0 2 1000 2 # 1400 0 2 1000 2 # 1

200 1 3 200 3 # 2200 1 3 200 3 # 2

100 2 Y 200 3 # 3100 2 Y 200 3 # 3

Which are the sole reasonable values for X Which are the sole reasonable values for X and Y? and Y?

• X=_X=_00_ and Y= __ and Y= _33__

Third QuestionThird Question

Consider the following System V Release Consider the following System V Release 4 scheduler:4 scheduler:

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

800 0 1 16000 0 # 0800 0 1 16000 0 # 0

400 0 2 8000 2 # 1400 0 2 8000 2 # 1

200 2 3 4000 3 # 2200 2 3 4000 3 # 2

100 2 4 2000 4 # 3100 2 4 2000 4 # 3

and identify the four incorrect parameters: and identify the four incorrect parameters: (4×5 points)(4×5 points)

Third QuestionThird Question

Consider the following System V Release Consider the following System V Release 4 scheduler:4 scheduler:

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

800 0 1 16000 0 # 0800 0 1 16000 0 # 0

400 0 2 8000 2 # 1400 0 2 8000 2 # 1

200 200 2 2 3 4000 3 # 2 3 4000 3 # 2

100 2 4 2000 4 # 3100 2 4 2000 4 # 3

and identify the four incorrect parameters: and identify the four incorrect parameters: (4×5 points)(4×5 points)

Third QuestionThird Question

Consider the following System V Release Consider the following System V Release 4 scheduler:4 scheduler:

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

800 0 1 16000 0 # 0800 0 1 16000 0 # 0

400 0 2 8000 2 # 1400 0 2 8000 2 # 1

200 200 2 2 3 4000 3 # 2 3 4000 3 # 2

100 2 4 2000 4 # 3100 2 4 2000 4 # 3

and identify the four incorrect parameters: and identify the four incorrect parameters: (4×5 points)(4×5 points)

Third QuestionThird Question

Consider the following System V Release Consider the following System V Release 4 scheduler:4 scheduler:

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

800 0 1 16000 0 # 0800 0 1 16000 0 # 0

400 0 2 8000 2 # 1400 0 2 8000 2 # 1

200 200 2 2 3 4000 3 # 2 3 4000 3 # 2

100 2 4 2000 4 # 3100 2 4 2000 4 # 3

and identify the four incorrect parameters: and identify the four incorrect parameters: (4×5 points)(4×5 points)

Third QuestionThird Question

Consider the following System V Release Consider the following System V Release 4 scheduler:4 scheduler:

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

800 0 1 16000 0 # 0800 0 1 16000 0 # 0

400 0 2 8000 2 # 1400 0 2 8000 2 # 1

200 200 2 2 3 4000 3 # 2 3 4000 3 # 2

100 2 4 2000 4 # 3100 2 4 2000 4 # 3

and identify the four incorrect parameters: and identify the four incorrect parameters: (4×5 points)(4×5 points)

Fourth QuestionFourth Question

Consider the following System V Release Consider the following System V Release 4 scheduler: (3×5 points)4 scheduler: (3×5 points)

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL #ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

1000 0 1 16000 1 # 01000 0 1 16000 1 # 0

500 1 2 8000 2 # 1500 1 2 8000 2 # 1

200 1 3 4000 3 # 2200 1 3 4000 3 # 2

100 2 3 2000 3 # 3100 2 3 2000 3 # 3

Which events can Which events can increaincreasese the priority the priority of a process at level 2? of a process at level 2?

Which events can Which events can lowerlower it? it?

Fourth QuestionFourth Question

Consider the following System V Consider the following System V Release 4 scheduler: (3×5 points)Release 4 scheduler: (3×5 points)

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL #ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

1000 0 1 16000 1 # 01000 0 1 16000 1 # 0

500 1 2 8000 2 # 1500 1 2 8000 2 # 1

200 1 3 4000 3 # 2200 1 3 4000 3 # 2

100 2 3 2000 3 # 3100 2 3 2000 3 # 3

A return from the wait state or a long A return from the wait state or a long wait in the ready queue will increase wait in the ready queue will increase the priority of a processthe priority of a process

Fourth QuestionFourth Question

Consider the following System V Release 4 Consider the following System V Release 4 scheduler: (3×5 points)scheduler: (3×5 points)

#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL #ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL

1000 0 1 16000 1 # 01000 0 1 16000 1 # 0

500 1 2 8000 2 # 1500 1 2 8000 2 # 1

200 1 3 4000 3 # 2200 1 3 4000 3 # 2

100 2 3 2000 3 # 3100 2 3 2000 3 # 3

A return from the wait state or a long wait in A return from the wait state or a long wait in the ready queue will increase the priority of the ready queue will increase the priority of a processa process

A CPU timer interrupt will decrease itA CPU timer interrupt will decrease it

Short QuestionsShort Questions

What is the major limitation of theWhat is the major limitation of the round-round-robinrobin scheduling policy? scheduling policy?

Short QuestionsShort Questions

What is the major limitation of theWhat is the major limitation of the round-round-robinrobin scheduling policy? scheduling policy?

RR cannot provide at the same time a RR cannot provide at the same time a good interactive response time and a good interactive response time and a good throughput at medium to heavy good throughput at medium to heavy loadload

Short QuestionsShort Questions

What is the main advantage of What is the main advantage of preemptive schedulerspreemptive schedulers over non-over non-preemptive ones? preemptive ones?

Short QuestionsShort Questions

What is the main advantage of What is the main advantage of preemptive schedulerspreemptive schedulers over non-over non-preemptive ones?preemptive ones?

Scheduler can take CPU way from Scheduler can take CPU way from processes "monopolizing" the CPUprocesses "monopolizing" the CPU

• Other processes do not have to wait Other processes do not have to wait as longas long

Short QuestionsShort Questions

What do schedulers typically do to What do schedulers typically do to increase the priorities of I/O-bound increase the priorities of I/O-bound processes? processes?

Short QuestionsShort Questions

What do schedulers typically do to What do schedulers typically do to increase the priorities of I/O-bound increase the priorities of I/O-bound processes?processes?

They increase the priorities of They increase the priorities of processes returning to the ready queue processes returning to the ready queue from the wait statefrom the wait state

• Very likely to have performed an I/O Very likely to have performed an I/O

Short QuestionsShort Questions

What do schedulers typically do to lower What do schedulers typically do to lower the priorities of CPU-bound processes? the priorities of CPU-bound processes?

Short QuestionsShort Questions

What do schedulers typically do to lower What do schedulers typically do to lower the priorities of CPU-bound processes?the priorities of CPU-bound processes?

They decrease the priority of They decrease the priority of processes who have been preempted processes who have been preempted because they have exhausted their because they have exhausted their CPU time sliceCPU time slice

True or FalseTrue or False

The Round-Robin scheduling algorithm The Round-Robin scheduling algorithm does not differentiate between CPU-does not differentiate between CPU-bound and I/O-bound processes. bound and I/O-bound processes.

True or FalseTrue or False

The Round-Robin scheduling algorithm The Round-Robin scheduling algorithm does not differentiate between CPU-does not differentiate between CPU-bound and I/O-bound processes. bound and I/O-bound processes.

TRUE because all processes have the TRUE because all processes have the same priority same priority

True or FalseTrue or False

The Round-Robin scheduling algorithm The Round-Robin scheduling algorithm is is starvation-freestarvation-free. .

True or FalseTrue or False

The Round-Robin scheduling algorithm The Round-Robin scheduling algorithm is is starvation-freestarvation-free..

TRUE because all processes have the TRUE because all processes have the same priority same priority

True or FalseTrue or False

Most schedulers adjust the priorities of Most schedulers adjust the priorities of real-time processesreal-time processes in order to give in order to give each process its each process its fair sharefair share of the CPU. of the CPU.

True or FalseTrue or False

Most schedulers adjust the priorities of Most schedulers adjust the priorities of real-time processesreal-time processes in order to give in order to give each process its each process its fair sharefair share of the CPU. of the CPU.

FALSE, the schedulers we have FALSE, the schedulers we have discussed assign fixed priorities to discussed assign fixed priorities to real-time processes real-time processes

True or FalseTrue or False

Steps taken to decrease the Steps taken to decrease the response response timetime of a system can sometimes of a system can sometimes decrease its decrease its throughput.throughput.

True or FalseTrue or False

Steps taken to decrease the Steps taken to decrease the response response timetime of a system can sometimes of a system can sometimes decrease its decrease its throughput.throughput.

TRUE, think of the round-robin policyTRUE, think of the round-robin policy

True or FalseTrue or False

All preemptive policies have multiple All preemptive policies have multiple priority levels. priority levels.

True or FalseTrue or False

All preemptive policies have multiple All preemptive policies have multiple priority levels. priority levels.

TRUE, think of the round-robin policyTRUE, think of the round-robin policy

True or FalseTrue or False

The throughput of a computer using a The throughput of a computer using a round-robin scheduling policy often goes round-robin scheduling policy often goes down when the number of users goes down when the number of users goes up. up.

True or FalseTrue or False

The throughput of a computer using a The throughput of a computer using a round-robin scheduling policy often goes round-robin scheduling policy often goes down when the number of users goes down when the number of users goes up. . up. .

TRUE because the context switch TRUE because the context switch overhead is likely to increaseoverhead is likely to increase

top related