400 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

 

 

Related questions

1 votes
1 votes
1 answer
1
jayadev asked Oct 10, 2021
1,257 views
in round robin algorithm if a process with burst time = 10 arrived at t=0 and time quantum is 2 units, context switch time is 2 units . Then completion time of the proces...
8 votes
8 votes
6 answers
3