Key Concepts in Operating Systems

Classified in Computers

Written on in English with a size of 3.92 KB

Operating System Process Management

Process States

Different states a process can be in:

  • Execution: The process is executing instructions and has been granted CPU time.
  • Ready: A process is ready to be executed, waiting for its turn to use its time slice and access system resources.
  • Blocked: The process is held or blocked for some reason, waiting for an event (e.g., I/O completion).

Process State Transitions

Transitions between process states:

  • Transition A: Occurs when a running process needs a resource, signal, etc., to continue execution and moves to the blocked state.
  • Transition B: Occurs when a process has used its allocated CPU time slice and moves from execution back to the ready state.
  • Transition C: Occurs when a process in the ready state moves to execution, i.e., when it receives a new CPU time slice.
  • Transition D: Occurs when a process moves from blocked to ready, i.e., when it receives the signal or resource it was waiting for.

Process Control Block (BCP)

A data structure assigned to a process to control its execution. It stores information such as:

  • Current Status: Running, ready, or blocked.
  • Process Identifier: Each process is assigned a unique PID.
  • Process Priority: Assigned by the scheduler.
  • Memory Location: Memory address where the process is loaded.
  • Resources Used: Hardware and software resources required for execution.

Threads

A thread is an execution point within a process. A thread consumes its own resources (like CPU time) but depends on the parent process.

Memory Management in Operating Systems

Paging

Paging is a memory management technique that splits RAM into fixed-size areas called frames and programs into equally-sized parts called pages.

Swap Space

Swap space resides in a specified area of the hard disk, used for storing parts of programs or data not currently in RAM, enabling the system to run larger programs or more programs than physical memory allows.

Virtual Memory

Virtual memory is a memory management technique that uses secondary storage (like a hard disk) to extend the apparent size of RAM. It doesn't necessarily require a distinct partition solely for virtual memory. If the disk is very full, virtual memory performance is severely impacted.

Memory Exchange (Swapping)

Memory exchange, also known as swapping, involves moving processes or parts of processes between main memory and secondary storage (like hard drives). This utilizes external memory, which is slower but offers larger capacity.

CPU Scheduling Algorithms

Methods used by the operating system to determine which process in the ready queue is allocated the CPU.

Round Robin (RR)

A scheduling algorithm where each process is assigned a fixed time slice (quantum) and processes are executed in a cyclic manner. Time allocation is equal and sequential.

First-Come, First-Served (FCFS)

A non-preemptive scheduling algorithm where the process that requests the CPU first is allocated the CPU first. It runs until completion before the next process gets the CPU.

Shortest Job First (SJF)

A non-preemptive scheduling algorithm that selects the process with the shortest estimated execution time from the ready queue.

Shortest Remaining Time First (SRTF)

A preemptive version of SJF. When a new process arrives or a process completes, the scheduler selects the process with the shortest estimated remaining execution time from the ready queue and the currently running process.

Related entries: