Understanding Operating Systems1
Understanding Operating Systems1
Operating Systems
Presented by Sanchari Singha
Department – CSE Section – C
University Roll – 11900123196
Paper Name – Operating System
Paper Code – PCC CS 502
CA1
What is an Operating System?
Definition: An Operating System (OS) is software that acts as an
intermediary between computer hardware and the user, managing
system resources and providing a platform for applications to run.
User Interface: The OS provides a user interface (UI) that allows users to
system, typically through a graphical user interface (GUI) or command-lin
Types of Operating Systems
Batch Processing: Batch processing systems execute jobs in groups or batches
without user interaction. Jobs are collected, processed, and output in sequence,
making these systems suitable for tasks that do not require immediate results.
Time-Sharing: Time-sharing operating systems allow multiple users to access the
computer simultaneously by rapidly switching between them. This provides each user
with a small time slice of the CPU, creating the illusion of concurrent processing.
Real-Time: Real-time operating systems (RTOS) are designed for tasks that require
immediate processing and response. They are often used in embedded systems,
medical devices, and other applications where timely execution is critical.
Batch Processing Time-Sharing Real-Time
Process State Diagram
As a process executes, it changes state. The state of a process is defined in part by the
current
activity of that process. Each process may be in one of the following states:
i. New. The process is being created.
ii. Running. Instructions are being executed.
iii. Waiting. The process is waiting for some event to occur (such as an I/O completion
or reception of a signal).
iv. Ready. The process is waiting to be assigned to a processor.
v. Terminated. The process has finished execution.
Process Control Block (PCB)
Each process is represented in the operating system by a
process control block (PCB) – also called a task control
block.
Process state: The state may be new, ready, running,
waiting, halted and so on.
Program counter: The counter indicates the address of the
next instruction to be executed for this process.
CPU registers: The registers vary in number and type,
depending on the computer architecture.
They include accumulators, index registers, stack pointers
and general-purpose registers, plus any condition code
information. Along with the program counter, this state
information must be saved when an interrupt occurs, to
allow the process to be continued correctly afterwards.
CPU Scheduling information: This information includes
a process priority, pointers to scheduling queues, and any
other scheduling parameters.
Memory-management information: This information
may include such information such as the value of the
base and limit registers, the page tables, or the segment
tables, depending on the memory system used by the
operating system.
Accounting information: This information includes the
What is Short, Long & Medium term Scheduler
Schedulers are components of an operating system responsible for managing the execution of
processes. There are three types:
Short-Term Scheduler (CPU Scheduler):
• Purpose: Decides which process from the ready queue should be executed next by the CPU.
• Frequency: Runs frequently, often every few milliseconds.
• Speed: Must be very fast because it directly affects system performance.
• Function: Performs context switching by moving processes between the ready and running
states.
Long-Term Scheduler (Job Scheduler):
• Purpose: Determines which processes should be admitted into the system for processing.
• Frequency: Runs less frequently, usually when a new process is created.
• Speed: Slower, as it manages processes on a higher level.
• Function: Controls the degree of multiprogramming by deciding how many processes should
be kept in the ready queue.
Medium-Term Scheduler:
• Purpose: Handles swapping processes in and out of memory to manage system workload.
• Frequency: Runs as needed, depending on system load and memory availability.
• Speed: Intermediate, balancing between speed and complexity.
• Function: Moves processes from memory to disk (suspended) and vice versa, optimizing
memory use and ensuring efficient CPU scheduling. These schedulers work together to
References
As an extension to your learning on operating systems,
it's vital to refer to authoritative texts and resources.
Books such as "Operating System Concepts" by
Silberschatz, Galvin, and Gagne provide an in-depth
understanding. Online platforms, forums, and official
documentation play a critical role in staying updated with
the latest advancements in OS technologies. Embrace
these resources to enhance your knowledge base and
stay ahead in the rapidly evolving tech landscape.