Processes and OS Flashcards
What are the 4 Operating Subsystem Managers?
Processor Manager
Memory Manager
Device Manager
File Manager
What is the memory manager’s main job?
It’s in charge of main memory
It acts as a go-between between processes and memory
What is the processor manager’s main job?
Decides how to allocate CPU time
What is the device manager’s main job?
Monitors control unit + all devices
What is the file manager’s main job?
Keeps track of all files in the system
What tasks does the Memory Manager perform?
Preserve+Protect memory occupied by OS Check validity of requests for memory Allocate memory areas that aren't in use For multi-user system, keep track of which users are in which memory areas Deallocate memory when not in use
What tasks does the Processor Manager perform?
Creates processes for new tasks
Performs initialisation of new processes
Keeps track of the statuses of processes
Assigns processes to the CPU when available
Changes process states as events occur
Handles process termination on end or quit
Handles inter-process communication
Manages process queues and prioritisation
What tasks does the Device Manager perform?
Allocates system devices (drives, printers, etc.) in accordance to system’s sheculing policy
Deals with multiple requests for the same device
Communicates with devices during operation
Deallocates device when no longer required
What tasks does the File Manager perform?
Organises all files (data, compilers, programs, etc.) into directory structures
Manages location of files on disk
Enforces restrictions on file access
Deals with standard file operations (read, write, etc.)
How are standard file operations usually performed when programming?
Through system calls
What’s the difference between a program and a process?
A program is the written code, it is static.
A process is the executing version of the program, it is dynamic.
What things do PCBs (Process Control Blocks) contain?
Process ID User ID of process owner Process State Memory Position Accounting Stats (time used, etc.) Resources Allocated (files, devices, etc.) Register Values
What are the 3 process states?
Running
Ready
Waiting/Blocked
What does it mean for a process to be in the running state?
It is currently on the CPU
What does it mean for a process to be in the ready state?
It is able to run but not currently on the CPU