FreeExam

Embedded engineer: Real-Time Scheduling and Concurrency

Original technical interview practice in response-time bounds, release and deadline semantics, bounded service, multicore interference, and concurrent handoff correctness.

These prompts are original practice. They are not questions from a named employer or a live hiring loop.

  1. 1.Two periodic tasks require CPU times 1 and 2 ms with periods 4 and 5 ms. Ignoring all other work, what total processor utilization follows?

    Show answer and explanation
    1. 1.4
    2. 0.65
    3. 0.75
    4. 0.6

    Answer: 0.65

    The contributions are 1/4=0.25 and 2/5=0.4, totaling 0.65. This is demand accounting under the supplied model, not a complete schedulability proof when deadlines, blocking, overhead, or other interference are unspecified.

  2. 2.A supplied EDF theorem applies to independent preemptible periodic tasks on one ideal processor, with deadlines equal to periods and all costs included. Utilization is 0.9. What does that theorem support?

    Show answer and explanation
    1. Feasibility for every fixed-priority assignment
    2. Feasibility under arbitrary multicore affinity restrictions
    3. Feasibility under those stated assumptions
    4. A proof that omitted interrupt costs cannot affect any deadline

    Answer: Feasibility under those stated assumptions

    The ideal uniprocessor implicit-deadline EDF utilization criterion applies within its assumptions. It does not establish results for other schedulers, shorter deadlines, unmodeled work, or constrained multicore placement.

  3. 3.A single job requires 2 ms of CPU but has a 1 ms relative deadline on a processor supplying at most one CPU-ms per ms. Its period is 100 ms. Can low average utilization make that deadline feasible?

    Show answer and explanation
    1. No; relative deadlines are never meaningful for periodic tasks
    2. Yes; unused capacity before release can execute the unreleased job
    3. No; its own execution exceeds the available deadline interval
    4. Yes; low average utilization proves all short deadlines feasible

    Answer: No; its own execution exceeds the available deadline interval

    Even alone, the job cannot receive two milliseconds of execution within one millisecond after release. Average utilization is not enough to establish constrained-deadline feasibility.

  4. 4.A sufficient utilization bound for a fixed-priority task class is 0.83. A task set has utilization 0.9. What follows from exceeding this sufficient bound alone?

    Show answer and explanation
    1. Every schedule is proved infeasible
    2. The supplied execution times are necessarily inconsistent
    3. The bound is inconclusive for that set
    4. Every job must miss its own deadline

    Answer: The bound is inconclusive for that set

    A sufficient condition certifies sets that satisfy it; failure does not generally prove infeasibility. A more precise applicable analysis may show feasibility or failure. Do not treat a one-sided certificate as an exact characterization.

  5. 5.Under a supplied deadline-monotonic rule, smaller relative deadlines have higher priority. Task A has period 10 and deadline 3; B has period 5 and deadline 5. Which has higher priority?

    Show answer and explanation
    1. Both must have equal priority
    2. A
    3. B
    4. Whichever ran most recently

    Answer: A

    The stated rule compares relative deadlines, three versus five, so A is higher. Rate-monotonic priority would compare periods instead; the scheduler/analysis rule must be identified explicitly.

  6. 6.A timing analysis assumes independent sporadic tasks on one fully preemptive processor. Implementation adds a long nonpreemptive driver segment. What analysis premise must be revisited?

    Show answer and explanation
    1. Only how task names are printed in a trace
    2. Only the numerical order of the logged task IDs
    3. Blocking/nonpreemptive execution absent from the original model
    4. An assumption that low utilization absorbs arbitrary blocking

    Answer: Blocking/nonpreemptive execution absent from the original model

    A lower-priority nonpreemptive segment can delay a higher-priority release. The model must account for applicable blocking and costs rather than retain a fully preemptive result unchanged.

  7. 7.A supplied response recurrence is R_next=3+ceil(R/4)×1, starting R=3, with time in ms. What least fixed point follows?

    Show answer and explanation
    1. 4 ms
    2. 7 ms
    3. 5 ms
    4. 3 ms

    Answer: 4 ms

    The first update is 3+ceil(3/4)=4. At R=4 the update remains four. This computes the stated recurrence; applying it to hardware also needs its task, blocking, jitter, and cost assumptions to hold.

  8. 8.An interference formula counts periodic releases in [0,R), including a release at zero. The period is 4 ms and R=4 ms. How many releases are in this half-open interval?

    Show answer and explanation
    1. 0
    2. 2
    3. 1
    4. 4

    Answer: 1

    Only time zero is included. The release at four is at the excluded endpoint. Boundary conventions matter when a job completes exactly as another release occurs.

  9. 9.A high-priority job needs 0.1 ms execution and is due 3 ms after arrival. It arrives just after a nonpreemptive lower-priority segment begins with 7 ms remaining. Can the high-priority job meet that deadline under these conditions?

    Show answer and explanation
    1. No; the blocking alone exceeds the deadline
    2. No; priority scheduling never permits blocking at all
    3. Yes; priority eliminates nonpreemptive blocking
    4. Yes; low average utilization guarantees immediate dispatch

    Answer: No; the blocking alone exceeds the deadline

    The job cannot start its required execution before the nonpreemptive segment finishes seven milliseconds later. Its three-millisecond deadline has already passed. Priority labels do not override a segment the processor cannot preempt.

  10. 10.Periodic foreground work costs 1 ms every 10 ms. An independent interrupt costs 0.2 ms every 1 ms in this supplied accounting model. What combined CPU utilization follows?

    Show answer and explanation
    1. 1.2
    2. 0.12
    3. 0.2
    4. 0.3

    Answer: 0.3

    Foreground utilization is 1/10=0.1 and interrupt utilization 0.2/1=0.2, totaling 0.3. Interrupt work is part of processor demand even if omitted from a task-only dashboard.

  11. 11.Each job has 0.2 ms useful execution and a supplied total per-job dispatch cost of 0.1 ms. Jobs arrive every 2 ms. What utilization includes both costs?

    Show answer and explanation
    1. 0.15
    2. 0.05
    3. 0.1
    4. 0.3

    Answer: 0.15

    Total demand per job is 0.3 ms, divided by period two to give 0.15. Cost accounting must specify whether dispatch/context overhead is per release, switch, or another event to avoid omission or double counting.

  12. 12.A supplied jitter-aware bound uses R_next=3+ceil((R+3)/5), starting R=3, all times ms. What fixed point follows?

    Show answer and explanation
    1. 5 ms
    2. 4 ms
    3. 3 ms
    4. 6 ms

    Answer: 5 ms

    The sequence is 3→5→5 because ceil(6/5)=2 and ceil(8/5)=2. The jitter term increases the interference bound here. This is the supplied recurrence, not a universal formula for arbitrary release dependencies.

  13. 13.A job executes for 1 ms, waits 8 ms for a device, then executes for 1 ms, with no other delays. What release-to-completion response time follows?

    Show answer and explanation
    1. 8 ms
    2. 2 ms
    3. 9 ms
    4. 10 ms

    Answer: 10 ms

    Elapsed response includes both execution and waiting: 1+8+1=10. Processor utilization can be small while an external wait dominates deadline behavior. CPU demand and response time are different quantities.

  14. 14.On one processor, a low-priority task holds a spinlock. A higher-priority task preempts it and spins without ever yielding or being preempted by the lock holder. What prevents progress?

    Show answer and explanation
    1. The spinner prevents the owner from releasing the lock
    2. A priority boost necessarily makes the lock owner run despite the stated schedule
    3. The owner continues executing concurrently on the only processor
    4. Spinning automatically transfers the mutex to the higher-priority task

    Answer: The spinner prevents the owner from releasing the lock

    The waiting task consumes the only processor while the owner cannot run. This supplied schedule cannot release the lock. Lock design must match preemption, execution context, and ownership rather than assume spinning permits the owner to progress.

  15. 15.A server receives 2 ms CPU budget at times 0,10,20,... and cannot borrow future budget. Its initial budget is exhausted by time 2. A 1 ms request arrives at time 3 and runs immediately at the next replenishment, with no other work. What response time follows?

    Show answer and explanation
    1. 7 ms
    2. 1 ms
    3. 10 ms
    4. 8 ms

    Answer: 8 ms

    The request waits from three until ten, then runs through eleven. Response is 11−3=8 ms. A budget's average share does not by itself describe every request's latency.

  16. 16.A protocol's proved blocking rule is the maximum of eligible lower-priority critical sections. Eligible durations are 2,5,3 ms. What blocking term follows under that supplied rule?

    Show answer and explanation
    1. 2 ms
    2. 5 ms
    3. 3 ms
    4. 10 ms

    Answer: 5 ms

    The rule uses the maximum, five, rather than the sum ten. Such a bound is valid only for the resource protocol and task assumptions that justify it; arbitrary locking can require a different analysis.

  17. 17.Priority inheritance raises a lock holder's priority while another task waits. Does this mechanism alone eliminate deadlock from inconsistent nested lock ordering?

    Show answer and explanation
    1. No; inheritance can never reduce priority inversion
    2. Yes; boosting a task implicitly releases its owned resources
    3. No; inherited priority does not remove a circular wait
    4. Yes; every inheritance protocol breaks every lock-order cycle

    Answer: No; inherited priority does not remove a circular wait

    Inheritance addresses certain scheduling delays while holding resources. It does not by itself prevent a lock-order cycle. Deadlock prevention/detection and bounded-blocking arguments are separate requirements.

  18. 18.Task H waits for a lock held by M; M waits for a lock held by L. A protocol promises transitive priority donation. Which owner must receive H's effective priority along this chain?

    Show answer and explanation
    1. Only H, which is already blocked
    2. Only M, regardless of its wait
    3. No owner because the locks have different names
    4. L as well as M

    Answer: L as well as M

    Transitive donation follows the ownership/wait chain so the ultimate blocking owner can progress at the appropriate inherited priority. Exact semantics vary by protocol; the question supplies this promise rather than assuming every kernel implements it.

  19. 19.A priority-inheritance owner releases one contested mutex but still holds another with a high-priority waiter. What must a correct effective-priority recomputation consider?

    Show answer and explanation
    1. Only the numeric identity of the mutex just released
    2. A rule retaining the highest inherited priority permanently
    3. Remaining ownership and waiters, not merely one release
    4. Only the owner's original base priority

    Answer: Remaining ownership and waiters, not merely one release

    Dropping all donation after one unlock can ignore another active dependency. Effective priority should follow the protocol's remaining wait/ownership state. Restoration behavior is part of the actual implementation contract.

  20. 20.A high-priority task must finish within 5 ms. Its required peripheral transaction has an unbounded retry loop under permitted errors. What is missing from a finite worst-case response claim?

    Show answer and explanation
    1. A finite bound or explicit failure path for the retries
    2. Only a favorable mean number of attempts
    3. An assumption that high task priority limits every device retry
    4. Only a timer value printed with more precision

    Answer: A finite bound or explicit failure path for the retries

    Unbounded work cannot support a finite guaranteed completion bound for all allowed cases. Define bounded retries, timeouts, degradation, or a different requirement under the stated fault model.

  21. 21.A periodic job's deadline is measured from the external event, but the task is released up to 2 ms later. A bound gives 4 ms from task release to completion. What external-event-to-completion bound follows by simple addition?

    Show answer and explanation
    1. 2 ms
    2. 8 ms
    3. 4 ms
    4. 6 ms

    Answer: 6 ms

    The external release delay and task response can total 2+4=6 ms under these supplied bounds. A deadline reference point must be explicit; measuring only scheduler response can omit upstream release latency.

  22. 22.A 10 ms periodic loop waits 10 ms after completing each job. Each job takes 3 ms. With no other delays, what start-to-start interval results?

    Show answer and explanation
    1. 10 ms
    2. 7 ms
    3. 3 ms
    4. 13 ms

    Answer: 13 ms

    The next start occurs after three milliseconds of work plus ten of relative waiting. Absolute release targets avoid this particular cumulative drift, but still need a defined overrun and missed-release policy.

  23. 23.Absolute releases are planned at times 0,10,20,30. A job released at 10 finishes at 27. Why does an absolute timer alone not define the next behavior?

    Show answer and explanation
    1. A policy is needed for the missed release at 20
    2. The task period automatically becomes seventeen
    3. The processor can run a past release retroactively
    4. Every absolute timer must discard missed jobs without any policy choice

    Answer: A policy is needed for the missed release at 20

    The timer supplies target times, not a universal backlog/skip/catch-up decision. That policy affects freshness, burst demand, deadlines, and safety requirements. It must be explicit in both implementation and analysis.

  24. 24.A tick timer can wake a task only at integer milliseconds. A requested wait ends at time 2.2 ms and the contract rounds upward to avoid early wake. What earliest scheduled tick follows?

    Show answer and explanation
    1. 1 ms
    2. 2 ms
    3. 3 ms
    4. 2.2 ms

    Answer: 3 ms

    Ceiling to the supported tick grid gives three. Quantization can add up to one tick of delay under this contract. The physical dispatch can be later because of interrupts or scheduler interference.

  25. 25.A system clock can be adjusted backward, but a timeout must measure elapsed duration. What clock property is needed for that elapsed-time calculation?

    Show answer and explanation
    1. Only a human-readable wall-clock timestamp
    2. An assumption that backward wall-clock changes preserve elapsed subtraction
    3. A suitable monotonic time base with a stated wrap contract
    4. Only a wider formatted date field

    Answer: A suitable monotonic time base with a stated wrap contract

    Wall-clock correction can break a naive elapsed-time difference. Use the platform's appropriate monotonic counter and account for resolution, frequency changes, sleep behavior, and wrap assumptions relevant to the timeout.

  26. 26.An unsigned 8-bit tick counter wraps modulo 256. Start=250 and now=5; the true elapsed interval is known to be less than 256 ticks. What elapsed value follows?

    Show answer and explanation
    1. 245 ticks
    2. 251 ticks
    3. −245 ticks
    4. 11 ticks

    Answer: 11 ticks

    Modulo subtraction gives (5−250) mod 256=11. The bound excludes an extra complete wrap. Without an appropriate interval/wrap contract, the same stored values cannot identify arbitrary elapsed time.

  27. 27.The same modulo-256 counter has start=250 and now=5, but elapsed time may exceed one full wrap and no epoch is recorded. What ambiguity remains?

    Show answer and explanation
    1. Elapsed time must equal eleven regardless of the observation interval
    2. Unsigned representation eliminates every clock-wrap ambiguity
    3. 11,267,523,... ticks share the same stored difference
    4. Elapsed time must be negative because now is numerically smaller

    Answer: 11,267,523,... ticks share the same stored difference

    Each additional 256 ticks leaves the same counter values. A bounded observation interval, wider/extended clock, or other epoch information is needed to reconstruct elapsed duration beyond the wrap period.

  28. 28.A modulo-256 ordering convention calls a positive forward difference below 128 later, assuming compared instants are less than 128 ticks apart. What happens at difference exactly 128?

    Show answer and explanation
    1. The two counter values denote the same instant
    2. Every half-range difference uniquely orders the instants
    3. Neither of those numerical counter values can be represented
    4. The stated ordering premise does not resolve it

    Answer: The stated ordering premise does not resolve it

    At the half range, either circular direction has length 128. The strict separation premise excludes this case. Counter-order helpers need documented bounds and boundary handling rather than unrestricted ordinary comparisons.

  29. 29.A kernel tick lasts 1 ms. A duration of 1.5 ms is converted to a relative tick count using a supplied ceiling rule. How many ticks result?

    Show answer and explanation
    1. 0
    2. 2
    3. 1.5
    4. 1

    Answer: 2

    Ceiling of 1.5 is two. This computes the requested tick count; whether a relative delay guarantees a minimum physical sleep can additionally depend on tick phase and the API's exact wake semantics.

  30. 30.An interrupt is blocked by 4 μs of interrupt masking, then 6 μs of higher-priority work, then needs 1 μs entry overhead. These supplied worst-case delays may coincide. What bound before its handler body follows?

    Show answer and explanation
    1. 11 μs
    2. 1 μs
    3. 6 μs
    4. 5 μs

    Answer: 11 μs

    Under the supplied composable/coincident bounds, add 4+6+1=11. Handler execution is not included yet. An interrupt-latency claim should state its start/end points and all allowed masking/interference sources.

  31. 31.An interrupt handler has bounded execution, but a device can immediately retrigger it indefinitely and it outranks every task. What is missing from a task response-time guarantee?

    Show answer and explanation
    1. Only a different name for the interrupted task
    2. A proof that short handlers always imply bounded total interference
    3. A bound on aggregate interrupt arrivals/interference
    4. Only a small entry cost for each individual handler

    Answer: A bound on aggregate interrupt arrivals/interference

    A bounded cost per activation is insufficient if arbitrarily many activations can occur. Arrival envelopes, device acknowledgment behavior, interrupt throttling, and the fault model determine whether aggregate interference is bounded.

  32. 32.A schedulability argument requires a minimum interrupt interarrival time of 100 μs. A week of measurements shows that minimum once, but the device contract permits shorter bursts. What is unproved?

    Show answer and explanation
    1. The required arrival bound over all allowed behavior
    2. That the recorded trace includes its observed minimum gap
    3. Only the number of decimal places used for timer values
    4. That a measurement run can summarize observed arrival intervals

    Answer: The required arrival bound over all allowed behavior

    Observed timing is evidence for those runs, not a guarantee excluding permitted shorter gaps. Timing proofs need defensible bounds or an explicitly probabilistic/limited requirement, with the relevant operating and fault assumptions.

  33. 33.Four jobs arrive together at time zero to a FIFO server. Each needs 1 ms, with no overhead, blocking, or later arrivals. What response time does the fourth job have?

    Show answer and explanation
    1. 1 ms
    2. 0.25 ms
    3. 3 ms
    4. 4 ms

    Answer: 4 ms

    The jobs finish at one, two, three, and four milliseconds. The fourth waits behind three jobs and then executes. Average arrival rate alone would not describe this burst latency.

  34. 34.A queue receives a sustained 3 jobs/ms while its server completes at most 2 jobs/ms. Starting empty, can any fixed finite queue prevent eventual overflow under this indefinite load?

    Show answer and explanation
    1. No; finite queues cannot absorb even bounded finite bursts
    2. Yes; FIFO ordering raises the server’s maximum service rate
    3. Yes; any positive capacity absorbs indefinite excess demand
    4. No; demand exceeds service by one job/ms

    Answer: No; demand exceeds service by one job/ms

    The backlog grows without bound at the supplied net rate. A larger buffer delays overflow but does not solve sustained overload. Admission, source rate, service capacity, or an explicit loss/degradation policy must match the requirement.

  35. 35.A supplied fluid model starts with backlog 5 units, admits 2 units/ms, and serves 3 units/ms while nonempty. How long until that initial backlog drains?

    Show answer and explanation
    1. 15 ms
    2. 5 ms
    3. 5/3 ms
    4. 2.5 ms

    Answer: 5 ms

    The net draining rate is 3−2=1 unit/ms. Five units therefore drain in five milliseconds. The fluid model and constant rates are supplied; discrete jobs and burst constraints can require a different bound.

  36. 36.A nonpreemptive FIFO device server starts a 20 ms operation. A later urgent 1 ms request has a 5 ms deadline. Why can raising the caller task's CPU priority be insufficient?

    Show answer and explanation
    1. Only the urgent operation’s own one-millisecond service time matters
    2. The caller’s CPU priority preempts the physical operation automatically
    3. The active device operation still blocks its service
    4. The device must retroactively stop every transaction for a later caller

    Answer: The active device operation still blocks its service

    CPU scheduling and peripheral service ordering are different resources. A deadline needs a bound on the relevant nonpreemptive operation or another supported device/protocol design. Task priority alone does not shorten that operation.

  37. 37.A telemetry consumer needs the freshest available state, not every historical transition. Its queue is full. Which policy is consistent with that target if explicitly designed and audited?

    Show answer and explanation
    1. Treat every overflow strategy as equivalent for all information contracts
    2. Replace obsolete queued state under a latest-value policy
    3. Claim every historical transition was processed despite coalescing
    4. Retain all stale samples while declaring no age increase

    Answer: Replace obsolete queued state under a latest-value policy

    A state/freshness target can permit coalescing or replacing older values. An event-count/audit target may not. Overflow semantics must match the information contract rather than be treated as an implementation detail without consequences.

  38. 38.An atomic Boolean notification is set true three times before a consumer exchanges it to false once. What event-count information does the Boolean alone retain?

    Show answer and explanation
    1. Exactly three separately recoverable occurrences
    2. No event occurred because exchanging the flag clears it
    3. Exactly one event is proved to have occurred
    4. At least one notification, not an exact count of three

    Answer: At least one notification, not an exact count of three

    A Boolean coalesces repeated sets. It can represent a condition or pending-work hint, but cannot encode arbitrary event multiplicity. Use an appropriate queue/counter/protocol if every occurrence matters.

  39. 39.A producer sets a pending bit between a consumer's plain read and its later plain write of zero. The consumer then clears that newly set event. What race is illustrated?

    Show answer and explanation
    1. The producer’s new event is ordered before the consumer’s old read
    2. Only an additional harmless notification can result
    3. A non-atomic read/clear loses a concurrent update
    4. A bit field makes the entire separated read/clear indivisible

    Answer: A non-atomic read/clear loses a concurrent update

    The read and clear are separate operations, so a producer update can be overwritten. An appropriate atomic exchange/RMW or protected protocol can define an indivisible handoff, with payload/condition semantics handled separately.

  40. 40.A consumer sees no work, then prepares to block. A producer adds work and signals between those two steps; the signal is not retained. The consumer sleeps indefinitely. What protocol gap exists?

    Show answer and explanation
    1. Every signal is implicitly retained forever
    2. Only the queue’s physical storage capacity
    3. Only the producer’s instruction count
    4. The predicate check and transition to waiting are not coordinated

    Answer: The predicate check and transition to waiting are not coordinated

    A lost wakeup can occur when condition checking and wait enrollment are separate. Use the synchronization primitive's correct predicate/lock/atomic-wait protocol so work cannot arrive in an unobserved gap.

  41. 41.A condition wait may return spuriously by contract. After wake, what should a consumer do before consuming shared work under the required synchronization?

    Show answer and explanation
    1. Assume every return reserves one item for this consumer
    2. Recheck the protected predicate in a loop
    3. Treat every spurious return as evidence of broken hardware
    4. Skip synchronization because a wake grants exclusive ownership

    Answer: Recheck the protected predicate in a loop

    A wake is not the condition itself. The predicate may be false because of spurious returns or another consumer. Rechecking under the correct synchronization preserves the actual work/ownership condition.

  42. 42.A request can complete or time out at the same instant. Both callbacks try to claim its terminal result. What state-machine property is needed?

    Show answer and explanation
    1. Only increase the width of their timestamp fields
    2. Assume matching timestamps make their external effects identical
    3. One serialized terminal transition with a defined winner
    4. Let both callbacks independently publish incompatible terminal results

    Answer: One serialized terminal transition with a defined winner

    Time equality does not serialize state changes. An atomic/protected terminal transition can admit one outcome and reject stale competing completion, with cleanup/ownership and external effects following the chosen protocol.

  43. 43.An asynchronous operation is canceled and its numeric slot is reused. A delayed callback from the old operation arrives with only that slot number. What identity context can prevent accepting it as the new operation?

    Show answer and explanation
    1. An assumption that cancellation instantly removes every in-flight callback
    2. Only the reused slot’s unchanged address
    3. An appropriate generation/operation identity
    4. Only the current caller’s scheduling priority

    Answer: An appropriate generation/operation identity

    Resource reuse can make an old completion look current. A generation or distinct operation identity can reject stale callbacks if its own wrap/lifetime assumptions hold. Cancellation and physical absence of old callbacks are different guarantees.

  44. 44.A producer queues a pointer to a buffer, then rewrites the buffer before the consumer reads it. The queue correctly transfers the pointer value. What guarantee is still missing?

    Show answer and explanation
    1. Only indivisible copying of the pointer value
    2. Stable payload lifetime/ownership until the consumer finishes
    3. An assumption that enqueueing a pointer copies the referenced storage
    4. Only the count of notifications delivered to the consumer

    Answer: Stable payload lifetime/ownership until the consumer finishes

    Correct pointer transport does not freeze the referenced memory. Ownership transfer, copying, immutable storage, or another suitable lifetime protocol must preserve the data for the consumer's use.

  45. 45.A counting notification saturates at two. Three events occur before any consume, and each event requires distinct accounting. What information can be lost?

    Show answer and explanation
    1. Only a duplicated trace message with unchanged event accounting
    2. At least one event beyond the representable count
    3. An assumption that saturation retains an unbounded hidden event count
    4. Only the time at which the first notification was sent

    Answer: At least one event beyond the representable count

    A bounded counter needs overflow semantics that match event requirements. Saturation can preserve a pending-work condition but cannot retain exact multiplicity beyond its maximum. Capacity and overload evidence belong in the protocol.

  46. 46.A producer holds mutex M while blocking for room in a full queue. The consumer needs M before it can remove an item. What wait structure prevents progress?

    Show answer and explanation
    1. A cycle between queue capacity and mutex ownership
    2. A guarantee that blocked queue operations release unrelated mutexes
    3. Only unexpectedly low processor utilization
    4. Only bounded priority inversion with guaranteed eventual progress

    Answer: A cycle between queue capacity and mutex ownership

    The producer waits for consumer progress while preventing that progress with M. A valid design must break this resource dependency, for example by avoiding the blocking operation under that ownership. Scheduling priority alone does not remove the cycle.

  47. 47.A condition-variable signal occurs before any waiter exists and its contract does not retain permits. Can a later wait assume one stored event from that signal alone?

    Show answer and explanation
    1. No; the persistent predicate must carry the state
    2. No; a later predicate can never record earlier work
    3. Yes; every signal creates a permanent semaphore permit
    4. Yes; a condition variable automatically counts all past events

    Answer: No; the persistent predicate must carry the state

    Condition notifications and persistent state have different roles. A consumer should use the protected predicate/protocol. A condition variable is not implicitly an event-history counter or stored permit source.

  48. 48.A barrier expects three participants. One participant is canceled permanently before arrival, and the barrier has no withdrawal/abort protocol. What liveness issue can remain?

    Show answer and explanation
    1. The barrier necessarily reduces its membership count automatically
    2. Cancellation proves that the missing participant already arrived
    3. The other participants can wait forever
    4. Only the order of arrivals changes, with guaranteed release

    Answer: The other participants can wait forever

    A fixed membership barrier needs a defined response to missing participants if cancellation/failure is allowed. Timeouts, withdrawal, generation abort, or another mechanism must preserve the intended phase semantics and recovery behavior.

  49. 49.A cyclic barrier starts a new phase while a delayed signal from the prior phase is still in flight. Signals carry no phase identity. What can be miscounted?

    Show answer and explanation
    1. An assumption that resetting a count cancels all old signals
    2. Only the display name assigned to the barrier
    3. Only a harmless duplicate known to belong to the current phase
    4. An old arrival as participation in the new phase

    Answer: An old arrival as participation in the new phase

    Repeated phases require a way to distinguish the relevant generation or otherwise prevent late prior-phase events. Resetting one counter does not establish that every in-flight participant belongs to the new phase.

  50. 50.Every task acquires shared locks only in increasing order of one fixed strict total rank. What circular-wait pattern does this rule exclude under the stated lock-acquisition model?

    Show answer and explanation
    1. All possible starvation under every scheduler
    2. A cycle requiring ranks to increase and return to the start
    3. Every long critical section
    4. Every priority inversion without further protocols

    Answer: A cycle requiring ranks to increase and return to the start

    A lock-wait cycle would require a strict rank increase along each edge and then return to the original rank, a contradiction. This prevents that circular-wait mechanism; it does not prove bounded waiting or eliminate all other liveness failures.

  51. 51.Two processors provide total capacity 2 CPU-ms/ms. Affinity forces demand 1.5 onto core A while core B has demand 0.2, with no migration. What does total utilization 1.7 fail to establish?

    Show answer and explanation
    1. That total demand is below the two-core capacity
    2. That the stated affinity constrains placement
    3. That core B has unused processor capacity
    4. Feasibility of the overloaded core A

    Answer: Feasibility of the overloaded core A

    Unused capacity on one core does not serve work pinned to another. Per-core demand and scheduler/resource constraints matter. A total below the processor count is not a sufficient placement-aware feasibility certificate.

  52. 52.A global EDF implementation runs on four processors. A developer directly applies the ideal one-processor U≤1 theorem after dividing total utilization by four. What assumption transfer is unproved?

    Show answer and explanation
    1. That the uniprocessor theorem characterizes this multiprocessor scheduler
    2. The existence of the four recorded processor cores
    3. Only the numerical operation of dividing total utilization by four
    4. The ability to account for each task’s execution demand

    Answer: That the uniprocessor theorem characterizes this multiprocessor scheduler

    Multiprocessor scheduling has different migration, parallelism, affinity, and interference behavior. A theorem must match the scheduler/model being analyzed. Rescaling a utilization number does not transfer its proof.

  53. 53.Two tasks on different cores access one serialized peripheral. Each core's CPU utilization is low. What resource demand can still violate response deadlines?

    Show answer and explanation
    1. Waiting for the shared peripheral's service and ownership
    2. Only the count of architectural processor registers
    3. A guarantee that distinct cores imply distinct peripheral service capacity
    4. Only CPU utilization on a physically unrelated core

    Answer: Waiting for the shared peripheral's service and ownership

    Parallel processors do not make a single shared device parallel. Analyze its service ordering, nonpreemptive operations, contention, and bounded waits in the end-to-end response model.

  54. 54.A task migrates between cores and loses warm cache state. Its execution bound was measured only on a dedicated warm-cache core. What cost context needs reconsideration?

    Show answer and explanation
    1. Only the number of source-code lines
    2. A guarantee that all allowed memory accesses take warm-cache hit time
    3. Only the task’s numerical identifier
    4. Migration/cache and shared-resource interference in the bound

    Answer: Migration/cache and shared-resource interference in the bound

    Execution demand depends on the relevant hardware and interference conditions. A bound measured under a narrower state does not automatically cover migrations or shared-memory contention. Use evidence/model assumptions that match allowed execution.

  55. 55.A task has measured 99th-percentile execution time 1 ms. A requirement needs a hard bound for every permitted input and machine state. What has the percentile not established?

    Show answer and explanation
    1. The reported percentile in the measured runs
    2. That execution durations can be observed
    3. A worst-case upper bound over the permitted behavior
    4. That some recorded runs finish within one millisecond

    Answer: A worst-case upper bound over the permitted behavior

    A percentile permits a tail and is estimated from observed conditions. A hard timing claim needs a defensible bound and relevant assumptions, not a relabeling of a statistical summary as worst case.

  56. 56.Timing instrumentation adds work and changes scheduling. A race disappears with tracing enabled. What must a timing/behavior investigation account for?

    Show answer and explanation
    1. Only the trace’s output filename
    2. Observer overhead and the execution path actually being assessed
    3. An assumption that every instrumented run preserves the original interleaving
    4. Only the count of timestamp fields printed

    Answer: Observer overhead and the execution path actually being assessed

    Tracing can perturb timing, contention, and interleavings. Use appropriate bounded instrumentation, hardware tracing, and corroborating evidence for the target build/conditions. The changed behavior does not identify one root cause by itself.

  57. 57.A firmware timing test disables DMA traffic, but production permits heavy DMA contention on the same memory path. What omitted interference can affect the execution bound?

    Show answer and explanation
    1. Shared-bus/memory service contention
    2. An assumption that CPU and DMA cannot share any service path
    3. Only the number of named task priorities
    4. Only formatting of the timing-test report

    Answer: Shared-bus/memory service contention

    CPU execution time can depend on service from shared hardware. Test/model conditions should include permitted interference or a justified isolation bound. Average CPU load alone does not capture memory-path contention.

  58. 58.A job requires exactly one million processor cycles in a supplied model. At 100 MHz it takes 10 ms. If frequency becomes 50 MHz with the same cycle count, what execution time follows?

    Show answer and explanation
    1. 20 ms
    2. 10 ms
    3. 5 ms
    4. 50 ms

    Answer: 20 ms

    Time is cycles divided by cycles per second. One million divided by fifty million is 0.02 seconds, or twenty milliseconds. Real systems also need consideration of clock transitions and frequency-dependent memory/peripheral behavior.

  59. 59.A mode switch releases new tasks while old-mode jobs are still pending. Separate steady-state analyses pass for each mode. What demand is not covered by those results alone?

    Show answer and explanation
    1. A guarantee that a mode change discards every pending job
    2. The transition's overlapping old and new work
    3. Only the text labels assigned to the modes
    4. Either mode’s separate steady-state demand, already analyzed

    Answer: The transition's overlapping old and new work

    Transient demand can combine work absent from either steady state. Define completion/cancellation and release rules, then analyze the transition. Two separate feasible steady states do not prove every switchover feasible.

  60. 60.An overdue computation finishes after a newer request has superseded it. The output channel accepts any completion without checking request identity. What can occur?

    Show answer and explanation
    1. Every new request automatically invalidates all earlier callbacks
    2. A stale result overwrites or drives the newer state
    3. An assumption that later completion always means fresher input
    4. Only redundant computation with no possible output change

    Answer: A stale result overwrites or drives the newer state

    Completion time does not establish input freshness or current authority. An output commit needs the appropriate request/generation and timing validity checks, plus a defined late-result policy.

  61. 61.A job processes a sample taken at time 0. It is released at 20 and finishes at 22, meeting its 5-unit release-relative deadline. What freshness measure can still be 22 units?

    Show answer and explanation
    1. Sample-to-output data age
    2. Its own execution time necessarily
    3. The job's release-to-finish response
    4. The deadline margin after completion

    Answer: Sample-to-output data age

    The job response is two, but its input is twenty-two units old at output. Meeting a scheduler deadline does not by itself establish the data-freshness requirement. Sampling, release, transport, and completion references must be aligned.

  62. 62.A pipeline's second task runs at times 0,10,20,... and takes an available input only at those starts. Its upstream result becomes ready just after time 10. Ignoring other delays, when is its next eligible pickup?

    Show answer and explanation
    1. Time 20
    2. Time 11 by definition
    3. Immediately after time 10
    4. Time 10 retroactively

    Answer: Time 20

    Periodic sampling of a handoff can add a phase wait. Fast execution alone does not remove it. End-to-end analysis must include activation and communication semantics, not only task execution durations.

  63. 63.A supplied end-to-end bound has execution stages 1.2 and 3 time units plus bounded communication wait 4. The bounds can coincide. What additive bound follows?

    Show answer and explanation
    1. 7
    2. 3
    3. 8.2
    4. 4.2

    Answer: 8.2

    The composed bound is 1.2+3+4=8.2 under the supplied model. Communication, release delays, and queuing may dominate a chain. A sum of means would not establish the same worst-case claim.

  64. 64.Two devices timestamp send and receive using clocks with unknown relative offset. Their subtraction is used as a deadline-latency measurement. What basis is unestablished?

    Show answer and explanation
    1. The numerical ability to subtract two stored timestamps
    2. Only a unique sequence number on the packet
    3. A guarantee that common tick units imply synchronized clock epochs
    4. A valid relationship between the two clock readings

    Answer: A valid relationship between the two clock readings

    Cross-clock elapsed measurements need an appropriate offset/drift model or another measurement method. Matching units alone does not align epochs. A negative difference can reflect the clocks rather than impossible physical time travel.

  65. 65.A strict-priority queue always has a high-priority job ready, and low-priority jobs are served only when that queue empties. What can happen to a waiting low-priority job?

    Show answer and explanation
    1. No possible service even after all higher-priority work disappears
    2. Indefinite starvation
    3. A finite wait guaranteed solely by FIFO ordering within its class
    4. Automatic aging supplied by every strict-priority scheduler

    Answer: Indefinite starvation

    Ordering within one class does not ensure service across classes. Bounded low-priority response needs appropriate admission, budgets, aging, fairness, or other guarantees in the actual scheduling policy.

  66. 66.A round-robin model supplies 1 ms useful execution then 0.1 ms switching cost, repeating indefinitely. What fraction of processor time is useful under this model?

    Show answer and explanation
    1. 10/11
    2. 1
    3. 0.9 exactly
    4. 1/11

    Answer: 10/11

    Each cycle lasts 1.1 ms and contains one useful millisecond, giving 1/1.1=10/11. Smaller quanta can increase relative overhead; the actual cost model and response tradeoffs must be measured or bounded appropriately.

  67. 67.A lock protocol bounds acquisition wait by 1 ms. The protected operation itself may run indefinitely. Does bounded acquisition alone prove a bounded response for the whole operation?

    Show answer and explanation
    1. No; a bounded acquisition wait can never contribute useful evidence
    2. Yes; bounded waiting proves every protected computation terminates
    3. Yes; lock acquisition bounds all subsequent execution
    4. No; the operation's own work remains unbounded

    Answer: No; the operation's own work remains unbounded

    A response includes waiting, execution, suspension, and other delays. A bound on one component does not bound an unbounded component. Keep the scope of each timing/liveness guarantee explicit.

  68. 68.An algorithm is lock-free in the stated progress model: some operation completes despite contention. Does that alone bound the steps for each particular caller?

    Show answer and explanation
    1. No; an individual caller can starve
    2. Yes; every caller has one identical fixed step bound
    3. Yes; lock-free and wait-free are identical progress definitions
    4. No; lock-free algorithms forbid every operation from completing

    Answer: No; an individual caller can starve

    System-wide progress is weaker than per-operation bounded progress. Lock-free algorithms can repeatedly lose races for one thread. Timing requirements need the relevant progress, contention, and scheduling assumptions.

  69. 69.An operation is wait-free with a bounded number of its own steps. Its thread may be descheduled for an unbounded time. What deadline property does the step bound alone not establish?

    Show answer and explanation
    1. The stated bound on the operation's own steps
    2. The ability to analyze its algorithmic step complexity
    3. That the operation can make progress while it is scheduled
    4. A finite wall-clock completion bound

    Answer: A finite wall-clock completion bound

    A bound on executed steps does not supply processor availability, instruction latency, or preemption bounds. Real-time guarantees combine algorithmic progress with scheduling and hardware assumptions.

  70. 70.A deadline-constrained task uses try-lock and returns a defined failure result immediately if unavailable. What can this establish without guaranteeing lock acquisition?

    Show answer and explanation
    1. A proof that the caller never needs to handle lock failure
    2. A bounded unsuccessful attempt path under the supplied cost bounds
    3. Automatic correctness of all protected work after any result
    4. Guaranteed eventual acquisition under every allowed contention history

    Answer: A bounded unsuccessful attempt path under the supplied cost bounds

    Bounded failure can be a valid service contract if the caller/plant handles it appropriately. It differs from guaranteed successful completion. Both success/failure semantics and relevant execution costs need analysis.

  71. 71.A compare-exchange loop retries after every collision, and other writers may collide indefinitely. What is missing from a hard per-call execution bound?

    Show answer and explanation
    1. Only indivisibility of each compare-exchange attempt
    2. A justified retry/contention bound or another bounded-completion design
    3. Only enabling compiler optimizations on the same retry loop
    4. A guarantee that short attempts imply finitely many attempts

    Answer: A justified retry/contention bound or another bounded-completion design

    Atomic primitives can still participate in an unbounded retry loop. The algorithm's progress class and contention/scheduling assumptions must match the timing requirement. Average retries do not establish a hard maximum.

  72. 72.A task disables interrupts on core A, then modifies state also written by a task on core B. The cores run concurrently. What exclusion does the local mask not provide?

    Show answer and explanation
    1. Only a numerical ordering of local instruction addresses
    2. The ability to execute the local task on core A
    3. Protection against the locally masked interrupt class under its contract
    4. Protection against the remote writer

    Answer: Protection against the remote writer

    A local interrupt mask covers only its documented execution scope. Remote processors need an appropriate shared synchronization protocol. A critical section is valid only if it covers every relevant writer and memory-ordering requirement.

  73. 73.A scheduler lock prevents task switches but explicitly leaves interrupts enabled. An interrupt writes the same state the task assumes exclusive. What premise is false?

    Show answer and explanation
    1. That scheduler locking excludes the interrupt writer
    2. That interrupts can still occur under the given contract
    3. That mutual exclusion needs writer coverage
    4. That task switching is disabled by the stated primitive

    Answer: That scheduler locking excludes the interrupt writer

    Scheduler suspension and interrupt masking are different mechanisms. Use the actual primitive's scope and context rules. A name such as critical section does not establish exclusion beyond its documented semantics.

  74. 74.In C++, two threads increment an atomic integer with relaxed fetch_add. There is no counter wrap. What does atomicity supply without a separate payload-publication protocol?

    Show answer and explanation
    1. Indivisible counter updates, not general publication of unrelated data
    2. Only volatile access with no atomic modification order
    3. General synchronization of every nearby non-atomic payload write
    4. A data race on the correctly used atomic counter itself

    Answer: Indivisible counter updates, not general publication of unrelated data

    Atomic RMW prevents lost counter updates within its type/lifetime assumptions. Relaxed ordering does not by itself establish the needed inter-thread ordering for unrelated non-atomic payload. Atomicity and publication are separate properties.

  75. 75.In a one-shot C++ handoff, a producer writes ordinary payload then stores true to an atomic flag with release. A consumer's acquire load reads that exact true store before reading payload. What relation supports the payload read?

    Show answer and explanation
    1. The Boolean type alone protects every unrelated payload access
    2. Any relaxed load establishes the identical general publication relation
    3. The release/acquire synchronization orders the earlier payload write
    4. Only the consumer’s higher scheduling priority orders producer memory

    Answer: The release/acquire synchronization orders the earlier payload write

    The specified acquire reads from the release publication, establishing the relevant happens-before chain for earlier writes. The protocol also needs correct lifetime and no conflicting unsynchronized reuse; the flag does not solve those automatically.

  76. 76.A C++ acquire load reads an atomic flag's initial false value, not the producer's later release store of true. May the consumer use that read alone as proof that the new payload was published?

    Show answer and explanation
    1. No; release/acquire cannot publish any ordinary payload
    2. Yes; every acquire synchronizes with all future releases
    3. No; it did not observe the specified release publication
    4. Yes; a Boolean flag makes the new payload immutable

    Answer: No; it did not observe the specified release publication

    Synchronization needs the relevant relation, such as an acquire reading from the release publication. Merely choosing acquire does not mean the producer's new event was observed. The consumer must follow the predicate and lifetime protocol.

  77. 77.A C++ producer writes payload, releases flag=true, then rewrites the same non-atomic payload while a consumer may read it. Does the original release/acquire handoff alone make the later conflicting access safe?

    Show answer and explanation
    1. Yes; a true read orders every future producer write before itself
    2. No; an atomic flag cannot publish any earlier ordinary write
    3. No; later reuse needs its own ownership/synchronization protocol
    4. Yes; one release permanently protects all future conflicting writes

    Answer: No; later reuse needs its own ownership/synchronization protocol

    A release orders relevant preceding operations, not arbitrary future writes. Concurrent conflicting non-atomic reuse can be a data race. The protocol needs an acknowledgment, ownership transfer, immutable version, or another correct mechanism before reuse.

  78. 78.A single-buffer producer/consumer protocol has correct publication, but no acknowledgment that consumption finished. The producer starts the next payload immediately. What direction of coordination is missing?

    Show answer and explanation
    1. A guarantee that notification transfers permanent exclusive ownership to both sides
    2. Consumer completion before the buffer is reused
    3. Only the buffer's physical address
    4. Only producer readiness before first publication

    Answer: Consumer completion before the buffer is reused

    Publication tells the consumer when data is ready. Reuse also needs to know when the consumer no longer accesses that storage. A correct repeated handoff must establish both ownership directions, not merely repeat a ready signal.

  79. 79.A C++ reader copies ordinary non-atomic fields while a writer may modify them, then retries if an atomic sequence counter changed. Does discarding a failed copy retroactively remove a data race?

    Show answer and explanation
    1. No; no correct sequence-based design can ever be constructed
    2. No; conflicting unsynchronized accesses still require a valid language-level protocol
    3. Yes; one atomic sequence counter makes neighboring fields atomic
    4. Yes; retrying erases the previous conflicting accesses

    Answer: No; conflicting unsynchronized accesses still require a valid language-level protocol

    Validation after a read does not legalize a conflicting non-atomic access under the C++ model. Correct implementations need appropriate atomic fields, exclusion, immutable storage/reclamation, or another justified mechanism and ordering.

  80. 80.A ring algorithm assumes one producer: load head, write slot, then store head+1. Two producers both load the same head before either store. What can happen without another reservation protocol?

    Show answer and explanation
    1. Both write the same slot and one logical insertion is lost
    2. The separated load/store sequence reserves distinct slots automatically
    3. The consumer necessarily observes two distinct valid inserted items
    4. Only the physical ring capacity doubles

    Answer: Both write the same slot and one logical insertion is lost

    Single-producer ownership is part of the proof. An atomic head variable alone does not make a multi-step reservation atomic for multiple producers. A multiproducer design needs an appropriate claim/commit algorithm.

  81. 81.A consumer finishes reading a ring slot, then publishes its new tail with release. A producer acquires that tail before reusing the slot under the protocol. What access ordering is being established?

    Show answer and explanation
    1. Only a change in physical buffer address
    2. The old read completes before the subsequent overwrite
    3. Only the producer's new value becomes visible to a past read
    4. Every slot can be overwritten before any consumer finishes

    Answer: The old read completes before the subsequent overwrite

    The return/ownership direction protects reuse after consumption. Head publication protects availability; tail publication can protect free capacity and completed reads. The algorithm also needs its index, capacity, and generation invariants.

  82. 82.A ring has eight physical slots and represents empty by head==tail, deliberately reserving one slot to distinguish full. What maximum stored-item count follows?

    Show answer and explanation
    1. 4
    2. 7
    3. 9
    4. 8

    Answer: 7

    The reserved slot leaves usable capacity N−1=7 under this particular representation. Other designs can use all eight with additional state, but that is a different invariant and full/empty protocol.

  83. 83.A queue's two indices are updated independently. A diagnostic reads head, is preempted, then reads tail after more operations. What snapshot property is not automatic?

    Show answer and explanation
    1. That queue operations may run between separate loads
    2. The ability of separate atomic loads to return numbers
    3. That each individual observed index has a value
    4. That the pair represents one consistent instant

    Answer: That the pair represents one consistent instant

    Individually atomic fields do not necessarily provide an atomic multi-field snapshot. A correctness/occupancy check needs a protocol appropriate to its tolerated approximation, invariant, and concurrent writers.

  84. 84.A compare-exchange expects pointer A. While paused, another thread changes A→B→A, with all nodes kept alive. The compare-exchange then succeeds. What intervening fact did pointer equality alone fail to detect?

    Show answer and explanation
    1. That the current pointer value equals A
    2. That another thread once stored pointer B
    3. Atomicity of the compare-exchange operation itself
    4. The state changed and returned to the same pointer value

    Answer: The state changed and returned to the same pointer value

    This is an ABA history. Current equality does not encode intervening logical state. Suitable generation/reclamation/algorithm invariants can be needed; a stronger memory order alone does not make pointer values remember history.

  85. 85.A shared node is unlinked atomically, but another reader already holds its address and may still access it. Why can immediate deallocation be unsafe?

    Show answer and explanation
    1. Every removed node must remain allocated forever under every protocol
    2. Unlinking does not prove all readers have finished
    3. Only the node’s position after removal matters
    4. Atomic unlink cancels every previously copied pointer automatically

    Answer: Unlinking does not prove all readers have finished

    Publication/removal and memory reclamation have distinct conditions. Readers' lifetimes must be covered by a correct ownership, reference, hazard, epoch, or equivalent scheme before freeing/reusing storage.

  86. 86.An atomic operation on a specific target is implemented using an internal lock. An ISR preempts the task holding that lock and invokes the same operation. What progress assumption is unsafe?

    Show answer and explanation
    1. That target implementation choices can affect latency
    2. That the operation is intended to be indivisible
    3. That the interrupt can preempt the task in the supplied scenario
    4. That every language-level atomic operation is inherently ISR-safe and lock-free

    Answer: That every language-level atomic operation is inherently ISR-safe and lock-free

    Atomic semantics do not promise every type/target uses a lock-free implementation. Context safety and timing require the implementation's actual guarantees. A hidden lock can create the same owner-cannot-run problem as an explicit one.

  87. 87.A critical section masks ordinary interrupts, but a nonmaskable handler also writes its protected state. What writer-coverage issue remains?

    Show answer and explanation
    1. Only task-to-task context switching can affect the state
    2. The nonmaskable handler can still access the state concurrently with the section
    3. Every interrupt is excluded by the name critical section
    4. Ordinary interrupt masking makes all shared state immutable

    Answer: The nonmaskable handler can still access the state concurrently with the section

    Exclusion depends on the precise mechanism and all relevant writers. A documented exception such as a nonmaskable context must be handled by an appropriate separate protocol or design; ordinary masking is not universal exclusion.

  88. 88.An operation token includes a two-bit generation that increments on every slot reuse. After four reuses it returns to the old generation. What stale-token risk remains if an old callback can survive that long?

    Show answer and explanation
    1. Every finite tag prevents stale matches for an unlimited lifetime
    2. A token can match again after generation wrap
    3. The slot number necessarily changes when its generation wraps
    4. Only an inconsequential display count changes

    Answer: A token can match again after generation wrap

    Finite tags need a lifetime/reuse bound or another mechanism that excludes ambiguous reuse. Adding generation bits delays collisions but does not provide an unbounded uniqueness guarantee by itself.

  89. 89.Two threads each perform seq_cst load(count), check count<1, then seq_cst fetch_add(1). Both loads see zero before either increment. What count can result despite sequentially consistent primitives?

    Show answer and explanation
    1. 1 necessarily
    2. 0 necessarily
    3. The count cannot be observed at all
    4. 2

    Answer: 2

    Each operation is ordered, but the whole check-and-increment sequence is not one atomic conditional reservation. Both checks can pass. Use a correct compound protocol, such as an appropriate compare-exchange loop or lock, with its progress/overflow conditions.

  90. 90.An unsigned 8-bit atomic ticket counter returns distinct values until wrap. A service promises never to repeat any lifetime ticket over arbitrarily many operations. What is missing?

    Show answer and explanation
    1. A guarantee that atomic integer types never wrap
    2. Only indivisibility of the increment operation
    3. A uniqueness scope/epoch strategy beyond the finite counter
    4. Only the decimal formatting of the returned ticket

    Answer: A uniqueness scope/epoch strategy beyond the finite counter

    There are only 256 values. Atomicity does not increase the identity space or prevent eventual reuse. An unbounded lifetime-uniqueness promise needs a different scope or supporting protocol rather than a bounded counter alone.

  91. 91.A supplied demand function is dbf(L)=max(0,floor((L−D)/T)+1)×C. With C=2,T=5,D=3,L=8, what demand follows?

    Show answer and explanation
    1. 4
    2. 6
    3. 2
    4. 8

    Answer: 4

    Compute floor((8−3)/5)+1=2 jobs, each with execution two, so demand is four. The function's applicability depends on the task/deadline model; this exercise supplies it explicitly.

  92. 92.Two jobs release together at time zero, each needs 0.6 ms and each is due at 1 ms on one ideal processor. Their periods are 10 ms. What prevents both deadlines being met?

    Show answer and explanation
    1. 1.2 ms of required work exceeds the 1 ms interval capacity
    2. The jobs can never execute on a single processor under any deadlines
    3. Total average processor utilization necessarily exceeds one
    4. Only alphabetical task-name ordering prevents the deadline

    Answer: 1.2 ms of required work exceeds the 1 ms interval capacity

    Both jobs' complete work is due inside the same one-millisecond interval. Low long-run utilization does not create enough capacity in that interval. This is a direct demand-versus-supply counterexample.

  93. 93.Two simultaneous jobs each need 0.4 ms and are due by time 1. Their supplied total required dispatch overhead is 0.3 ms within that interval. What total demand follows?

    Show answer and explanation
    1. 0.7 ms
    2. 0.5 ms
    3. 1.1 ms, exceeding the interval
    4. 0.8 ms, with all overhead excluded

    Answer: 1.1 ms, exceeding the interval

    The demand is 0.4+0.4+0.3=1.1 ms. An analysis that omits unavoidable overhead can certify an infeasible implementation. The overhead count is explicitly supplied rather than inferred from an unspecified scheduler.

  94. 94.After overload, a scheduler drops expired jobs before running fresh ones. Does dropping establish that the original requirement to complete every job by its deadline was met?

    Show answer and explanation
    1. No; dropping is a different service/degradation contract
    2. Yes; deleting the record erases its historical deadline miss
    3. No; dropping expired work can never serve a legitimate requirement
    4. Yes; every possible deadline requirement counts completed jobs only

    Answer: No; dropping is a different service/degradation contract

    Dropping can be appropriate for a specified freshness or degraded-service policy. It does not retroactively satisfy an all-jobs deadline guarantee. Count/report outcomes against the actual promised contract.

  95. 95.A simple response-time proof assumes each task's deadline is at most its period. A revised task has deadline 30 and period 10, allowing overlapping jobs. What analysis premise must be reconsidered?

    Show answer and explanation
    1. Only the unit used to display the unchanged period
    2. Only the priority label printed in the report
    3. A guarantee that relaxed deadlines preserve all old theorem assumptions
    4. The proof's constrained-deadline/per-job assumptions

    Answer: The proof's constrained-deadline/per-job assumptions

    Longer deadlines can permit multiple outstanding jobs of one task and require an applicable arbitrary-deadline/busy-period analysis. A relaxed deadline does not automatically validate a theorem whose model assumptions have changed.

  96. 96.A parser loop processes n items, and each item triggers a second scan of all n items. A timing claim was based on a single n-step scan. What growth term was omitted?

    Show answer and explanation
    1. Only the count of distinct item types
    2. A guarantee that every pair of nested full scans is linear
    3. Quadratic work proportional to n²
    4. Only a constant dispatch cost independent of n

    Answer: Quadratic work proportional to n²

    The nested traversal performs n×n iterations under the supplied structure. Input-size bounds and per-iteration costs are needed for a timing bound. A linear estimate cannot silently stand in for the quadratic path.

  97. 97.A job may perform two attempts, each taking at most 3 ms. Its deadline is 5 ms and no other work exists. Does that retry limit alone guarantee completion of both attempts by the deadline?

    Show answer and explanation
    1. Yes; unsuccessful attempts consume no processor time
    2. No; the two-attempt bound can be 6 ms
    3. No; retries can never fit any real-time deadline
    4. Yes; any finite retry limit meets every finite deadline

    Answer: No; the two-attempt bound can be 6 ms

    A finite work bound must still fit the required interval. Two times three is six, beyond five. The protocol may need another deadline/failure contract, but the arithmetic does not support the stated guarantee.

  98. 98.A controller computes a command before its deadline but blocks indefinitely while enqueueing it to the actuator channel. A metric stops timing at computation end. What required path can be omitted?

    Show answer and explanation
    1. Only the byte format of the command payload
    2. Output delivery/commit before the relevant deadline
    3. Only the already measured arithmetic computation
    4. A guarantee that computation completion proves actuator acceptance

    Answer: Output delivery/commit before the relevant deadline

    A deadline endpoint must match the actual required outcome. Computation, queue admission, transport, and actuation can be different completion points. Bound and observe the relevant handoff rather than assume a local return means external completion.

  99. 99.At time 5, a ready job needs at least 3 more ms of exclusive CPU and has absolute deadline 7. With no speedup or parallel execution, what earliest finish and feasibility follow?

    Show answer and explanation
    1. Time 6; priority doubles CPU speed
    2. Time 7; every ready job gets enough time
    3. Time 5; waiting time is the only response component
    4. Time 8; the deadline is already infeasible

    Answer: Time 8; the deadline is already infeasible

    Only two milliseconds remain before deadline seven, but at least three of execution are needed. Even immediate uninterrupted service finishes at eight. Priority changes cannot supply more than the stated processor capacity.

  100. 100.At time zero, job A needs 3 ms and is due at 5; job B needs 1 ms and is due at 2. No other work or overhead exists. What happens under A-first FIFO versus B-first execution?

    Show answer and explanation
    1. FIFO misses B; B-first completes both on time
    2. Both orders necessarily miss A
    3. Both orders meet both deadlines
    4. FIFO meets both; B-first misses A

    Answer: FIFO misses B; B-first completes both on time

    A-first finishes A at three and B at four, after B's deadline two. B-first finishes B at one and A at four, satisfying both. Ordering can matter even when total work fits the longer horizon.

  101. 101.A reboot resets the monotonic counter to zero, while a persisted absolute deadline from the old boot is reused without boot identity or conversion. What temporal context is missing?

    Show answer and explanation
    1. Only the numerical width of the persisted deadline field
    2. Only the timezone printed for the deadline
    3. The clock epoch/boot to which the deadline belongs
    4. A guarantee that monotonic counters share one lifetime-wide epoch

    Answer: The clock epoch/boot to which the deadline belongs

    Monotonicity within a boot does not align counters across resets. Persisted deadlines need a valid recovery interpretation, clock/epoch context, and appropriate expiration policy. Numeric comparison alone can treat an obsolete deadline as current.