Search the courses, subjects, tracks, games and features, or jump straight to a page.
Learn it your way
A short class with Sarah and her students. The other ways are under More.
Sign up free to listen. Transcripts are free to read.
Today, we’re going to discuss thrashing. In computing, thrashing occurs when processes spend more time swapping pages in and out of memory than executing. Can anyone tell me what might cause this?
Is it when there are not enough memory frames available?
Excellent! When a process cannot keep its active pages in memory, it leads to numerous page faults. What is a page fault?
It’s when a program tries to access a page that is not currently in memory.
Correct! So, if a process needs to keep referencing pages that aren't in memory, it creates a cycle of frequent page faults. Now, let’s talk about how this affects CPU utilization.
When a system is thrashing, CPU utilization can drop significantly. What do you think the operating system might do in response to low CPU utilization?
It might add more processes to the running state?
Exactly! Increasing the number of processes can worsen the situation. When more processes are introduced, how does this affect the already existing processes?
It would decrease the amount of memory available for them, increasing thrashing.
Right! This is how thrashing can cripple system performance. Does anyone have an idea of a model that can help manage this?
One way to mitigate thrashing is by using the working set model. Does anyone know what the working set is?
Is it the set of pages that a process needs to keep in memory for it to run efficiently?
Spot on! The working set is defined by how many distinct pages a process references in a fixed window of time. If we keep these active pages in memory, what could happen?
It should reduce the number of page faults, right?
Exactly! Using the working set model allows for better allocation of memory frames, ensuring processes have what they need to function effectively.
Occurs when processes cannot keep all active pages in memory, leading to excessive page faults.
An indicator of performance that measures the frequency of page faults in a system.
A model used to determine the necessary pages for a process to minimize thrashing.
An example of thrashing occurs when a system running multiple processes has insufficient RAM allocated, causing processes to continuously swap pages, resulting in delayed execution.
In a scenario where a process frequently accesses various pages of data but has only a few allocated frames, it experiences high page fault rates, leading to thrashing.
In memory tight, pages in flight, if frames are few, thrashing will ensue.
Imagine a chef trying to cook while only having two pots. If every ingredient is in a different pot, they will spend more time moving pots than actually cooking - a scenario similar to thrashing in computing.
To remember the impacts of thrashing: 'PAGES' - Poor Performance, Always Greatly Expanded Swapping.
T.H.R.A.S.H: Time Halted Rapidly As Swapping Happens.
Term
What is thrashing?
Click to flip
Term
Define page fault.
Click to flip
Term
What is the working set of a process?
Click to flip
A situation where a process spends more time swapping pages in and out of memory than executing.
An event that occurs when a program tries to access a page not currently in the main memory.
The set of pages that a process must keep in memory to function efficiently during a given period.
A measure of how effectively the CPU time is spent executing processes.
The number of processes that are loaded and executed in memory at the same time.
This section describes thrashing, its causes within process execution in computing systems, and the consequent effects on CPU utilization and overall system performance.
Examining the phenomenon of thrashing, this section highlights how insufficient page frames can lead to high page-fault rates, significantly impacting CPU utilization and overall system performance. It also discusses mechanisms that can manage thrashing, including the working set model.
Thrashing occurs in computing when a process spends more time swapping pages in and out of memory rather than executing instructions. This situation arises when a process does not have enough active pages available in memory due to frame allocation issues. The section outlines: