DBMS
DBMS
Each stage represents a specific condition of the process and affects how the
A. New (Creation):
- Definition: The process is being created. During this phase, essential structures
- Details: The operating system sets up the process control block (PCB), initializes
memory, and prepares the environment necessary for execution. The process is not
B. Ready:
- Definition: The process is ready to execute but is waiting for the CPU to become
available.
- Details: The process has all the resources it needs except for the CPU. It resides
in a queue of processes that are waiting for execution. The scheduler will eventually
C. Running:
- Details: In this state, the process performs its computations and instructions. It
utilizes the CPU fully. If the process encounters a need for resources or must wait
D. Waiting (Blocked):
E. Terminated (Exit):
- Definition: The process has completed its execution or has been terminated by
- Details: All resources associated with the process are released. The process is
removed from the process table, and any exit status or results are finalized. The
State Transitions:
- From New to Ready: The process transitions from the new state to ready once
- From Running to Waiting: If the process requires waiting for an external event or
- From Waiting to Ready: Once the waiting condition is resolved, the process returns
process scheduling, resource allocation, and multitasking. Each state plays a crucial
executed.
segment tables.
scheduling queues.
states.
occurs, and the system must load a page into memory but lacks available space.
Example: If pages 1, 2, 3 are loaded into memory and page 4 is requested, page 1 (the first
loaded) will
be replaced.
• Description: Replaces the page that will not be used for the longest period in the future.
• Example: If pages 1, 2, 3 are in memory and the future requests are for 2, 4, 1, page 3 will
be
• Description: The page that hasn’t been used for the longest period is replaced.
• Example: If pages 1, 2, and 3 are in memory, and page 4 is requested, LRU will replace the
least
• Example: If pages 1, 2, 3 are in memory, and page 2 has been accessed the least, it will be
• Description: Similar to FIFO but gives a second chance to pages that have been accessed
recently.
• Example: If page 2 is scheduled for replacement but has been accessed recently, the
algorithm
skips it and looks for another page.
This report covers the process state, PCB structure, and the key page replacement
algorithms
with examples for clarity. Understanding these concepts is critical in efficient memory