Operating Systems Flashcards
Whats a operating system
Program that acts as an interface between the computer user and computer hardware, and controls the execution of programs
WHat 3 parts does the OS manage
Memory
Processing
Hardware/Software on computer
What are some responsibility of OS
file management, memory management, I/O handling, and peripheral device management
What is process management
The OS handles one process at a time but is so fast it may seem like its concurrent
Virtual memory serves 3 purposes…what are they
assure that each process has a unique address space
provide memory protection to prevent processes from using memory addresses
allow an application to use more memory than what is physically available
Purpose of I/O management
Allows us to easily add additional hardware and configure it
Whats the purpose of the secondary storage
For program to run data and its accesses the data must be in primary memory. The secondary is used to back up the main memory
What is process management
Involves various tasks like creation, scheduling, termination of processes, and a dead lock.
What must the OS do for process management
it must allocate resources that enable processes to share and exchange info. Also protects it from other methods that allow sync among processes
What are the 4 architecture blocks of Process
Stack
Heap
Data
Text
What is stack?
stores temporary data like function parameters, return addresses, and local variables
Heap
allocates memory, which may be processed during run time
data
contains a varaible
text
includes current activity
What is the PCB and what does it do
Process Control Block
- Data structure that is maintained by the OS for every process
- Helps you store all the info required to keep track of all running process
- store contents of processor registers
Whats a process state
COndition of the process at a specific instant of time (defines current position of the process)
List the 7 stages of a process
New -> Ready -> Waiting -> Executing -> Terminated
Executing -> blocked
executing -> suspended
Stage: New
The new process is created when a program calls from secondary memory to primary memory
Ready
Process should be loaded into the primary memory, which is ready for execution
Waiting
Process is waiting for the allocation of CPU time and other resources for execution
Executing
The process is an execution state
Blocked
Time interval when a process is waiting for an event like I/O operation to complete
Suspended
Tiem when a process is ready for execution but has not been placed in the ready queue by OS
Terminated
Time process is terminated
Important components of PCB
Process state program counter cpu registers cpu scheduling info accounting/business info memory-management info i/o status info
process state
Process can be new, ready, running, waiting, etc
Program counter
Lets you know the address of the next instruction, which should be executed for that process
CPU registers
component includes accumulators, index, and General-purpose registers and info of condition code
CPU Scheduling info
Includes a process priority, pointers for scheduling queues, and various other scheduling parameters
Accounting/business info
includes the amount of CPU and time utilities like real time used, job or process numbers