Operating System Notes

C
DSA
Software Engineering
Software Architecture
Operating System
Big Data
Data Mining and Warehousing
TOC
Ada
CPP
DBMS

All Topics (15)

  • 1. Definition of Operating System
  • 2. Primary Objectives of an Operating System
  • 3. Functions of an Operating System
  • 4. Services of an Operating System
  • 5. Types of Operating System
  • 6. Serial Processing System / Bare Machine
  • 7. Simple Batch System
  • 8. Multiprogramming Operating System
  • 9. Time Sharing System / Multitasking System
  • 10. Multiprocessor System
  • 11. Network Operating System (NOS)
  • 12. Real-Time Operating System (RTOS)
  • 13. System Calls
  • 14. Utility Programs
  • 15. File Management

11. Network Operating System (NOS)

A Network Operating System (NOS) is an operating system installed on a server computer that manages and controls network resources. It allows multiple computers connected in a network to communicate and share resources such as files, printers, users, applications, and security.

Functions of Network Operating System

A NOS provides the following services:

  • File sharing between computers
  • Printer sharing across the network
  • User and group management
  • Security and access control
  • Managing network resources and applications

Types of Network Operating Systems

1. Client-Server Network Operating System

In a client-server network, a central server provides services, and all other computers (clients) depend on it for resources and data.

Working

  • The server controls all network operations
  • Clients request services from the server
  • Server responds with required data or services

Examples

  • Windows Server 2003
  • Windows Server 2008
  • Linux Server
  • Novell NetWare

Real-Life Example

In a school computer lab:

  • The teacher’s computer acts as the server
  • Student computers are clients
  • Students access files and printers through the teacher’s computer

Another example:
In a company:

  • Server stores all employee data
  • Employees (clients) access files from the server

2. Peer-to-Peer Network Operating System

In a peer-to-peer network, there is no dedicated server. Every computer can act as both a client and a server.

Working

  • Each computer shares its own resources directly
  • No central control system
  • All computers are equal in the network

Examples

  • Windows 95
  • Windows NT Workstation
  • Windows 10 (in basic home sharing setup)

Real-Life Example

In a small group of friends:

  • Each person shares files directly from their laptop
  • One computer can send files to another without a central server

Another example:
In a small office:

  • All computers are connected
  • Each system shares printers and files directly

Advantages of NOS

  • Centralized management (in client-server systems)
  • Better security control
  • Easy sharing of resources
  • Remote access is possible

Disadvantages of NOS

  • Server systems are expensive
  • High dependency on the server
  • Maintenance and updates are required regularly
  • If the server fails, the whole network is affected

12. Real-Time Operating System (RTOS)

A Real-Time Operating System (RTOS) is an operating system designed to process data and respond to inputs within a strict time limit. Its main objective is to provide a fast and predictable response to external events.

Objectives of RTOS

Primary Objective

  • To provide a quick response and meet strict scheduling deadlines.

Secondary Objective

  • To ensure efficient resource utilization and user convenience.

Features of RTOS

  • Responds immediately to external inputs (like sensors or devices)
  • Used in systems where timing is critical
  • Guarantees response within a fixed time limit
  • Commonly used in embedded and control systems

Examples of RTOS Applications

  • Missile control systems
  • Air traffic control systems
  • Robotics
  • Medical equipment
  • Industrial automation systems

Types of Real-Time Operating Systems

1. Soft Real-Time Operating System

Definition

A Soft Real-Time Operating System is a system where missing a deadline is not critical, but performance may degrade.

Characteristics

  • Flexible timing constraints
  • System continues working even if deadlines are missed
  • Priority is given to important tasks, but no strict guarantee of completion time

Examples

  • Video streaming (YouTube)
  • Online gaming
  • Multimedia applications
  • Virtual reality systems

Example (Easy Understanding)

If a video stream is slightly delayed, it may buffer or reduce quality, but the system still works.

2. Hard Real-Time Operating System

Definition

A Hard Real-Time Operating System strictly guarantees that tasks are completed within the required time limit. If the deadline is missed, the system may fail.

Characteristics

  • Strict time constraints
  • No delay is acceptable
  • Failure can cause serious damage or danger
  • Used in safety-critical systems

Examples

  • Airbag control systems in cars
  • Automatic parachute systems
  • Missile launching systems
  • Medical life-support systems

Example (Easy Understanding)

If an airbag system does not activate at the exact time of a crash, it may result in failure and serious injury.

Advantages of RTOS

  • High efficiency and performance
  • Best for embedded systems
  • Accurate and error-controlled operations
  • Better memory management
  • Focuses on important real-time tasks

Disadvantages of RTOS

  • Can handle only limited tasks at a time
  • Expensive to implement
  • Complex design and algorithms
  • Requires high system resources

