Chapter 5 CPU Scheduling Questions

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

9. Scheduling is done so as to : a) increase CPU utilization b) decrease CPU utilization c) keep the CPU more idle d) None of the mentioned

increase CPU utilization

10. Scheduling is done so as to : a) increase the throughput b) decrease the throughput c) increase the duration of a specific amount of work d) None of the mentioned

increase the throughput

8. 'Aging' is : a) keeping track of cache contents b) keeping track of what pages are currently residing in memory c) keeping track of how many times a given page is referenced d) increasing the priority of jobs to ensure termination in a finite time

increasing the priority of jobs to ensure termination in a finite time

7. One of the disadvantages of the priority scheduling algorithm is that : a) it schedules in a very complex manner b) its scheduling takes up a lot of time c) it can lead to some low priority process waiting indefinitely for the CPU d) none of the mentioned

it can lead to some low priority process waiting indefinitely for the CPU

2. The real difficulty with SJF in short term scheduling is : a) it is too good an algorithm b) knowing the length of the next CPU request c) it is too complex to understand d) none of the mentioned

knowing the length of the next CPU request

4. An I/O bound program will typically have : a) a few very short CPU bursts b) many very short I/O bursts c) many very short CPU bursts d) a few very short I/O bursts

many very short CPU bursts

3. The interval from the time of submission of a process to the time of completion is termed as a) waiting time b) turnaround time c) response time d) throughput

turnaround time

10. Which one of the following can not be scheduled by the kernel? a) kernel level thread b) user level thread c) process d) none of the mentioned

user level thread

11. Which of the following scheduling algorithms gives minimum average waiting time ? a) FCFS b) SJF c) Round - robin d) Priority

SJF

1. The most optimal scheduling algorithm is : a) FCFS - First come First served b) SJF - Shortest Job First c) RR - Round Robin d) None of the mentioned

SJF - Shortest Job First

6. In the following cases non - preemptive scheduling occurs : a) When a process switches from the running state to the ready state b) When a process goes from the running state to the waiting state c) When a process switches from the waiting state to the ready state d) All of the mentioned

When a process goes from the running state to the waiting state

9. In multilevel feedback scheduling algorithm a) a process can move to a different classified ready queue b) classification of ready queue is permanent c) processes are not classified into groups d) none of the mentioned

a process can move to a different classified ready queue

10. Which of the following statements are true ? (GATE 2010) i) Shortest remaining time first scheduling may cause starvation ii) Preemptive scheduling may cause starvation iii) Round robin is better than FCFS in terns of response time a) i only b) i and iii only c) ii and iii only d) i, ii and iii

i, ii and iii

The computation for the next predicted CPU burst duration of a process in the exponential averaging formula for Shortest Job First algorithm requires at most how many arithmetic operations after the scheduler is initialized?

1 addition and 2 multiplications

9. A solution to the problem of indefinite blockage of low - priority processes is : a) Starvation b) Wait queue c) Ready queue d) Aging

Aging

The Examples of the FCFS,SJF, and Round Robin CPU processing algorithms have been compared in lectures using which process related metric?

Average Waiting Time in the Ready Queue

The weakness of the Preliminary Peterson Algorithm 2 for Mutual Exclusion is:

Both threads may be in their critical sections at the same time

The weakness of the Preliminary Peterson Algorithm 1 for Mutual Exclusion is:

Both threads must strictly alternate with each other in entering their critical sections.

3. The two steps of a process execution are : a) I/O & OS Burst b) CPU & I/O Burst c) Memory & I/O Burst d) OS & Memory Burst

CPU & I/O Burst

5. In priority scheduling algorithm a) CPU is allocated to the process with highest priority b) CPU is allocated to the process with lowest priority c) Equal priority processes can not be scheduled d) None of the mentioned

CPU is allocated to the process with highest priority

A(n)___ refers to where a process is accessing/updating shared data

Critical Section

The weakness of the Preliminary Peterson Algorithm 3 for Mutual Exclusion is:

Deadlock

Preliminary Peterson Algorithms 2 and 3 for Mutual Exclusion were shown in the lectures to fail by preemption in which code section:

Entry

The weakness of the Preliminary Peterson Algorithm 4 for Mutual Exclusion is:

Indefinite Postponement

A counting semaphore__.

is essentially an integer variable

In Petersons Solution, the ___variables indicates if a process is ready to enter its critical section

flag[]

7. Time quantum is defined in a) shortest job scheduling algorithm b) round robin scheduling algorithm c) priority scheduling algorithm d) multilevel queue scheduling algorithm

round robin scheduling algorithm

8. There are 10 different processes running on a workstation. Idle processes are waiting for an input event in the input queue. Busy processes are scheduled with the Round-Robin timesharing method. Which out of the following quantum times is the best value for small response times, if the processes have a short runtime, e.g. less than 10ms ? a) tQ = 15ms b) tQ = 40ms c) tQ = 45ms d) tQ = 50ms

