retagged by
890 views
5 votes
5 votes

Which of the following should be allowed only in Kernel mode?

  1.  Changing mapping from virtual to physical address
  2.  Mask and unmask interrupts
  3.  Disabling all interrupts
  4.  Reading processor status register                                                                                   
  5.  Receive a packet of data from the network                                                                          
  6.  Cause a trap
  1. $(i)$, $(ii)$ , $(iii)$ and  $(v)$
  2. $(i)$, $(ii)$ , $(iv)$ and $(vi)$
  3. $(ii)$,$(iv)$ and $(vi)$
  4. $(i)$, $(ii)$, $(iii)$, $(iv)$, $(v)$ and $(vi)$
retagged by

1 Answer

Best answer
8 votes
8 votes

Changing mapping from virtual to physical address - >This can only be done in kernel mode. If you do it in user mode, a process could overwrite another process’ (or the kernel’s) memory.

Mask and unmask interrupts -> This can only be done in kernel mode.

Disabling all interrupts -> This can only be done in kernel mode. Interrupts are used in context switches or to notify the system when retrieving data from the hard disk.

Reading processor status register   - > This can  be done in user mode and Kernel mode both. so NOT in ONLY in Kernel mode as asked in question.

Receive a packet of data from the network  -> This can only be done in kernel mode. The kernel has to decide which process gets the packet, and needs to keep the contents secret from processes that aren’t going to get the packet.

Cause a trap -> This can be done by user programs. It’s the only way user can enter the kernel to do a system call. 

selected by
Answer:

Related questions

1 votes
1 votes
2 answers
2
2 votes
2 votes
1 answer
4
Bikram asked Jan 16, 2017
560 views
Suppose there are five processes in the ready queue as shown below:$$\begin{array}{|c|c|c|} \hline i & T(Pi) & \text{Priority} \\ \hline 0 & 350 & 5 \\ \hline 1 & 125 & ...