190 views
6 6 votes

Which of the following operations normally require the processor to be executing in kernel mode?

  1. Issuing a command directly to a disk controller
     
  2. Updating the address of the system trap table
     
  3. Adding two integers stored in user memory
     
  4. Executing a return-from-trap instruction
     
  5. Reading a local variable from the current user stack

1 Answer

1 1 vote

Raw device access must be protected because allowing an application to directly control devices would bypass operating-system protection.

The trap table must also be configured only by trusted kernel code. 

Otherwise, a user program could redirect traps or system calls to an arbitrary location.

The return-from-trap instruction changes the privilege level and restores protected processor state, so it is also privileged.

Ordinary arithmetic and accesses to valid locations in the process’s own user address space do not require kernel mode.

Answer : A; B; D

Answer:
Position:
Show:

Related questions

1 1 vote
1 1 answer
208
208 views
GO Classes asked Jul 16
208 views
Consider a process that successfully executes a member of the $\texttt{exec()}$ family of system calls. Which of the following statements are correct?The process continue...
2 2 votes
1 1 answer
188
188 views
GO Classes asked Jul 16
188 views
Consider the following statements about processes and threads. Which of them is/are correct?Using multiple threads can allow a process to continue performing useful work ...
1 1 vote
1 1 answer
214
214 views
GO Classes asked Jul 16
214 views
Which of the following statements are correct for threads belonging to the same process?They share the process’s code, data, and heap. Every thread has its own stack and ...
1 1 vote
1 1 answer
169
169 views
GO Classes asked Jul 16
169 views
Consider the following events that occur when a user process makes a system call:The kernel executes the requested service routine. The library wrapper places the system-...