Question

In: Other

In Chapter 5, we discussed possible race conditions on various kernel data structures. Most scheduling algorithms...

In Chapter 5, we discussed possible race conditions on various kernel data structures. Most scheduling algorithms maintain a run queue, whichlistsprocesseseligibletorunonaprocessor.Onmulticoresystems, there are two general options: (1) each processing core has its own run queue, or (2) a single run queue is shared by all processing cores. What are the advantagesand disadvantages of each of these approaches?

Solutions

Expert Solution

  • The main advantage of every processing core having its own run queue is that there is no contention over a solo run queue when the scheduler is running simultaneously on two or more processors.
  • When a scheduling decision should be made for a processing core, the scheduler only want to look no further than its private run queue.
  • A disadvantage of a particular single run queue is that it have to be protected with locks to avoid a race condition and a processing core may be accessible to run a thread, yet it must first acquire the lock to regain the thread from the single queue.
  • Though, load balancing would expected not be an issue with a single run queue, while when each processing core has its own run queue, there should be some sort of load balancing between the dissimilar run queues.

Related Solutions

(Python or C++) We are going to implement the following scheduling algorithms that we discussed in...
(Python or C++) We are going to implement the following scheduling algorithms that we discussed in class: 1. First-Come First-Served (FCFS) 2. Shortest Remaining Time First (SRTF) 3. Highest Response Ratio Next (HRRN) 4. Round Robin, with different quantum values (RR) We are interested to compute the following metrics, for each experiment: _ The average turnaround time _ The total throughput (number of processes done per unit time) _ The CPU utilization _ The average number of processes in the...
Individuals and organizations build various data structures and algorithms to solve real-life problems. Furthermore, many data...
Individuals and organizations build various data structures and algorithms to solve real-life problems. Furthermore, many data analysts tend to use Big-O notation for analyzing algorithms. In your own words, explain ways by which people can specify (i). data structures and (ii) algorithms, that they build and use.
1. Short Answer. The last 5 problems demonstrate the various accounting methods we studied in Chapter...
1. Short Answer. The last 5 problems demonstrate the various accounting methods we studied in Chapter 12 to account for Investments. Note that in only 2 of these methods (Problems 2 and 4) is the unrealized gain or loss on the investment recorded and reported in the Income Statement. In the other 3 cases, the unrealized gain or loss in generally either not recorded at all Problems 1 and 5), or if it is recorded, it is reported as a...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT