retagged by
1,149 views
1 votes
1 votes
Consider the following statements:-

1. Change program counter value

2. Change page table register context

3. Disable interrupt

4. Initiate I/o on a disk using memory mapped I/o

which of the above can be executed in  only in system mode?

a.) 1,3,4

b)2,3,4

c.)1,2,3

d)2,4,1

Please give valid explanation with your answer.
retagged by

1 Answer

3 votes
3 votes
The answer is b) 2,3,4

Reason :

2) Page table register (PTBR) holds the base address for a process in virtual memory system. Since it is accessed by Operating System, it needs a system level priviledge for security reasons.

3) Disabling interrupts can only be done in kernel mode.

4) Memory mapped I/O is always performed in kernel mode to provide protection for I/O. A process cannot perform any memory mapped I/O in user mode.

Changing the value of PC doesn't require a kernel level privileges as this is done in case of branch instructions and branching doesn't require kernel level privileges.

Hence leaves us with only option b)
edited by

Related questions

3 votes
3 votes
2 answers
1
1 votes
1 votes
1 answer
2
Ayush Upadhyaya asked Oct 30, 2018
1,175 views
I think percentage of processor time consumed should be $\frac{ \,ISR\,time}{ISR\,time+\,Data\,Transfer\,Time}=\frac{100}{100+122}$.Is it correct?
1 votes
1 votes
1 answer
3
Na462 asked Sep 24, 2018
801 views
4 votes
4 votes
1 answer
4
Na462 asked Aug 13, 2018
1,897 views
Please Explain Every Point :)Ans. All are Correct