0% found this document useful (0 votes)
2 views5 pages

OS_Study_Notes

An Operating System (OS) is system software that manages computer hardware and software resources, with primary functions including process management, memory management, file system management, device management, security, and user interface. Operating systems can be classified into various types such as batch, time-sharing, real-time, distributed, network, and embedded systems, and their structure can be monolithic, microkernel, layered, or modular. The OS provides services like process scheduling, memory management, I/O management, and security, while also handling processes through concepts like process control blocks, context switching, and multi-threading.

Uploaded by

vivekberma01780
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

OS_Study_Notes

An Operating System (OS) is system software that manages computer hardware and software resources, with primary functions including process management, memory management, file system management, device management, security, and user interface. Operating systems can be classified into various types such as batch, time-sharing, real-time, distributed, network, and embedded systems, and their structure can be monolithic, microkernel, layered, or modular. The OS provides services like process scheduling, memory management, I/O management, and security, while also handling processes through concepts like process control blocks, context switching, and multi-threading.

Uploaded by

vivekberma01780
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Operating System and Functions

Operating System and Functions

An Operating System (OS) is system software that manages computer hardware, software
resources, and provides common services for computer programs. The primary functions of
an OS include:

1. **Process Management**: The OS handles the creation, scheduling, and termination of


processes. It allocates resources for processes to run effectively.
2. **Memory Management**: The OS manages the system’s memory, keeping track of each
byte in a computer’s memory, and ensuring that different processes do not interfere with
each other’s memory space.
3. **File System Management**: The OS is responsible for the organization and storage of
files on disk, maintaining their integrity and access permissions.
4. **Device Management**: The OS provides a mechanism for controlling hardware devices
like printers, displays, and storage devices.
5. **Security and Access Control**: The OS protects the system from unauthorized access
and ensures the privacy and integrity of data.
6. **User Interface**: The OS provides a user interface (UI) such as a command-line or
graphical user interface (GUI) for users to interact with the system.

Classification of Operating System

Operating systems can be classified based on various criteria:

1. **Batch Operating Systems**: These systems do not interact with the user directly. They
collect jobs and process them in batches.
2. **Time-sharing Systems**: These systems allow multiple users to share system resources
simultaneously, giving the illusion of parallel execution.
3. **Real-time Operating Systems (RTOS)**: RTOS systems guarantee a certain level of
performance within a defined time frame.
4. **Distributed Operating Systems**: These OSs manage a group of independent computers
and make them appear as a single system to the user.
5. **Network Operating Systems**: These OSs provide services to the devices connected
over a network.
6. **Embedded Operating Systems**: These OSs are designed to run on specialized
hardware and perform specific functions within devices.
Operating System Structure

An operating system’s structure defines how different components of the OS interact. It can
be classified into:

1. **Monolithic Kernel**: In this structure, the entire OS is a single program running in a


single address space, where all components are tightly coupled.
2. **Microkernel**: Here, only the most essential components of the OS (such as process
management and memory management) run in kernel mode. Other components run in user
mode.
3. **Layered System**: This structure divides the OS into layers, with each layer providing
specific functionality. Each layer interacts only with the adjacent layers.
4. **Modular Operating System**: This structure allows the OS to be made up of modules,
which can be dynamically loaded or unloaded as required.

Operating System Services

The operating system provides several services to enable user-level processes to execute
smoothly:

1. **Process Scheduling**: The OS schedules processes for execution based on priority and
availability of resources.
2. **Memory Management**: The OS allocates memory resources and ensures isolation
between processes.
3. **I/O Management**: The OS manages input and output operations and coordinates
communication with peripheral devices.
4. **File System Management**: Provides access to files and directories, and handles file
creation, deletion, reading, and writing.
5. **Security and User Authentication**: Provides mechanisms to protect against
unauthorized access.
6. **Network Services**: Enables communication between processes and devices across
networks.

System Call

A **System Call** is a programmatic way a computer program requests a service from the
kernel of the operating system. They provide an interface between user-level applications
and the OS kernel. Examples include file management operations (open, read, write) and
process management operations (fork, exec).

System Program

System programs are utility programs that assist in the functioning of the operating system.
They help manage resources, troubleshoot issues, and perform operations on the OS level,
such as compilers, assemblers, editors, and debuggers.

Process Concept

A **Process** is a program in execution. It is an instance of a running application, and it


contains both the program code and its current activity. A process is made up of:

1. **Code Section**: The executable program code.


2. **Data Section**: Contains global and static variables.
3. **Stack**: Stores temporary data like function parameters, return addresses, and local
variables.
4. **Heap**: Used for dynamically allocated memory during runtime.

Process State

A process goes through several states during its lifecycle:

1. **New**: The process is being created.


2. **Ready**: The process is ready to run but is waiting for CPU time.
3. **Running**: The process is being executed.
4. **Waiting**: The process is waiting for some event (e.g., I/O completion).
5. **Terminated**: The process has finished execution.

Process Control Block

A **Process Control Block (PCB)** is a data structure used by the OS to store information
about a process. It contains:

1. **Process ID**: Unique identifier for the process.


2. **Program Counter**: Holds the address of the next instruction to execute.
3. **CPU Registers**: Store the current state of the CPU when the process is not running.
4. **Memory Management Information**: Details about memory allocated to the process.
5. **I/O Status Information**: Information about input/output operations related to the
process.
6. **Process State**: The current state of the process (e.g., running, waiting).

Context Switching

**Context Switching** is the process of storing the state of a running process so that it can
be resumed later and switching to another process. It is an essential part of multitasking
systems where multiple processes share the CPU.

Operation on Process

Operations on a process include:

1. **Process Creation**: A new process is created when a program is loaded into memory.
2. **Process Scheduling**: The OS determines which process to run next.
3. **Process Termination**: When a process completes its task, it terminates and releases
resources.

Threads and Layer Management

A **Thread** is a smaller unit of a process that can run independently. It shares the same
memory space but has its own execution flow. Threads are used to improve performance in
multitasking environments.

**Layer Management**: Refers to how the OS handles different layers of abstraction, such as
the hardware layer, kernel layer, and user application layer.

Benefits of Multi-Threading

Multi-threading allows a CPU to execute multiple threads concurrently, leading to:

1. **Better CPU Utilization**: Multiple threads can execute while waiting for I/O operations
to complete.
2. **Improved Application Performance**: Tasks are executed in parallel, improving
efficiency.
3. **Responsive Applications**: Multi-threading can keep applications responsive by
performing tasks in the background.

Type of Threads

Types of threads include:

1. **User Threads**: These threads are managed by user-level libraries and are not known
to the OS.
2. **Kernel Threads**: Managed by the OS and scheduled by the kernel.
3. **Hybrid Threads**: A combination of user and kernel threads that leverage both user-
level libraries and kernel management.

Threading Issues

Threading issues arise when multiple threads access shared resources or data. These
include:

1. **Race Conditions**: Occurs when two or more threads try to modify shared data
simultaneously.
2. **Deadlocks**: Occurs when two or more threads are waiting for each other to release
resources.
3. **Starvation**: A thread is indefinitely delayed because other threads consume all
resources.

CPU Scheduling

**CPU Scheduling** is the method by which the OS decides which process will be executed
by the CPU. The objective is to optimize CPU utilization and process throughput.

Scheduling algorithms include:


- **First-Come, First-Served (FCFS)**
- **Shortest Job First (SJF)**
- **Round Robin (RR)**
- **Priority Scheduling**

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy