A task that busy-waits on a lock variable by using a Test-and-Set instruction in a two-instruction loop,
Question:
A task that "busy-waits" on a lock variable by using a Test-and-Set instruction in a two-instruction loop, as in Figure 12.15, wastes bus cycles that could otherwise be used for computation. Suggest a way around this problem that involves a centralized queue of waiting tasks that is maintained by the operating system. Assume that the operating system can be called by a user task and that the operating system chooses which task is to be executed on a processor from among those ready for execution.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Computer Organization
ISBN: 9780072320862
5th Edition
Authors: V Carl Hamacher, Carl Hamacher, Zvonko G Vranesic, Safwat G Zaky
Question Posted: