0% found this document useful (0 votes)
46 views7 pages

Unit 1 Os

An Operating System (OS) is essential system software that manages hardware resources and facilitates user interaction with computers. Various types of operating systems include batch systems, time-sharing systems, personal computer systems, and real-time systems, each serving different user needs and environments. Memory management techniques such as paging, segmentation, and virtual memory are crucial for efficient resource allocation and performance optimization.

Uploaded by

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

Unit 1 Os

An Operating System (OS) is essential system software that manages hardware resources and facilitates user interaction with computers. Various types of operating systems include batch systems, time-sharing systems, personal computer systems, and real-time systems, each serving different user needs and environments. Memory management techniques such as paging, segmentation, and virtual memory are crucial for efficient resource allocation and performance optimization.

Uploaded by

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

BCA-402 Operating System

UNIT – I: OPERATING SYSTEM

Introduction
An Operating System (OS) is a system software that acts as
an interface between the user and the computer hardware.
It manages hardware resources and provides an
environment for application programs to run.

What is an Operating System?


- An operating system is a program that manages hardware
and software resources of a computer.
- It helps users to interact with the computer without
knowing hardware details.
- Examples: Windows, Linux, macOS, Android, etc.

Types of Operating Systems


1. Simple Batch Systems
- Users prepare jobs on punch cards and submit them to
the computer operator.
- No direct interaction between user and computer.
- Jobs are collected and processed in batches.
- Example: IBM mainframes in the 1960s.

2. Multiprogrammed Batch Systems


- Multiple jobs are loaded into memory and the CPU
switches between them.
- Increases CPU utilization.
- OS selects one job from memory and starts executing it.

3. Time-Sharing Systems
- Also called Multitasking Systems.
- Many users can use the system at the same time via
terminals.
- CPU switches rapidly between users.
- Example: UNIX

4. Personal Computer Systems


- Designed for single users.
- Includes GUI (Graphical User Interface).
- Example: Windows on desktops/laptops.
5. Parallel Systems
- Use multiple processors (CPUs) to run tasks
simultaneously.
- Also called Multiprocessor Systems.
- Increases speed and reliability.

6. Distributed Systems
- Multiple computers are connected via a network.
- Each system has its own memory and CPU.
- Resources are shared (files, printers, etc.).

7. Real-Time Systems
- Responds to input or events instantly or in real-time.
- Used in environments where delay is unacceptable.
- Example: Air traffic control, Medical systems, Industrial
robots.

MEMORY MANAGEMENT
Background
- Memory is divided into two parts: main memory (RAM)
and secondary storage (e.g., hard disk).
- The OS manages how memory is used and allocates it to
different processes.

Logical vs. Physical Address Space


- Logical Address: Address generated by the CPU.
- Physical Address: Actual location in memory.
- OS translates logical address to physical address using
Memory Management Unit (MMU).

Swapping
- Process of moving processes between main memory and
disk.
- Used to free up space for other processes.
- Increases CPU utilization but may reduce speed.

Contiguous Allocation
- Each process gets a single continuous block of memory.
- Simple but can lead to memory wastage due to
fragmentation.

Paging
- Memory is divided into fixed-size blocks:
- Process is divided into pages.
- Memory is divided into frames.
- Pages are loaded into any available frame.
- Avoids external fragmentation.

Segmentation
- Memory is divided into segments like code, stack, data.
- Each segment has different size.
- Provides logical division of program.

VIRTUAL MEMORY
Demand Paging
- Pages are loaded into memory only when required.
- Reduces memory usage.
- Page not in memory = page fault.
Page Replacement
- When memory is full, OS replaces a page.
- It selects a page to remove to make space for a new one.

Page Replacement Algorithms


1. FIFO (First-In-First-Out): Oldest page is replaced first.
2. LRU (Least Recently Used): Page not used for longest
time is replaced.
3. Optimal: Replaces page that will not be used for longest
time in future.

Performance of Demand Paging


- Measured using Page Fault Rate.
- Fewer page faults = Better performance.
- High page fault rate slows down the system.

Allocation of Frames
- Fixed Allocation: Equal frames to all processes.
- Variable Allocation: More frames to big processes or those
needing more memory.

Thrashing
- Happens when too many page faults occur.
- CPU spends more time swapping pages than executing.
- System becomes slow or stuck.

Other Considerations
- Working Set Model: Tracks pages currently needed.
- Prepaging: Loads pages before they are requested.
- Page Size: Affects performance; small = more overhead,
large = more waste.
- Replacement Policy: Must be efficient and fair.

You might also like