Midterms Operating Systems
Midterms Operating Systems
● The OS allocates resources ● acts as a repository that may ● The process is chosen from the
that allow the process to vary from process to process. ready queue by the OS for
exchange information. execution. (E.g. CPU)
● a record containing many
● It synchronizes among pieces of information Block/Wait State
processes and safeguards the associated with a specific
resources of other processes. process. ● Whenever the process
requests access to I/O needs
Process Free Hole input from the user or needs
access to a critical region.
● is a unique execution of a ● Free space in the main
program with specific set memory. ● Once the I/O operation is
data. completed the process goes to
the ready state.
● can be thought of as a Process State Diagram
program in execution. Terminated/Completed State
New State (Secondary Memory)
● A process can have anywhere ● Process is killed as well as the
from just one thread to ● The process is about to be PCB is deleted. The resources
multiple. created but not yet created. allocated to the process will be
released or deallocated.
Interrupt Descendant - child of the child of the Abnormal Termination
child’s node ● forced termination of the
● There's an I/O request. process by the OS due to some
Sibling - shared the same parent. unrecoverable error.
Preempt
One Precedence Graph - is called a Reason for a parent to terminate the
● Transition from running to tree. execution of one of its children:
ready.
Forest - more than one tree. ● The child has exceeded its
PCB (Buffer) usage of some of the resources
Terminal Nodes - nodes with no it has been allocated.
● Only created when a process children. Is also called a leaf.
is in the ready state. (Main ● The task assigned to the child
Memory) Root - called the first node. is no longer required.
0 6 9 14 18 P1 = 0
P2 = 6
Burst Time P3 = 9
P4 = 14
Always start with 0 and add the burst
time as the process continues. To get the Average Waiting Time is to
get the sum of the Waiting Time of the
The total of the process time should be process and divide it to how many the
equal to the CPU Burst Time total. process.