putting-the-you-in-cpu
putting-the-you-in-cpu copied to clipboard
Time Slicing Diagram
Chapter 2 discusses how target latency works and provides a diagram for clarification. According to the explanation:
The target latency is the time it takes for a process to resume execution after being preempted...
Based on this explanation, shouldn't the target latency in the diagram start from the beginning of Process 2
and finish at the end of Process 3
designated by the following image?
It also presents an approach to calculate the timeslices based on a specific target latency:
Timeslices are calculated by dividing the target latency by the total number of tasks.
Suppose we have 3 processes, and the target latency is 9ms, meaning there can be a 9-millisecond gap between the bursts of each process. Using the given method, we divide 9 by 3 and realize that each process can run for 3 milliseconds and therefore must wait for the subsequent processes for 6 milliseconds. This contradicts the definition of the target latency.