13. System Calls

A System Call is a programmatic interface through which a user program requests services from the Operating System kernel.

It acts as a bridge between user programs and the kernel.

Basic Structure

  • User Program → System Call → Kernel → Hardware Resources → Response back to User Program

Dual Mode Operation (Important Concept)

An operating system works in two modes:

1. User Mode

  • Programs run in this mode
  • Cannot directly access hardware
  • Limited permissions (for security)

2. Kernel Mode

  • Operating system runs in this mode
  • Has full access to hardware resources (CPU, RAM, I/O devices)
  • Executes system calls

Mode Switching

When a user program needs any hardware resource:

  • It makes a system call
  • System switches from user mode → kernel mode
  • After execution, it returns to user mode

Why System Calls are Needed

  • For security (user cannot directly access hardware)
  • For controlled access to system resources
  • To manage processes, files, devices, and communication

Types of System Calls

1. Process Management System Calls

These system calls are used to control processes (programs in execution).

Examples:

  • Create process
  • Terminate process
  • Fork (create child process)
  • Execute process
  • Wait and signal
  • Load and end process

Example (Simple)

When you open an application like a browser, the OS uses process management system calls to create and run it.

2. File Management System Calls

These are used to handle files.

Examples:

  • Create file
  • Delete file
  • Open / Close file
  • Read / Write file
  • Reposition file pointer
  • Get / set file attributes

Example (Simple)

When you save a document in MS Word, the OS uses file system calls to write data into storage.

3. Device Management System Calls

These manage input/output devices.

Examples:

  • Request and release device
  • Read / Write device
  • Get or set device attributes
  • I/O control operations

Example (Simple)

When you print a document, the OS uses device system calls to communicate with the printer.

4. Information Management System Calls

These provide system-related information.

Examples:

  • Get or set system time and date
  • Get system data
  • Get process, file, or device attributes
  • Get system information like memory usage

5. Communication System Calls

These are used for inter-process communication (IPC).

Models:

(A) Message Passing Model

  • Processes communicate by sending and receiving messages
  • Examples:
    • Send message
    • Receive message
    • Create / delete communication links

(B) Shared Memory Model

  • Processes communicate using shared memory
  • One process writes, another reads

Examples:

  • Pipes
  • Message queues
  • Shared memory

Advantages of System Calls

  • Safe access to hardware resources
  • Better security
  • Efficient resource management
  • Supports multitasking and process control

14. Utility Programs

Utility programs are system software that provide additional services to the user and help in the maintenance, management, and optimization of a computer system.

They improve the performance, efficiency, and reliability of the computer.

Purpose of Utility Programs

  • Help in system maintenance
  • Improve computer performance
  • Protect the system from threats
  • Manage files and storage
  • Provide additional system functions

Features

  • They support the operating system
  • Some utilities are built-in OS tools
  • Others can be installed separately
  • They help in keeping the system clean and fast

Examples of Utility Programs

1. Antivirus Software

  • Protects the computer from viruses, malware, and threats
  • Example: scans files and removes harmful programs

2. File Manager

  • Helps users to create, delete, copy, move, and organize files
  • Example: Windows File Explorer

3. Disk Defragmenter

  • Rearranges fragmented data on the hard disk
  • Improves system speed and performance

4. Disk Cleanup

  • Removes unnecessary files from the system
  • Frees up storage space

5. Backup Utility

  • Creates a copy of important data
  • Helps in data recovery after system failure

6. Compression Utility

  • Compresses files to reduce size
  • Saves storage space and makes file transfer faster

7. Network Utility

  • Helps in managing network connections and performance
  • Used for troubleshooting network problems

8. Uninstaller

  • Removes installed software from the system properly
  • Frees space and keeps system clean

9. Search Utility

  • Helps users find files and folders quickly on the computer

10. Screen Saver

  • Displays moving images when the computer is idle
  • Prevents screen burn-in (mainly for older displays)

15. File Management

What is a File?

A file is a collection of related data stored on a secondary storage device such as a hard disk, SSD, or pen drive.

A file can be defined in different ways:

1. General Definition

A file is a collection of related data defined by the user and stored on secondary storage.

Example: A student record file containing names, marks, and addresses of students.

2. Structural Definition

A file is a collection of records, where each record consists of multiple fields, and each field stores a specific piece of information.

Example:
A student record:

  • Record → Student details
  • Fields → Roll No, Name, Marks, Address

3. Technical Definition

A file is a collection of bits, bytes, characters, or words that are stored and processed by a computer system.

Example of File Structure

Sno. Sname Avg Marks Address
1 Ramesh 95 Bhopal
2 Suresh 99 Indore

Explanation of Example

  • Each row represents a record
  • Each column represents a field
  • Entire table represents a file
Page 3 of 3