448 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.4k
views
1 answers
1 votes
jayadev asked Oct 10, 2021
1,388 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 process will be?
475
views
2 answers
1 votes
delxbydelt asked Mar 15
475 views
Consider a uniprocessor system with n processes in the ready queue. Round robin scheduling with time quantum x is used for process scheduling. Assume each process requires kx seconds to complete and ... nkx B) k(nx-1)C) k(nk+n)D) x(nk-n+1)
4.7k
views
6 answers
8 votes
rahul sharma 5 asked Aug 26, 2017
4,712 views
If we have only one process in ready queue with burst time "m", then how many context switching will happen using round robing scheduling with time quantum ... that dispatching the process first time is not counted as a context switch.
11.6k
views
1 answers
6 votes
sunil sarode asked Nov 15, 2017
11,637 views
Measurements of a certain system have shown that a process runs, on the average, for time T before blocking for Input/Output. Process switch ... c and hence option D with example ,Thanks and sorry if it is naive question :)