OS & Hardware

Which set of operating modes is defined by the RISC-V privileged architecture?

  1. AMachine mode, supervisor mode and user mode
  2. BReal mode, protected mode and long mode
  3. CAddress mode, data mode and instruction mode
Show answer and explanation

Answer: A. Machine mode, supervisor mode and user mode

The RISC-V privileged architecture defines machine mode (M), the most privileged; supervisor mode (S), where the OS kernel runs; and user mode (U), where applications run. Machine mode is always implemented, and power-on code and firmware run there. Small microcontrollers typically have only M and U, while systems running an OS have M, S and U; the virtualization extension adds hypervisor modes. Real, protected and long modes are x86 terms.

  • A. Correct. The three modes M, S and U.
  • B. These are x86 operating-mode terms.
  • C. No such mode classification exists.
Practice this topic Back to topic

More OS & Hardware questions

  1. When returning from an interrupt or exception handler, why is a dedicated return instruction (such as RISC-V's sret or mret) used instead of an ordinary function return?
  2. In a system requiring real-time behavior, which factor most increases interrupt latency, the time from an interrupt occurring until its handler starts?
  3. Which describes an NMI (non-maskable interrupt)?
  4. On a multicore system, when the OS modifies a page-table entry to revoke a mapping, what must be done?
  5. What generally happens when a program accesses an address the OS has not allocated?