From 0600d78c66f1f8416cff18e090a47630d82cc054 Mon Sep 17 00:00:00 2001 From: Andrew Sasamori <100668625+ASasamori@users.noreply.github.com> Date: Sun, 5 May 2024 22:08:35 -0400 Subject: [PATCH] 2nd typo in Chapter 8 Not sure about this sentence: "Second, even though we are saving all the state needed to resume a process, modern processors have several caches." Wasn't sure if this was referring to the thread state or like the data structures associated with the thread, so changing it to: "... we are saving the state needed to resume a process... " Essentially, just omitting the word, 'all'. --- content/scheduling/virtual.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/scheduling/virtual.ipynb b/content/scheduling/virtual.ipynb index 0e38d979..ed873567 100644 --- a/content/scheduling/virtual.ipynb +++ b/content/scheduling/virtual.ipynb @@ -67,7 +67,7 @@ "Tasks that are waiting for something go into the **Blocked** state, the kernel removes them from the run queue, saves all the processor registers into the thread structure, and then make a **scheduling** decision to select some other process to run from the run queue. The kernel changes the state of the selected task from **Ready** to **Running** and loads its registers from the task structures into the CPU registers.\n", "\n", "The process of switching the CPU between two tasks is called a **Context Switch**. \n", - "Context switches are expensive for two reasons. First, there is overhead to save the state (i.e., CPU registers) of the outgoing process, select the next process to run, and load the state of the incoming task. Second, even though we are saving all the state needed to resume a process, modern processors have several caches (e.g., data and instruction caches, the translation look aside buffer, etc.) that help an application run more quickly. As the application runs, these caches are filled with instructions or data that are related to the executing process. When a new task is placed on a CPU, the contents of these caches are no longer related to the running process, and either need to be cleared by the OS, or need to be replaced by the new process as it executes.\n", + "Context switches are expensive for two reasons. First, there is overhead to save the state (i.e., CPU registers) of the outgoing process, select the next process to run, and load the state of the incoming task. Second, even though we are saving the state needed to resume a process, modern processors have several caches (e.g., data and instruction caches, the translation look aside buffer, etc.) that help an application run more quickly. As the application runs, these caches are filled with instructions or data that are related to the executing process. When a new task is placed on a CPU, the contents of these caches are no longer related to the running process, and either need to be cleared by the OS, or need to be replaced by the new process as it executes.\n", "\n", "Once whatever causes the task to be blocked is resolved, the kernel changes the state of the task from **Blocked** to **Ready**, and places the task struct onto the run queue so it can be run the next time there is a scheduling decision to be made. \n", " \n",