in Operating System
390 views
1 vote
1 vote

Does non preemptive CPU scheduling needs hardware support.

kindly explain.

in Operating System
by
390 views

1 Answer

0 votes
0 votes

At this point let me point out that with several different users sharing the same resources, the operating system needs to act a bit like a police officer and keep the order…

It would be an interesting world if students could read my gradebook on the andrew system and see each others grades -- or if faculty and staff could see each other's salaries, &c...

But the OS is a piece of software, like any other, so how can it do this?

The answer, as was the case for preemptive scheduling, is that the OS needs some level of support from the hardware…

Hardware can enforce limits on what memory addresses a particular program can access, &c….

The OS can change these values by using privleged instructions. These instructions may be incorporated into ISRs, or they may be invoked via special instructions called traps....

In either case, the hardware verifies that the user is in fact the OS (or other privleged process) before allowing the instruction... If this isn't the case, an exception occurs. Exceptions are often handled in a way similar to interrupts, via a service routine....

 

1. https://gateoverflow.in/357526/Gate-cse-2021-set-2-question-14 

 

2. https://stackoverflow.com/questions/41404689/to-implement-os-for-preemptive-tasks-what-hardware-feature-should-cpu-support

 

 

by

Related questions