Deck 5: Cpu Scheduling
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/57
Play
Full screen (f)
Deck 5: Cpu Scheduling
1
The ready queue can be implemented as a _______________.
A) FIFO queue
B) priority queue
C) tree
D) unordered linked list
E) all of the above
A) FIFO queue
B) priority queue
C) tree
D) unordered linked list
E) all of the above
E
2
A significant problem with priority scheduling algorithms is _____.
A) complexity
B) starvation
C) determining the length of the next CPU burst
D) determining the length of the time quantum
A) complexity
B) starvation
C) determining the length of the next CPU burst
D) determining the length of the time quantum
B
3
If the time quantum get too large, RR scheduling degenerates to __________?
A) SJF
B) FCFS
C) Shortest-remaining-time-first
D) Multilevel queue
A) SJF
B) FCFS
C) Shortest-remaining-time-first
D) Multilevel queue
B
4
Which of the following scheduling algorithms gives the minimum average waiting time for a given set of processes?
A) SJF
B) FCFS
C) RR
D) Multilevel queue
A) SJF
B) FCFS
C) RR
D) Multilevel queue
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
5
Which of the following criteria is more important for an interactive system?
A) CPU utilization
B) Response time
C) Turnaround time
D) Throughput
A) CPU utilization
B) Response time
C) Turnaround time
D) Throughput
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
6
Assume process P0 and P1 are the process before and after a context switch, and PCB0 and PCB1 are respectively their process control block. Which of the following time units are included inside the dispatch latency?
A) P0 executing
B) save state into PCB0, and restore state from PCB1
C) P1 executing
D) all of the above
A) P0 executing
B) save state into PCB0, and restore state from PCB1
C) P1 executing
D) all of the above
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
7
Which of the following scheduling algorithms must be nonpreemptive?
A) SJF
B) RR
C) FCFS
D) priority algorithms
A) SJF
B) RR
C) FCFS
D) priority algorithms
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
8
For interactive systems, it is more important to minimize ________.
A) the average response time
B) the average turnaround time
C) the variance in response time
D) the waiting time
A) the average response time
B) the average turnaround time
C) the variance in response time
D) the waiting time
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
9
I/O-bound program typically has many short ______ and a CPU-bound program might have a few long __________.
A) I/O burst, CPU burst
B) I/O burst, I/O burst
C) CPU burst, CPU burst
D) CPU burst, I/O burst
A) I/O burst, CPU burst
B) I/O burst, I/O burst
C) CPU burst, CPU burst
D) CPU burst, I/O burst
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
10
Which of the following processes usually have highest priority?
A) real-time processes
B) system processes
C) interactive processes
D) batch processes
A) real-time processes
B) system processes
C) interactive processes
D) batch processes
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
11
Which of the following items does not belong to the function of a dispatcher?
A) switching context from one process to another
B) selecting a process among the available ones in the ready queue
C) switching to user mode
D) jumping to the proper location in the user program to resume that program
A) switching context from one process to another
B) selecting a process among the available ones in the ready queue
C) switching to user mode
D) jumping to the proper location in the user program to resume that program
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
12
Which of the following scheduling algorithm may suffer from convoy effect?
A) SJF
B) FCFS
C) RR
D) Multilevel queue
A) SJF
B) FCFS
C) RR
D) Multilevel queue
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
13
Which of the following scheduling algorithms gives the minimum average response time?
A) SJF
B) FCFS
C) RR
D) Multilevel queue
A) SJF
B) FCFS
C) RR
D) Multilevel queue
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
14
Which of the following is allowed on Linux and Mac OS X systems?
A) only PTHREAD_SCOPE_PROCESS
B) only PTHREAD_SCOPE_SYSTEM
C) Both PTHREAD_SCOPE_PROCESS and PTHREAD_SCOPE_SYSTEM
D) none of the above
A) only PTHREAD_SCOPE_PROCESS
B) only PTHREAD_SCOPE_SYSTEM
C) Both PTHREAD_SCOPE_PROCESS and PTHREAD_SCOPE_SYSTEM
D) none of the above
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
15
The ______ occurs in first-come-first-served scheduling when a process with a long CPU burst occupies the CPU.
A) dispatch latency
B) waiting time
C) convoy effect
D) system-contention scope
A) dispatch latency
B) waiting time
C) convoy effect
D) system-contention scope
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the following circumstances can preemptive scheduling take place?
A) when a process switches from the running state to the waiting state
B) when a process switches from the waiting state to the ready state
C) when a process terminates
D) none of the above
A) when a process switches from the running state to the waiting state
B) when a process switches from the waiting state to the ready state
C) when a process terminates
D) none of the above
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
17
Shortest-remaining-time-first scheduling is the preemptive version of __________?
A) SJF
B) FCFS
C) RR
D) Multilevel queue
A) SJF
B) FCFS
C) RR
D) Multilevel queue
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
18
Which of the following circumstances can cooperative scheduling take place?
A) when a process switches from the running state to the waiting state
B) when a process switches from the running state to the ready state
C) when a process switches from the waiting state to the ready state
D) none of the above
A) when a process switches from the running state to the waiting state
B) when a process switches from the running state to the ready state
C) when a process switches from the waiting state to the ready state
D) none of the above
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
19
Which of the following can be a solution to the problem of indefinite blockage of low-priority processes?
A) Aging
B) Starvation
C) Multilevel queue
D) All of the above
A) Aging
B) Starvation
C) Multilevel queue
D) All of the above
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
20
Which of the following criteria is more important from the point of view of a particular process?
A) CPU utilization
B) Response time
C) Turnaround time
D) Throughput
A) CPU utilization
B) Response time
C) Turnaround time
D) Throughput
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
21
What is the numeric priority of a Windows thread in the NORMAL_PRIORITY_CLASS with HIGHEST relative priority?
A) 24
B) 10
C) 8
D) 13
A) 24
B) 10
C) 8
D) 13
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
22
What is deterministic modeling and when is it useful in evaluating an algorithm?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
23
In RR scheduling, the time quantum should be small with respect to the context-switch time.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
24
Explain the difference between response time and turnaround time. These times are both used to measure the effectiveness of scheduling schemes.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
25
In Solaris, what is the time quantum (in milliseconds) of an interactive thread with priority 35?
A) 25
B) 54
C) 80
D) 35
A) 25
B) 54
C) 80
D) 35
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
26
What role does the dispatcher play in CPU scheduling?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
27
Explain the concept of a CPU-I/O burst cycle.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
28
In Solaris, if an interactive thread with priority 25 is waiting for I/O, what is its priority recalculated to when it is eligible to run again?
A) 15
B) 120
C) 52
D) It remains at 25
A) 15
B) 120
C) 52
D) It remains at 25
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
29
The Linux CFS scheduler identifies _____________ as the interval of time during which every runnable task should run at least once.
A) virtual run time
B) targeted latency
C) nice value
D) load balancing
A) virtual run time
B) targeted latency
C) nice value
D) load balancing
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
30
In Windows, how does the dispatcher determine the order of thread execution?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
31
Describe two general approaches to load balancing.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
32
Which of the following is preemptive?
A) rate-monotonic scheduling
B) earliest-deadline-first scheduling
C) both of the above
D) none of the above
A) rate-monotonic scheduling
B) earliest-deadline-first scheduling
C) both of the above
D) none of the above
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
33
Distinguish between coarse-grained and fine-grained multithreading.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
34
What is the numeric priority of a Windows thread in the BELOW_NORMAL_PRIORITY_CLASS with NORMAL relative priority?
A) 6
B) 7
C) 5
D) 8
A) 6
B) 7
C) 5
D) 8
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
35
Which of the following POSIX API sets the scheduling policy?
A) pthread_attr_getsched_policy
B) pthread_attr_setsched_policy
C) pthread_attr_getscope
D) pthread_attr_setscope
A) pthread_attr_getsched_policy
B) pthread_attr_setsched_policy
C) pthread_attr_getscope
D) pthread_attr_setscope
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
36
Explain the process of starvation and how aging can be used to prevent it.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
37
Explain the fundamental difference between asymmetric and symmetric multiprocessing.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
38
What effect does the size of the time quantum have on the performance of an RR algorithm?
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
39
The default scheduling class for a process in Solaris is ____.
A) time sharing
B) system
C) interactive
D) real-time
A) time sharing
B) system
C) interactive
D) real-time
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
40
Which of the following system architectures involves multiprocessor scheduling?
A) multicore CPUs
B) multithreaded cores
C) NUMA systems
D) heterogeneous multiprocessing
E) all of the above
A) multicore CPUs
B) multithreaded cores
C) NUMA systems
D) heterogeneous multiprocessing
E) all of the above
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
41
A Solaris interactive thread with priority 15 has a higher relative priority than an interactive thread with priority 20
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
42
In Pthread real-time scheduling, the SCHED_FIFO class provides time slicing among threads of equal priority.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
43
Load balancing is typically only necessary on systems with a common run queue.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
44
Windows 7 User-mode scheduling (UMS) allows applications to create and manage thread independently of the kernel
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
45
The Completely Fair Scheduler (CFS) is the default scheduler for Linux systems.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
46
In hard real-time systems, interrupt latency must be bounded.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
47
SMP systems that use multicore processors typically run faster than SMP systems that place each processor on separate cores.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
48
A multicore system allows two (or more) threads that are in compute cycles to execute at the same time.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
49
A Solaris interactive thread with a time quantum of 80 has a higher priority than an interactive thread with a time quantum of 120.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
50
Providing a preemptive, priority-based scheduler guarantees hard real-time functionality.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
51
Systems using a one-to-one model (such as Windows, Solaris , and Linux) schedule threads using process-contention scope (PCS).
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
52
The length of a time quantum assigned by the Linux CFS scheduler is dependent upon the relative priority of a task.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
53
Solaris and Windows assign higher-priority threads/tasks longer time quantums and lower-priority tasks shorter time quantums.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
54
The most complex scheduling algorithm is the multilevel feedback-queue algorithm.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
55
Round-robin (RR) scheduling degenerates to first-come-first-served (FCFS) scheduling if the time quantum is too long.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
56
In the Linux CFS scheduler, the task with smallest value of vruntime is considered to have the highest priority.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck
57
Load balancing algorithms have no impact on the benefits of processor affinity.
Unlock Deck
Unlock for access to all 57 flashcards in this deck.
Unlock Deck
k this deck