Log in from a computer to take this course

You'll need to log in from a computer to start Fundamentals of Operating Systems. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store
Learn
Short-term Scheduler

After the long-term scheduler moves a process into the ready queue, the short-term scheduler operates next to pass it onto the CPU. Alongside this power to admit processes, the short-term scheduler can also forcibly recall processes from the CPU through preemption. This is useful if a higher priority process suddenly comes along and needs to be executed right away. The scheduler can also preempt set time intervals in order to more fairly share the processor and prevent a single long-running process from hogging the CPU. All of this is accomplished by having the short-term scheduler be the sole maintainer of context switches, storing and reloading the relevant process information as needed.

Medium-term Scheduler

However this is an expensive operation, so it is best done infrequently to mitigate the impact to throughput from the increased overhead. When a process attempts to access a resource that is not available or has a prolonged lack of activity, the medium-term scheduler kicks in to remove the process from the CPU and free up the necessary cores for other processes. This is done by blocking the process, and some longer waits also cause the process to be moved to a special swap section of the hard drive to further free up memory.

Instructions

What are some problems that could arise if the medium-term scheduler moves a process out of memory and onto the hard drive?

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?