1/16
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Define privilege and priority.
Privilege determines whether a program can access restricted system resources, while priority determines the order in which processes are handled.
Difference between user mode and supervisor mode.
User mode restricts access to critical system resources, while supervisor mode allows full access to hardware and system memory.
What is the PSR?
The Processor Status Register (PSR) stores information about the current state of the processor, including condition codes (NZP), priority level, and privilege mode
User space vs system space.
User space is the portion of memory accessible to user programs, while system space is reserved for the operating system and cannot be accessed directly by user programs.
Why are there two stacks?
for user mode and supervisor mode to protect system operations and ensure security during interrupts or system calls.
What is memory-mapped I/O?
allows input and output devices to be accessed using memory addresses, so the CPU can interact with devices as if they were memory locations.
Purpose of KBDR and DDR.
KBDR stores data from the keyboard, while DDR stores data to be displayed.
Purpose of KBSR and DSR.
KBSR and DSR are status registers that indicate whether the keyboard or display device is ready for input or output.
Define polling.
a method where the CPU repeatedly checks a device’s status register to see if it is ready.
Why is polling inefficient?
because the CPU wastes time constantly checking devices instead of performing useful work.
Why does a user program need system calls?
to safely access hardware or perform privileged operations that are restricted in user mode.
What happens during a TRAP instruction?
the processor switches to supervisor mode, saves the current state, and jumps to a predefined system routine.
What happens during RTI?
restores the processor’s previous state and returns execution to the interrupted program.
Why are interrupts better than polling?
because the CPU only responds when a device signals it needs attention, rather than constantly checking.
Three conditions for an interrupt.
The device requests service
Interrupts are enabled
The device’s priority is higher than the current process
When does the processor check the INT line?
at the end of each instruction cycle.
What happens if INT is active?
the processor saves its state and transfers control to the interrupt service routine.