Tenta Flashcards
What are the main components of a computer system?
CPU, Memory (RAM/ROM), Input/Output Devices, and System Bus
What is the difference between volatile and non-volatile memory?
Volatile memory (e.g., RAM) loses data when powered off; non-volatile memory (e.g., SSD, HDD) retains data.
How does an operating system provide resource abstraction?
It hides the complexity of hardware by providing standardized interfaces (e.g., file systems, virtual memory).
Can a single-core CPU run multiple programs simultaneously?
Yes, via time-sharing. The CPU switches between tasks rapidly.
Name two mechanisms operating systems use to ensure protection in multiprogramming.
1) User and Kernel Modes, 2) Access Control via Permissions.
What are the steps of the processor instruction cycle?
Fetch, Decode, Execute, Store.
Describe the difference between stack-based and register-based architectures.
Stack-based uses a last-in, first-out stack for operations; register-based uses general-purpose register
What are the advantages of a stack-based architecture?
Simplified instruction set and no need to manage register allocation manually.
What is the role of an interrupt in process management?
Interrupts allow the CPU to pause a running process and handle an urgent task (e.g., I/O operation
What is a race condition in synchronization?
A situation where multiple processes access shared resources concurrently, leading to unpredictable results.
Name two techniques to prevent deadlock.
1) Avoiding circular wait, 2) Resource allocation graphs.
In the Five-State Process Model, what happens during a “Blocked to Ready” transition?
A waiting process receives the needed resource or event signal and is ready to execute.
Why would you recommend stack-based architecture for teaching kids?
Simple execution model and less overhead, making it easier to understand basic programming concepts.
Why are smaller unit allocation sizes not always ideal for file storage?
They reduce internal fragmentation but increase metadata overhead.
For a self-driving car, which device communication method should you use?
Interrupt-driven communication for real-time responsiveness to human inputs (e.g., braking).