First half Flashcards
(81 cards)
What is a process in the context of an operating system?
A program in execution, consisting of executable code, associated data, and a Process Control Block (PCB).
What information does the OS maintain in control structures?
Tables for memory, I/O devices, files, and processes.
What is the role of the Process Control Block (PCB)?
It contains all information required by the OS to manage a process, such as identifiers, CPU state, and control information.
What is stored in the memory tables of the OS?
Information about memory allocation, protection, and management.
What do I/O tables track?
The status and allocation of input/output devices and channels.
What is the purpose of the file tables?
To manage information about file existence, location, and status.
How are processes organized in the process tables?
Using cross-references to memory, I/O, and file tables.
What is the primary function of the Process Control Block?
To store process attributes for management and administration by the OS.
What are the three main categories of information in a PCB?
Process identification, CPU state information, and process control information.
Why are PCBs essential in process management?
They allow the OS to access all attributes of a process for efficient management and execution.
What are the seven process states in an operating system?
NEW, READY, RUNNING, BLOCKED, BLOCKED SUSPEND, READY SUSPEND, and TERMINATED.
What happens in the NEW state?
The process is newly created and awaiting resource allocation.
What triggers a process to transition to the READY state?
The process is fully built, loaded into RAM, and waiting for CPU allocation.
When does a process enter the RUNNING state?
When the CPU is allocated to it by the scheduler.
What causes a process to transition to the BLOCKED state?
Waiting for a resource or I/O task.
What is the BLOCKED SUSPEND state?
A process in a blocked state is swapped out to secondary memory due to insufficient RAM.
What happens in the READY SUSPEND state?
A ready process is swapped out of main memory to secondary memory.
When does a process enter the TERMINATED state?
When it has completed execution, and its PCB is deleted.
What is a state transition diagram?
A visual representation of process state changes and the triggers for each transition.
How does the OS decide on process state transitions?
Based on events like CPU allocation, resource availability, or process completion.
What are threads in an operating system?
Units of dispatch within a process that share resources but operate independently.
What are the two types of threads?
User-level threads and kernel-level threads.
How do user-level threads differ from kernel-level threads?
User-level threads are managed by applications, while kernel-level threads are managed by the OS.
What is an advantage of multiple threads in a single process?
They allow concurrent execution paths with shared memory and resources.