Real-Time Systems and Scheduling
- 63Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What distinguishes a real-time system's performance goal from that of a typical general-purpose system?
What distinguishes a real-time system's performance goal from that of a typical general-purpose system?
63 questions
- 1
What distinguishes a real-time system's performance goal from that of a typical general-purpose system?
- A
A real-time system prioritizes minimizing memory use, while a general-purpose system emphasizes minimizing individual response times.
- B
A real-time system prioritizes completing tasks as quickly as possible, while a general-purpose system emphasizes predictable completion times.
- C
A real-time system prioritizes maximizing average throughput, while a general-purpose system emphasizes meeting every task's deadline.
- D
A real-time system prioritizes meeting each task's timing constraints, while a general-purpose system often emphasizes average performance or throughput.
Correct answer
DA real-time system prioritizes meeting each task's timing constraints, while a general-purpose system often emphasizes average performance or throughput.
Explanation
Real-time performance is judged by whether individual deadlines are met; general-purpose systems commonly focus on average response time or throughput.
- A
- 2
Why is predictability not the same as high performance?
- A
A system is predictable if its average response time is low, even when individual response times vary widely.
- B
A system can have predictable execution times only when its average performance is lower than that of other systems.
- C
A system can complete work quickly on average but still have uncertain execution times that make deadline guarantees difficult.
- D
A system is predictable whenever its fastest tasks complete before their deadlines, regardless of its slowest tasks.
Correct answer
CA system can complete work quickly on average but still have uncertain execution times that make deadline guarantees difficult.
Explanation
Predictability concerns whether execution times and deadlines can be estimated or guaranteed. A system may be fast on average yet too variable to ensure deadlines.
- A
- 3
In a soft real-time system, what typically happens to a task's usefulness after its deadline is missed?
- A
Its usefulness diminishes as lateness increases, eventually reaching zero.
- B
Its usefulness immediately becomes negative because every late result causes a penalty.
- C
Its usefulness becomes zero at the deadline and stays zero even if the task finished on time.
- D
Its usefulness remains unchanged because deadlines are only advisory.
Correct answer
AIts usefulness diminishes as lateness increases, eventually reaching zero.
Explanation
In the described soft real-time model, completion by the deadline gives full value; after the deadline, value decreases and eventually reaches zero.
- A
- 4
What is the defining consequence of missing a firm real-time deadline?
- A
The task's value decreases gradually, but any late result still provides some benefit.
- B
The completed task provides no value, but missing the deadline is not described as causing a harmful penalty.
- C
The task's value becomes negative because missing the deadline causes a serious system hazard.
- D
The task continues to provide full value as long as it finishes before the next period.
Correct answer
BThe completed task provides no value, but missing the deadline is not described as causing a harmful penalty.
Explanation
A firm deadline marks the point after which the task's result has no value. This differs from soft deadlines, where value diminishes gradually, and hard deadlines, where missing one can have serious consequences.
- A
- 5
What makes a deadline hard in a hard real-time system?
- A
Meeting it requires every task to have the same execution time and period.
- B
Missing it makes the task's result worthless, but has no further consequence.
- C
Missing it causes the task's usefulness to decrease gradually but never become negative.
- D
Missing it can cause a serious negative consequence, rather than merely reducing the task's usefulness.
Correct answer
DMissing it can cause a serious negative consequence, rather than merely reducing the task's usefulness.
Explanation
Hard real-time systems associate missed deadlines with potentially serious harm or penalties, as in flight control or electronic engine control.
- A
- 6
Which example best illustrates a soft real-time requirement as described in the lecture?
- A
Cruise control should respond in time, but a missed deadline does not usually cause a catastrophic outcome.
- B
A computer simulation has no meaningful response-time expectations or deadlines.
- C
A user interface must never have a delayed response because any delay is catastrophic.
- D
Flight control must meet every deadline because a late result could endanger lives.
Correct answer
ACruise control should respond in time, but a missed deadline does not usually cause a catastrophic outcome.
Explanation
Cruise control was presented as a soft real-time example: responsiveness matters, but a missed deadline is not generally catastrophic.
- A
- 7
Why might a computer simulation be classified as non-real-time in the lecture's spectrum?
- A
It must always respond to external events with zero delay.
- B
It cannot be run on a system that uses an operating system.
- C
Its tasks always have hard deadlines but low execution times.
- D
It often lacks a strict deadline by which its result must be produced.
Correct answer
DIt often lacks a strict deadline by which its result must be produced.
Explanation
The lecture used scientific simulations as examples that often do not have hard timing requirements, placing them toward the non-real-time end of the spectrum.
- A
- 8
Why is an occasional delayed response in a user interface generally less severe than a missed deadline in flight control?
- A
A user interface is a hard real-time system, while flight control is a soft real-time system.
- B
User interfaces have no timing expectations, while flight-control systems do not use deadlines.
- C
User-interface tasks always have longer execution times, while flight-control tasks always have shorter ones.
- D
A user-interface delay may reduce responsiveness, while a late flight-control action may have life-threatening consequences.
Correct answer
DA user-interface delay may reduce responsiveness, while a late flight-control action may have life-threatening consequences.
Explanation
The consequences of lateness determine the severity: occasional interface delays are usually tolerable, whereas late flight-control actions may endanger lives.
- A
- 9
How should a system that lies between soft and hard real-time systems be understood?
- A
Real-time requirements form a spectrum, and systems can fall at different points depending on the consequences of lateness.
- B
A system is non-real-time whenever it permits even one missed deadline.
- C
Every system must fit exactly one of three categories, with no intermediate cases.
- D
A system is hard real-time whenever it has any deadline at all.
Correct answer
AReal-time requirements form a spectrum, and systems can fall at different points depending on the consequences of lateness.
Explanation
The lecture describes real-time systems along a spectrum from non-real-time to hard real-time; many practical systems lie between the extremes.
- A
- 10
Why does real-time performance focus on individual response times rather than only an average?
- A
Individual response times are always identical in a real-time system.
- B
An average response time directly guarantees that every task meets its deadline.
- C
Averages cannot be calculated for systems with more than one task.
- D
A favorable average can conceal an individual response that misses a critical deadline.
Correct answer
DA favorable average can conceal an individual response that misses a critical deadline.
Explanation
Real-time correctness depends on meeting each relevant deadline. An average can hide a late response, so individual task responses matter.
- A
- 11
Why can conventional multitasking and scheduling goals be inadequate for a real-time system?
- A
They always prevent tasks from running concurrently, even when concurrency is needed.
- B
They cannot create threads or provide system calls to applications.
- C
They often emphasize throughput or average performance instead of guaranteeing that time-constrained tasks meet deadlines.
- D
They assign every task a fixed priority based only on its memory use.
Correct answer
CThey often emphasize throughput or average performance instead of guaranteeing that time-constrained tasks meet deadlines.
Explanation
General-purpose scheduling commonly seeks high throughput or average performance, while real-time scheduling must account for individual timing requirements.
- A
- 12
Why can direct memory access (DMA) undermine predictability for a real-time CPU task?
- A
DMA ensures that the CPU receives a fixed share of the bus regardless of device activity.
- B
DMA gives every device permanent priority over all CPU tasks.
- C
An I/O device and the CPU may contend for the same memory bus, delaying CPU access unpredictably.
- D
DMA requires the CPU to copy every transferred byte, preventing other tasks from running.
Correct answer
CAn I/O device and the CPU may contend for the same memory bus, delaying CPU access unpredictably.
Explanation
When the CPU and I/O devices share a bus, heavy device traffic can delay CPU memory access and make task execution less predictable.
- A
- 13
How can time-slicing a bus shared by the CPU and I/O devices improve predictability?
- A
It eliminates all I/O traffic whenever the CPU has a task to run.
- B
It ensures that every CPU task finishes before any device can transfer data.
- C
It lets I/O devices use the bus only when no real-time tasks exist.
- D
It guarantees the CPU a known share of bus access, making its memory-transfer opportunities easier to estimate.
Correct answer
DIt guarantees the CPU a known share of bus access, making its memory-transfer opportunities easier to estimate.
Explanation
Allocating the shared bus in predictable time slices lets the CPU know how much bus access it can expect, reducing uncertainty from device traffic.
- A
- 14
Why can processor caches make execution time less predictable?
- A
A cache forces every memory access to take the same time, regardless of where data is stored.
- B
A cache prevents a processor from accessing main memory when a task has a deadline.
- C
A memory access may be fast on a cache hit but much slower on a miss, and the cache state may be uncertain.
- D
A cache makes all tasks use more memory, so their deadlines must become longer.
Correct answer
CA memory access may be fast on a cache hit but much slower on a miss, and the cache state may be uncertain.
Explanation
Cache hits and misses have different access times. If it is uncertain whether data is cached, the execution time of a task can also be uncertain.
- A
- 15
What is one extreme way to remove cache-related timing variability in a real-time processor?
- A
Make every cache miss trigger a higher-priority interrupt.
- B
Disable main memory and store every task in a device driver.
- C
Increase the cache size until every possible memory address is guaranteed to be cached.
- D
Use a processor without caches so memory access does not depend on cache-hit status.
Correct answer
DUse a processor without caches so memory access does not depend on cache-hit status.
Explanation
The lecture describes avoiding caches entirely as one possible, though dramatic, way to eliminate cache-hit versus cache-miss timing variability.
- A
- 16
Why might assuming a worst-case cache miss for each task still make a workload hard to analyze?
- A
Cache misses occur only when tasks have no deadlines.
- B
A worst-case estimate prevents tasks from using locks or communicating.
- C
A worst-case estimate makes every task execute faster than its actual best case.
- D
Timing variability across a chain of interacting tasks can complicate guarantees for the workload as a whole, especially when tasks share locks or dependencies.
Correct answer
DTiming variability across a chain of interacting tasks can complicate guarantees for the workload as a whole, especially when tasks share locks or dependencies.
Explanation
Even if a worst-case bound is available for one task, variable execution times across many related tasks can make whole-workload analysis difficult, particularly with shared resources.
- A
- 17
What problem can a conventional non-preemptive system-call handler cause in a real-time system?
- A
The system call may assign a new deadline to every task in the system.
- B
A low-priority task may always receive the processor before the system call begins.
- C
The system call may cause every device to stop transferring data permanently.
- D
A high-priority task may be unable to take the processor while a long system call runs with interrupts disabled.
Correct answer
DA high-priority task may be unable to take the processor while a long system call runs with interrupts disabled.
Explanation
If interrupts are disabled during a non-preemptive system call, a newly arriving urgent task may be unable to preempt it and could miss its deadline.
- A
- 18
Why is preemption more complicated for interrupt handlers than for synchronous system calls?
- A
Interrupts arrive asynchronously, and allowing handlers to preempt one another can lead to repeated nesting and delayed handling of earlier events.
- B
Interrupts always arrive at fixed periods, while system calls arrive unpredictably.
- C
Interrupts are initiated only by the currently running process, unlike system calls.
- D
Interrupt handlers cannot access hardware, while system calls can.
Correct answer
AInterrupts arrive asynchronously, and allowing handlers to preempt one another can lead to repeated nesting and delayed handling of earlier events.
Explanation
System calls are synchronous requests made by a running task. Interrupts arise asynchronously from external events, and nested preemption can cause handlers to repeatedly interrupt one another.
- A
- 19
What is the central idea of the lecture's third approach to handling device interrupts?
- A
Keep interrupt handlers minimal and have them activate or wake ordinary tasks that perform the substantial device work.
- B
Put complete device-driver logic into every task that might use a device.
- C
Disable the timer interrupt and let each device interrupt run an entire application.
- D
Poll each device in a large non-preemptive handler that performs all required processing.
Correct answer
AKeep interrupt handlers minimal and have them activate or wake ordinary tasks that perform the substantial device work.
Explanation
The third approach uses lightweight interrupt handling to signal or start tasks; those tasks perform the more substantial work and are scheduled with the other tasks.
- A
- 20
What is an advantage of assigning substantial device handling to tasks rather than long interrupt handlers?
- A
Device work no longer needs to communicate with any other part of the system.
- B
Every device task automatically receives higher priority than all application tasks.
- C
The system no longer needs to handle asynchronous events.
- D
The interrupt handler can remain short, while device work is treated as schedulable task work with timing requirements.
Correct answer
DThe interrupt handler can remain short, while device work is treated as schedulable task work with timing requirements.
Explanation
Short handlers reduce the amount of work performed in interrupt context; the resulting device tasks can be handled by the scheduler like other tasks.
- A
- 21
What is a disadvantage of putting all device-handling logic into each individual task that needs I/O?
- A
The kernel must be recompiled after every task performs a data transfer.
- B
The approach prevents tasks from polling a device when they need to.
- C
Tasks must contain device-specific logic, so changing a device can require changes across multiple applications.
- D
The approach requires interrupts to remain enabled inside every device driver.
Correct answer
CTasks must contain device-specific logic, so changing a device can require changes across multiple applications.
Explanation
With task-specific I/O handling, device logic is duplicated or embedded in applications, making device changes burdensome for application programmers.
- A
- 22
What is a key trade-off of using periodic kernel routines to poll I/O devices?
- A
Polling avoids kernel modifications, but makes device details part of each application.
- B
Device logic is modularized in the kernel, but polling consumes CPU time and device changes may require kernel changes.
- C
Polling eliminates CPU overhead, but requires device logic to be duplicated in every task.
- D
Polling guarantees immediate device response, but prevents the kernel from managing deadlines.
Correct answer
BDevice logic is modularized in the kernel, but polling consumes CPU time and device changes may require kernel changes.
Explanation
Periodic kernel polling centralizes device-specific logic, but it still wastes CPU time while polling and can require kernel changes when devices are added or modified.
- A
- 23
Why can priority inversion matter in a real-time system using locks?
- A
A high-priority task may be blocked by a lower-priority task holding a resource it needs.
- B
A mutex guarantees that every task meets its deadline by preventing preemption.
- C
A task's priority may become identical to its period after it locks a mutex.
- D
A low-priority task may be prevented from ever acquiring any resource.
Correct answer
AA high-priority task may be blocked by a lower-priority task holding a resource it needs.
Explanation
If a low-priority task holds a resource needed by a high-priority task, the high-priority task can be delayed, creating priority inversion concerns.
- A
- 24
Why can virtual-memory address translation be a source of timing variability?
- A
Page tables force every task to use the same physical addresses.
- B
Virtual addresses are always translated by the processor in zero time.
- C
Address translation occurs only when a task is created, never while it runs.
- D
Finding a virtual-to-physical mapping may require memory accesses, and a translation-cache hit and miss have different costs.
Correct answer
DFinding a virtual-to-physical mapping may require memory accesses, and a translation-cache hit and miss have different costs.
Explanation
Translation may involve page-table lookup, and a translation lookaside buffer (TLB) hit is faster than a miss that requires further memory accesses.
- A
- 25
What is the purpose of a translation lookaside buffer (TLB)?
- A
To cache recently used virtual-to-physical address translations near the processor.
- B
To cache disk pages that have been evicted from physical memory.
- C
To replace the page table by permanently mapping every virtual page.
- D
To store each task's deadlines and scheduling priorities.
Correct answer
ATo cache recently used virtual-to-physical address translations near the processor.
Explanation
A TLB is a small cache of address translations, allowing a previously seen virtual page to be mapped to its physical page without repeating the full lookup.
- A
- 26
Why might a real-time system avoid virtual memory and use physical memory directly?
- A
It ensures that every process can access more memory than physical RAM.
- B
It guarantees that all tasks receive separate, protected virtual address spaces.
- C
It makes memory allocation dynamic and therefore more flexible.
- D
It can avoid timing variability from address translation and paging, although it sacrifices flexibility and may increase security risks.
Correct answer
DIt can avoid timing variability from address translation and paging, although it sacrifices flexibility and may increase security risks.
Explanation
Using physical memory directly can reduce translation-related uncertainty, but the lecture notes that this choice reduces flexibility and can create security risks.
- A
- 27
How does demand paging use physical memory?
- A
It uses physical memory as a cache for pages stored on disk, bringing pages into memory when needed and evicting others when space runs out.
- B
It uses the disk as a cache for pages that remain permanently in the processor's cache.
- C
It translates every virtual address directly into an I/O device address.
- D
It stores all process pages permanently in physical memory and never uses disk storage.
Correct answer
AIt uses physical memory as a cache for pages stored on disk, bringing pages into memory when needed and evicting others when space runs out.
Explanation
In paging, pages can reside on disk and are brought into physical memory when needed. If memory is full, another page may be evicted and written back.
- A
- 28
Why can paging threaten a real-time deadline?
- A
Evicting and retrieving pages involves disk transfers that can take a long and variable amount of time.
- B
Paging makes all memory accesses faster than cache hits.
- C
Paging prevents a task from accessing any page that is already in memory.
- D
Paging forces every task to run for a fixed time quantum.
Correct answer
AEvicting and retrieving pages involves disk transfers that can take a long and variable amount of time.
Explanation
Writing an evicted page to disk and fetching a needed page can be very time-consuming, introducing timing uncertainty that may cause a deadline miss.
- A
- 29
How does pinning a real-time task's pages help control paging-related delays?
- A
It prevents the operating system from evicting those pages while the task needs them.
- B
It makes the task's virtual pages available to every other process.
- C
It lets the task choose its own disk scheduling algorithm.
- D
It forces the operating system to move those pages to disk before each task run.
Correct answer
AIt prevents the operating system from evicting those pages while the task needs them.
Explanation
Pinned pages are not eligible for eviction, which helps ensure that the task's required pages remain in physical memory.
- A
- 30
Why can dynamic memory allocation be difficult to bound in execution time?
- A
Dynamic allocation always reserves the entire physical memory for one task.
- B
Allocation heuristics may search different amounts of a free list before finding a suitable block.
- C
Every allocation request is served in exactly one processor cycle.
- D
Allocation heuristics require every task to have the same period.
Correct answer
BAllocation heuristics may search different amounts of a free list before finding a suitable block.
Explanation
Algorithms such as first fit or best fit may find a block quickly or may need to search much further, making allocation time variable.
- A
- 31
How can external fragmentation cause an allocation request to fail even when enough total memory is free?
- A
The free memory may be split into separate blocks, leaving no single contiguous block large enough for the request.
- B
The operating system may count allocated memory as free memory.
- C
The allocation algorithm may require every free block to be stored on disk.
- D
The free memory may all be contiguous, but the request may be too small to use it.
Correct answer
AThe free memory may be split into separate blocks, leaving no single contiguous block large enough for the request.
Explanation
External fragmentation leaves free space in separated regions. The total free amount may be sufficient, but no contiguous region can satisfy a large request.
- A
- 32
Why is moving allocated memory to combine free regions often not a straightforward solution to external fragmentation?
- A
Programs may have multiple pointers to the allocated block, and the allocator may not be able to find and update every copy.
- B
Allocated blocks cannot contain data that needs to be preserved.
- C
Moving a block automatically makes every task's deadline longer.
- D
Free memory cannot be moved because it has no physical address.
Correct answer
APrograms may have multiple pointers to the allocated block, and the allocator may not be able to find and update every copy.
Explanation
If a block moves, all pointers referring to it must be updated. The allocator may not know how many copies of a pointer exist, so relocating blocks can invalidate references.
- A
- 33
What is the trade-off of allocating memory in fixed-size blocks?
- A
It eliminates both internal and external fragmentation, but makes allocation less predictable.
- B
It increases external fragmentation while guaranteeing that every request uses exactly its requested size.
- C
It removes the need for physical memory and replaces it with disk storage.
- D
It can reduce external fragmentation and make allocation more predictable, but may waste space inside blocks through internal fragmentation.
Correct answer
DIt can reduce external fragmentation and make allocation more predictable, but may waste space inside blocks through internal fragmentation.
Explanation
Fixed-size blocks can simplify allocation and avoid some external-fragmentation problems, but a request smaller than a block may leave part of the block unused.
- A
- 34
Why do some real-time systems disallow dynamic memory allocation?
- A
Preallocating memory sacrifices flexibility but avoids unpredictable runtime allocation and fragmentation behavior.
- B
Preallocation guarantees that every task has the same execution time.
- C
Dynamic allocation prevents a program from using any memory outside the stack.
- D
Dynamic allocation is required only when tasks have fixed deadlines.
Correct answer
APreallocating memory sacrifices flexibility but avoids unpredictable runtime allocation and fragmentation behavior.
Explanation
Static allocation gives up the ability to request varying amounts of memory during execution, but it can make memory use more predictable.
- A
- 35
Why can recursion make execution-time guarantees difficult?
- A
If recursion depth depends on runtime input and has no known bound, the amount of work may also be unbounded.
- B
Recursion always causes a task to execute in constant time.
- C
Recursive functions cannot be used with periodic tasks.
- D
Recursion prevents a program from making any memory accesses.
Correct answer
AIf recursion depth depends on runtime input and has no known bound, the amount of work may also be unbounded.
Explanation
When the number of recursive calls depends dynamically on input and is not bounded, it is difficult to establish a finite upper bound on execution time.
- A
- 36
What characterizes a periodic real-time task?
- A
It produces jobs that arrive repeatedly at a fixed period.
- B
It produces one job with no execution-time estimate.
- C
It produces jobs only when an unpredictable external event occurs.
- D
It changes its period whenever a job misses its deadline.
Correct answer
AIt produces jobs that arrive repeatedly at a fixed period.
Explanation
A periodic task consists of jobs that arrive at fixed intervals, described by the task's period.
- A
- 37
For a periodic task with period P, what does the task's utilization represent?
- A
Its period divided by its worst-case execution time.
- B
Its deadline minus its arrival time.
- C
Its number of jobs divided by the number of processors.
- D
Its worst-case execution time divided by its period.
Correct answer
DIts worst-case execution time divided by its period.
Explanation
The utilization of a task is its jobs' worst-case execution time divided by the task period.
- A
- 38
If a periodic task's relative deadline is not specified, what assumption does the lecture prescribe?
- A
Assume that its relative deadline is twice its period.
- B
Assume that its relative deadline equals its period.
- C
Assume that it has no deadline.
- D
Assume that its relative deadline is zero.
Correct answer
BAssume that its relative deadline equals its period.
Explanation
When no deadline is specified for a periodic task, the lecture says to assume that its relative deadline is its period.
- A
- 39
How is a job related to a periodic task?
- A
A job is the complete set of all tasks in the system.
- B
A job is one particular instance or arrival of the task.
- C
A job is a task that has missed its deadline.
- D
A job is the task's priority value, while the task is its execution time.
Correct answer
BA job is one particular instance or arrival of the task.
Explanation
A periodic task can arrive repeatedly; each individual instance or arrival is called a job.
- A
- 40
How does a nonperiodic task differ from a periodic task in the lecture's explanation?
- A
A nonperiodic task must always have a shorter deadline than its execution time.
- B
A nonperiodic task consists of identical jobs arriving at a fixed period.
- C
A nonperiodic task may occur once rather than producing repeated instances at fixed intervals.
- D
A nonperiodic task cannot be scheduled by an operating system.
Correct answer
CA nonperiodic task may occur once rather than producing repeated instances at fixed intervals.
Explanation
The lecture contrasts repeated periodic arrivals with a task that occurs once; in the latter case, task and job can refer to the same single instance.
- A
- 41
Which statement correctly distinguishes an aperiodic task from a sporadic task in the lecture's description?
- A
Aperiodic tasks have no execution time, while sporadic tasks have no arrival time.
- B
Aperiodic tasks arrive at fixed intervals with hard deadlines, while sporadic tasks arrive at fixed intervals without deadlines.
- C
Aperiodic tasks arrive irregularly without hard deadlines, while sporadic tasks arrive irregularly but have hard deadlines.
- D
Aperiodic tasks are always non-preemptible, while sporadic tasks are always preemptible.
Correct answer
CAperiodic tasks arrive irregularly without hard deadlines, while sporadic tasks arrive irregularly but have hard deadlines.
Explanation
The lecture describes aperiodic tasks as arriving randomly without hard deadlines and sporadic tasks as arriving randomly with hard deadlines.
- A
- 42
What are two independent ways to characterize a set of real-time tasks?
- A
Tasks may be independent or dependent, and they may be preemptible or non-preemptible.
- B
Tasks may be synchronous or periodic, and they may be fast or high-throughput.
- C
Tasks may be cached or uncached, and they may be virtual or physical.
- D
Tasks may be hard or static, and they may be dynamic or sporadic.
Correct answer
ATasks may be independent or dependent, and they may be preemptible or non-preemptible.
Explanation
The lecture identifies task dependence and preemptibility as separate properties for describing a task set.
- A
- 43
What remains fixed in a static-priority scheduling algorithm?
- A
Each task's priority remains the same over time.
- B
Every task's deadline is reset after each processor time slice.
- C
The scheduler recalculates all task priorities after every interruption.
- D
Each job's priority changes whenever another job arrives.
Correct answer
AEach task's priority remains the same over time.
Explanation
A static scheduler assigns priorities to tasks, and those task priorities do not change over time.
- A
- 44
How does dynamic-priority scheduling differ from static-priority scheduling as defined in the lecture?
- A
It changes the execution time of jobs rather than their priorities.
- B
It assigns priorities to individual jobs, so different jobs of one task may receive different priorities.
- C
It assigns one permanent priority to each task and never distinguishes among its jobs.
- D
It assigns priorities only after all jobs have completed.
Correct answer
BIt assigns priorities to individual jobs, so different jobs of one task may receive different priorities.
Explanation
Dynamic schedulers assign priorities to jobs rather than tasks. Since a task can produce multiple jobs, those jobs can have different priorities.
- A
- 45
What makes a scheduling algorithm fully dynamic in the lecture's terminology?
- A
It schedules tasks only after their deadlines have passed.
- B
It changes only the period of each task.
- C
It assigns a fixed priority to each task before execution begins.
- D
It assigns job priorities that may change over time.
Correct answer
DIt assigns job priorities that may change over time.
Explanation
A fully dynamic scheduler assigns priorities to jobs and may change those priorities over time; least laxity first is given as an example.
- A
- 46
When is a particular schedule called feasible?
- A
When the average response time is lower than the average period.
- B
When every task in the schedule meets its deadline.
- C
When no task ever communicates with another task.
- D
When every task receives the same amount of processor time.
Correct answer
BWhen every task in the schedule meets its deadline.
Explanation
A schedule is feasible if all tasks meet their deadlines.
- A
- 47
What does it mean for a task set to be schedulable under a class of schedulers?
- A
The task set has no deadlines but can still run to completion.
- B
The task set uses less than one processor regardless of its timing requirements.
- C
Every algorithm in that class produces the same schedule for the task set.
- D
At least one algorithm in that class can produce a feasible schedule for the task set.
Correct answer
DAt least one algorithm in that class can produce a feasible schedule for the task set.
Explanation
A task set is schedulable under a scheduling class if some algorithm in that class can schedule it feasibly.
- A
- 48
What does it mean for an algorithm to be optimal with respect to a scheduler class?
- A
It meets deadlines for every possible task set, including unschedulable sets.
- B
It can produce a feasible schedule for every task set that is schedulable by some algorithm in that class.
- C
It always produces the schedule with the shortest average response time.
- D
It assigns the same priority to every task in the class.
Correct answer
BIt can produce a feasible schedule for every task set that is schedulable by some algorithm in that class.
Explanation
An algorithm is optimal within a class if it succeeds on every task set for which any algorithm in that class can produce a feasible schedule.
- A
- 49
How does rate-monotonic scheduling assign priorities?
- A
Tasks with shorter periods receive higher fixed priorities.
- B
Jobs with later deadlines receive higher fixed priorities.
- C
Tasks with longer execution times receive higher priorities that change each period.
- D
Jobs with the least remaining execution time receive the lowest priority.
Correct answer
ATasks with shorter periods receive higher fixed priorities.
Explanation
Rate-monotonic scheduling is static: it assigns higher priority to tasks with shorter periods, and the task priorities remain fixed.
- A
- 50
What does it mean that rate-monotonic scheduling is optimal among static schedulers?
- A
Rate-monotonic scheduling can feasibly schedule every task set, regardless of its workload.
- B
Rate-monotonic scheduling is optimal among every possible online and offline scheduler.
- C
If any static-priority scheduler can feasibly schedule a task set, rate-monotonic scheduling can also feasibly schedule it.
- D
Rate-monotonic scheduling always gives each task the same priority.
Correct answer
CIf any static-priority scheduler can feasibly schedule a task set, rate-monotonic scheduling can also feasibly schedule it.
Explanation
The stated optimality is limited to the class of static schedulers: rate-monotonic can schedule any task set that is schedulable by a static scheduler.
- A
- 51
Why can round-robin scheduling miss a deadline even when tasks have different urgency?
- A
It assigns each job a priority based on its absolute deadline.
- B
It always runs the task with the shortest period first.
- C
It prevents tasks from running until every task has arrived.
- D
It shares processor time without necessarily prioritizing the job whose deadline is nearest.
Correct answer
DIt shares processor time without necessarily prioritizing the job whose deadline is nearest.
Explanation
Round robin allocates turns rather than prioritizing the most urgent deadline. In the illustrated workload, this caused a task to miss its deadline.
- A
- 52
What does the rate-monotonic utilization bound state for n periodic tasks?
- A
If total utilization is greater than n(21/n−1), rate-monotonic scheduling is guaranteed to fail.
- B
If total utilization is at most n(21/n−1), rate-monotonic scheduling is guaranteed to be feasible.
- C
If total utilization equals n(21/n−1), every task must have the same period.
- D
If every task has utilization below n(21/n−1), all possible schedules are feasible.
Correct answer
BIf total utilization is at most n(21/n−1), rate-monotonic scheduling is guaranteed to be feasible.
Explanation
The stated bound guarantees a feasible rate-monotonic schedule when the total utilization is no greater than n(21/n−1).
- A
- 53
What can be concluded if a task set's utilization is above the rate-monotonic sufficient bound?
- A
Rate-monotonic scheduling must fail for that task set.
- B
The task set is necessarily feasible under every static scheduler.
- C
The bound provides no guarantee; rate-monotonic scheduling might still succeed or might fail.
- D
Rate-monotonic scheduling must succeed if all tasks are periodic.
Correct answer
CThe bound provides no guarantee; rate-monotonic scheduling might still succeed or might fail.
Explanation
Exceeding the sufficient bound does not prove failure. It means only that this particular guarantee no longer applies.
- A
- 54
How does the rate-monotonic utilization bound change as the number of tasks increases?
- A
The bound increases without limit as the number of tasks grows.
- B
The bound alternates between zero and one as tasks are added.
- C
The bound stays exactly equal to 1 for every number of tasks.
- D
The bound decreases and approaches about 0.67 as the number of tasks grows.
Correct answer
DThe bound decreases and approaches about 0.67 as the number of tasks grows.
Explanation
The lecture notes that the bound decreases as n increases and approaches approximately 0.67.
- A
- 55
Why does a utilization of about 0.98 for three tasks not receive the rate-monotonic guarantee described in the lecture?
- A
Utilization cannot be used to analyze tasks with different periods.
- B
It is below the three-task sufficient bound, which is approximately 0.98.
- C
Rate-monotonic scheduling applies only to task sets with utilization below 0.67 for every n.
- D
It exceeds the three-task sufficient bound, which is approximately 0.78.
Correct answer
DIt exceeds the three-task sufficient bound, which is approximately 0.78.
Explanation
For three tasks, the stated sufficient bound is approximately 0.78. A utilization of about 0.98 is above that value, so the bound gives no guarantee.
- A
- 56
What assumption about periodic tasks is part of the rate-monotonic analysis described in the lecture?
- A
The tasks are periodic and independent, and their worst-case execution times are known in advance.
- B
The tasks are non-preemptible and have no deadlines.
- C
The tasks arrive randomly, depend on one another, and have unknown execution times.
- D
The tasks must all have identical periods and execution times.
Correct answer
AThe tasks are periodic and independent, and their worst-case execution times are known in advance.
Explanation
The lecture introduces rate-monotonic scheduling under assumptions including periodic, independent tasks and known worst-case execution times.
- A
- 57
How does earliest-deadline-first (EDF) assign priorities?
- A
The job with the earliest deadline receives the highest priority.
- B
The job with the latest deadline receives the highest priority.
- C
The task with the longest execution time receives the highest priority.
- D
The task with the shortest period permanently receives the highest priority.
Correct answer
AThe job with the earliest deadline receives the highest priority.
Explanation
EDF is a dynamic-priority scheduler that gives higher priority to jobs with earlier deadlines.
- A
- 58
Why can two jobs from the same task receive different priorities under EDF?
- A
EDF permanently assigns one priority to each task but recalculates its execution time.
- B
EDF prioritizes individual jobs by their deadlines, and different jobs can have different deadlines.
- C
EDF gives every job the same priority until it misses a deadline.
- D
EDF changes priorities only when tasks change their periods.
Correct answer
BEDF prioritizes individual jobs by their deadlines, and different jobs can have different deadlines.
Explanation
EDF assigns priorities to jobs rather than tasks, so jobs belonging to one task may receive different priorities when their deadlines differ.
- A
- 59
What is the scope of EDF's optimality claim in the lecture?
- A
EDF is optimal among offline schedules but not among online schedulers.
- B
EDF is optimal among online schedulers: if an online scheduler can feasibly schedule a task set, EDF can too.
- C
EDF is guaranteed to meet deadlines for every task set, even if no feasible schedule exists.
- D
EDF is optimal among static schedulers only when every task has the same period.
Correct answer
BEDF is optimal among online schedulers: if an online scheduler can feasibly schedule a task set, EDF can too.
Explanation
The lecture states that EDF is optimal with respect to online schedulers, meaning it can schedule any task set that is feasible under an online scheduler.
- A
- 60
How can EDF succeed on a task set for which rate-monotonic scheduling fails?
- A
EDF can change job priorities according to deadlines, whereas rate-monotonic uses fixed task priorities based on periods.
- B
EDF prevents tasks from arriving while another task is running.
- C
EDF ignores deadlines, whereas rate-monotonic schedules the earliest deadline first.
- D
EDF gives every task more processor time by increasing the processor's speed.
Correct answer
AEDF can change job priorities according to deadlines, whereas rate-monotonic uses fixed task priorities based on periods.
Explanation
EDF responds to individual job deadlines with dynamic priorities. Rate-monotonic instead uses fixed task priorities, so the two algorithms can produce different scheduling outcomes.
- A
- 61
Which scheduler from the lecture is an example of fully dynamic scheduling?
- A
Round robin, because every task has a fixed period.
- B
Earliest deadline first, because it assigns one permanent priority to each task.
- C
Least laxity first, because job priorities may change over time.
- D
Rate-monotonic, because task priorities remain fixed over time.
Correct answer
CLeast laxity first, because job priorities may change over time.
Explanation
Least laxity first is given as an example of fully dynamic scheduling, in which job priorities may change over time.
- A
- 62
What is the key distinction between EDF and least-laxity-first scheduling in the lecture's classification?
- A
EDF assigns fixed task priorities, while least-laxity-first assigns priorities only to tasks.
- B
EDF assigns job priorities based on deadlines that remain fixed for each job, while least-laxity-first priorities may change over time.
- C
EDF is static, while least-laxity-first is a general-purpose throughput scheduler.
- D
EDF ignores job deadlines, while least-laxity-first uses only task periods.
Correct answer
BEDF assigns job priorities based on deadlines that remain fixed for each job, while least-laxity-first priorities may change over time.
Explanation
EDF is described as dynamic: each job gets a priority based on its deadline, which does not change for that job. Least-laxity first is fully dynamic, so priorities may change over time.
- A
- 63
What is the difference between an unschedulable task set and a task set that merely exceeds the rate-monotonic utilization bound?
- A
There is no difference: every set above the bound is unschedulable.
- B
Exceeding the bound proves the set is unschedulable under every scheduling algorithm.
- C
An unschedulable set is one that has utilization below the bound but uses dynamic priorities.
- D
Exceeding the bound means the guarantee is unavailable, but the task set may still be schedulable; an unschedulable set has no feasible schedule in the class being considered.
Correct answer
DExceeding the bound means the guarantee is unavailable, but the task set may still be schedulable; an unschedulable set has no feasible schedule in the class being considered.
Explanation
The rate-monotonic bound is sufficient, not necessary. A task set above it might still be feasible; unschedulability means no algorithm in the relevant class can produce a feasible schedule.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.