tQ = 15ms

6. An SJF algorithm is simply a priority algorithm where the priority is : a) the predicted next CPU burst b) the inverse of the predicted next CPU burst c) the current CPU burst d) anything the user wants

the predicted next CPU burst

8. Dispatch latency is : a) the speed of dispatching a process from running to the ready state b) the time of dispatching a process from running to ready state and keeping the CPU idle c) the time to stop one process and start running another one d) none of the mentioned

the time to stop one process and start running another one

11. Turnaround time is : a) the total waiting time for a process to finish execution b) the total time spent in the ready queue c) the total time spent in the running queue d) the total time from the completion till the submission of a process

the total time from the completion till the submission of a process

13. Waiting time is : a) the total time in the blocked and waiting queues b) the total time spent in the ready queue c) the total time spent in the running queue d) the total time from the completion till the submission of a process

the total time spent in the ready queue

2. With multiprogramming, ______ is used productively. a) time b) space c) money d) all of the mentioned

time

The portion of code in a program in which we do not access shared data is known as the:

Remainder section

6. The strategy of making processes that are logically runnable to be temporarily suspended is called : a) Non preemptive scheduling b) Preemptive scheduling c) Shortest job first d) First come First served

Preemptive scheduling

User thread scheduling under process contention scope is usually handled by which scheduling algorithm?

Priority-scheduling

When used with a very large time quantum, the Round Robin Scheduler will behave like which scheduling algorithm?

First Come First Serve

12. Which of the following statements are true ? (GATE 2010) I. Shortest remaining time first scheduling may cause starvation II. Preemptive scheduling may cause starvation III. Round robin is better than FCFS in terms of response time a) I only b) I and III only c) II and III only d) I, II and III

I, II and III

Choose the item which best describes the non-preemptive scheduling approach.

Once a user process gets the CPU, it keeps running until either it terminates, or it issues a blocking I/O request, or it has to wait for a child process to terminate.

PCS vs SCS

PCS scheduling is done local to the process. It is how the thread library schedules threads onto available LWPs. SCS scheduling is the situation where the operating system schedules kernel threads. On systems using either many-to-one or many-to-many, the two scheduling models are fundamentally different. On systems using one-to-one, PCS and SCS are the same

Round Robin is a type of scheduling algorithm which is best described by which item?

Preemptive only

1. Round robin scheduling falls under the category of : a) Non preemptive scheduling b) Preemptive scheduling c) All of the mentioned d) None of the mentioned

Preemptive scheduling

5. Preemptive Shortest Job First scheduling is sometimes called : a) Fast SJF scheduling b) EDF scheduling - Earliest Deadline First c) HRRN scheduling - Highest Response Ratio Next d) SRTN scheduling - Shortest Remaining Time Next

SRTN scheduling - Shortest Remaining Time Next

11. Under multiprogramming, turnaround time for short jobs is usually ________ and that for long jobs is slightly ___________ a) Lengthened; Shortened b) Shortened; Lengthened c) Shortened; Shortened d) Shortened; Unchanged

Shortened; Lengthened

10. Which of the following algorithms tends to minimize the process flow time ? a) First come First served b) Shortest Job First c) Earliest Deadline First d) Longest Job First

Shortest Job First

The CPU scheduling algorithm that estimates the next CPU burst duration by considering an average of prior actual burst durations is

Shortest remaining time first

The designer of a CPU scheduling algorithm is primarily concerned with minimizing which component of the process turnaround time?

The time spent waiting in the ready queue

4. Consider the following set of processes, the length of the CPU burst time given in milliseconds : Process Burst time P1 6 P2 8 P3 7 P4 3 Assuming the above process being scheduled with the SJF scheduling algorithm : a) The waiting time for process P1 is 3ms b) The waiting time for process P1 is 0ms c) The waiting time for process P1 is 16ms d) The waiting time for process P1 is 9ms

The waiting time for process P1 is 3ms

The round robin scheduling algorithm is utilized within the priority scheduling algorithm for which reason?

To have a tie-breaker rule for handling multiple processes with the same priority

What is the correct order of operations for protecting a critical section using mutex locks?

acquire followed by release()

7. The switching of the CPU from one process or thread to another is called : a) process switch b) task switch c) context switch d) all of the mentioned

all of the mentioned

7. Scheduling is : a) allowing a job to use the processor b) making proper use of processor c) all of the mentioned d) none of the mentioned

allowing a job to use the processor

4. Complex scheduling algorithms : a) are very appropriate for very large computers b) use minimal resources c) use many resources d) all of the mentioned

are very appropriate for very large computers

3. The portion of the process scheduler in an operating system that dispatches processes is concerned with : a) assigning ready processes to CPU b) assigning ready processes to waiting queue c) assigning running processes to blocked queue d) all of the mentioned

assigning ready processes to CPU

6. In priority scheduling algorithm, when a process arrives at the ready queue, its priority is compared with the priority of a) all process b) currently running process c) parent process d) init process

currently running process

12. Scheduling is done so as to : a) increase the turnaround time b) decrease the turnaround time c) keep the turnaround time same d) there is no relation between scheduling and turnaround time

decrease the turnaround time

14. Scheduling is done so as to : a) increase the waiting time b) keep the waiting time the same c) decrease the waiting time d) none of the mentioned

decrease the waiting time

1. Which module gives control of the CPU to the process selected by the short-term scheduler? a) dispatcher b) interrupt c) scheduler d) none of the mentioned

dispatcher

An operation that executes atomically___.

executes as a single ,uninterruptible(non-preemptive) unit

9. Orders are processed in the sequence they arrive if _______ rule sequences the jobs. a) earliest due date b) slack time remaining c) first come, first served d) critical ratio

first come, first served

5. The FIFO algorithm : a) first executes the job that came in last in the queue b) first executes the job that came in first in the queue c) first executes the job that needs minimal processor d) first executes the job that has maximum processor needs

first executes the job that came in first in the queue

4. Which scheduling algorithm allocates the CPU first to the process that requests the CPU first? a) first-come, first-served scheduling b) shortest job scheduling c) priority scheduling d) none of the mentioned

first-come, first-served scheduling

8. Process are classified into different groups in a) shortest job scheduling algorithm b) round robin scheduling algorithm c) priority scheduling algorithm d) multilevel queue scheduling algorithm

multilevel queue scheduling algorithm

1. CPU scheduling is the basis of ___________ a) multiprocessor systems b) multiprogramming operating systems c) larger memory sized systems d) none of the mentioned

multiprogramming operating systems

3. The FCFS algorithm is particularly troublesome for ____________ a) time sharing systems b) multiprogramming systems c) multiprocessor systems d) operating systems

multiprogramming systems

2. The processes that are residing in main memory and are ready and waiting to execute are kept on a list called a) job queue b) ready queue c) execution queue d) process queue

ready queue

5. A process is selected from the ______ queue by the ________ scheduler, to be executed. a) blocked, short term b) wait, long term c) ready, short term d) ready, long term

ready, short term

15. Response time is : a) the total time taken from the submission time till the completion time b) the total time taken from the submission time till the first response is produced c) the total time taken from submission time till the response is output d) none of the mentioned

the total time taken from the submission time till the first response is produced

2. With round robin scheduling algorithm in a time shared system, a) using very large time slices converts it into First come First served scheduling algorithm b) using very small time slices converts it into First come First served scheduling algorithm c) using extremely small time slices increases performance d) using very small time slices converts it into Shortest Job First algorithm

using very large time slices converts it into First come First served scheduling algorithm

Deadlock in the Dining-Philosophers problem can occur in which situations?

• all philosophers pick up left chopstick • all philosophers pick up right chopstick

Which items are objectives to be considered in designing a CPU scheduling algorithm?

→ Keep hardware resources busy →No process should be indefinitely postponed →Minimize CPU overhead

Features of the multilevel feedback queue include the following items:

→Dynamic process priorities →Adaptive process scheduling through learning about each process' behavior →Multiple scheduling algorithms →Process upgrade and demotion strategies

Choose all items which are considerations in choosing a scheduling algorithm as discussed in lectures

→Fairness →Overhead(per process) →Algorithmic Complexity

Adaptive process scheduling through learning about each process' behavior

→Process upgrade and demotion strategies →Dynamic process priorities

Scheduling algorithms which employ a preemptive scheduling approach include:

→Shortest remaining time first →Priority → Round Robin

Load balancing by migrating a thread from its current CPU core to an underutilized CPU core may introduce issues given in which items?

→The load balancing algorithm may contradict the goals of the CPU scheduling algorithm utilized on the CPU cores. →Cache has to be updated on the underutilized CPU core

When does a non-prememtive scheduling algorithm have to choose the next process to assign to the run state?

→When a process switches to the Terminated state →When a process switches from the Running State to the waiting state


Set pelajaran terkait

ATMO 201 EXAM 1 STUDY FLASH CARDS

View Set

informal ways to ask "How are you?" and answer it.

View Set

Give Me Liberty - Reconstruction

View Set

What was the underlying cause of WW1

View Set

12.13.T - Quiz 9: Government Spending and Services

View Set

The Paralegal Professional (5th edition) (Intro to Paralegal Profession) flash cards

View Set

Chapter 1 Quiz-Supervisory Management

View Set

MECH REVIEW MIDTERM Manual Mills 201 and Mills Operation 251 and Manual Mill setup 221

View Set