Unit 2: Operating system



Operating System (OS)

An Operating System (OS) is a system software that acts as an interface between the user and the computer hardware.
It manages hardware resources, runs applications, and controls overall system operations.

Examples: Windows, Linux, macOS, Android, iOS.

Functions of Operating System

An OS performs a variety of essential tasks to manage both hardware and software efficiently.

A. Process Management

  • Creates, schedules, and terminates processes.
  • Manages CPU time using scheduling algorithms (FCFS, Round Robin).
  • Handles multitasking and multiprocessing.

B. Memory Management

  • Allocates and deallocates memory.
  • Handles virtual memory and paging.
  • Ensures processes do not access each other’s memory.

C. File System Management

  • Manages file creation, deletion, reading, writing.
  • Organizes files in directories.
  • Provides access permissions and security.

D. Device Management

  • Manages input/output devices using device drivers.
  • Maintains queues for devices.
  • Controls device communication.

E. Security & Access Control

  • Protects data from unauthorized access.
  • Provides authentication (passwords, biometrics).
  • Manages user accounts and permissions.

F. User Interface Management

  • Provides Command-Line Interface (CLI) or Graphical User Interface (GUI).

G. Error Handling

  • Detects hardware and software errors.
  • Generates error messages and ensures safe recovery.

H. Resource Allocation

  • Distributes resources (CPU, memory, devices) among users and tasks.

Types of Operating Systems

A. Batch Operating System

  • Executes jobs in batches without user interaction.
  • Used in payroll, billing systems.

B. Time-Sharing Operating System

  • Multiple users access the system simultaneously.
  • CPU time is divided among users.

C. Distributed Operating System

  • Multiple computers connected to work as one system.
  • Resource sharing across networks.

D. Real-Time Operating System (RTOS)

  • Responds to inputs immediately.
  • Used in robotics, medical systems, flight control.

E. Multiprogramming OS

  • Multiple programs run simultaneously in memory.

F. Multitasking OS

  • Allows multiple tasks to run at the same time.

G. Network Operating System (NOS)

  • Manages network resources.
  • Used in servers (Windows Server, Linux Server).

H. Mobile Operating Systems

  • Designed for mobile devices.
  • Android, iOS.

Classification of Operating Systems

OS can be classified based on features:

1. Based on User

  • Single-user: Windows 10 Home

  • Multi-user: UNIX, Linux

2. Based on Tasks

  • Single-tasking: Early DOS

  • Multitasking: Windows, Linux

3. Based on Processing

  • Batch processing

  • Real-time processing

  • Time-sharing

4. Based on CPU:

  • Uniprocessor OS: One CPU

  • Multiprocessor OS: Multiple CPUs

5. Based on Interface:

  • CLI: Command Line Interface

  • GUI: Graphical User Interface

Elements of Command-Based OS

Command-based OS (CLI) uses text commands to interact with the system.

Examples:

  • DOS (Disk Operating System)
  • UNIX / Linux Terminal
  • PowerShell
  • Command Prompt (CMD)

Key Elements:

  1. Command Prompt / Terminal - A text-based window to enter commands.

  2. Commands - Single-line instructions.
    Examples:

    DIR → list files CD → change directory COPYcopy files RM → remove files (Linux) LS → list files (Linux)
  3. Syntax - Each command must follow a proper structure.
    Example:

    COPY source destination
  4. Switches / Options - Modify how commands work.
    Example (Windows):

    DIR /P

    Example (Linux):

    LS -l
  5. File Paths - Absolute and relative paths are used for navigation.

  6. Shell- CLI interface like Bash, Zsh, Command.com.

Elements of GUI-Based Operating System

GUI systems use graphical elements such as windows, icons, buttons, and menus.

Examples:

  • Windows OS
  • macOS
  • Ubuntu (GUI)
  • Android
  • iOS

Key Elements:

  1. Desktop - Main working area with wallpaper and icons.
  2. Icons - Small graphical symbols for applications/files.
  3. Windows - Boxes to display files, apps, and settings.
  4. Menus - Drop-down options (File, Edit, View, etc.).
  5. Taskbar / Dock - Shows running applications and system notifications.
  6. Buttons - Minimize, maximize, close button.
  7. Pointer / Cursor - Controlled by mouse or touchpad.
  8. Dialog Boxes - Pop-up windows for user input.
  9. Touch Interface (mobile GUI) - Scroll, tap, swipe gestures.

Summary Table

CategoryCommand-Based OS (CLI)GUI-Based OS
InterfaceText-basedGraphical
Ease of UseHard for beginnersEasy & user-friendly
SpeedFast for expertsSlightly slower
Memory UseLowHigher
ExamplesDOS, Linux terminalWindows, Android
InputKeyboard commandsMouse, touch, keyboard
Best ForProgramming, serversNormal users, mobile devices

Computer Network 

A computer network is a system where two or more computers or devices are connected to share data, resources, and applications.

Key Goals of Networking

  • Resource Sharing (printers, files, internet)
  • Communication (email, messaging)
  • Data Sharing (databases, cloud services)
  • Centralized Management (servers, security policies)

Components of a Network

  • Nodes (computers, printers, routers)
  • Transmission Media (cables, wireless)
  • Network Interface Cards (NIC)
  • Connectivity Devices (switch, router, hub)
  • Protocols (TCP/IP)

Types of Computer Networks

A. LAN (Local Area Network)

A LAN connects computers within a small geographical area, like:

  • Home
  • Office
  • School
  • Lab

Features

  • High speed (100 Mbps – 10 Gbps)
  • Low cost
  • Owned and managed by one organization
  • Uses switches, Ethernet, Wi-Fi

Examples

  • College computer lab network
  • Office internal network

B. MAN (Metropolitan Area Network)

A MAN covers a city or large campus, bigger than LAN but smaller than WAN.

Features

  • Covers 10–50 km area
  • High-speed connectivity
  • Often maintained by telecom companies or ISPs

Examples

  • Cable TV networks
  • City-wide Wi-Fi
  • University campus network

C. WAN (Wide Area Network)

A WAN covers a large geographical area such as a country or multiple countries.

Features

  • Slow to moderate speed (depends on medium)
  • Very large coverage (thousands of km)
  • Uses routers, leased telephone lines, satellites, fiber optics
  • Maintained by ISPs (Airtel, Jio, BSNL)

Examples

  • The Internet (largest WAN)
  • Banking networks (ATMs across cities)
  • Multinational company networks

Comparison Table

FeatureLANMANWAN
AreaSmall (building)City/metropolitanWorldwide
SpeedHighMedium–HighLow–Medium
CostLowMediumHigh
OwnershipPrivatePublic or privateTelecom/ISPs
DevicesSwitch, Wi-FiRoutersRouters, satellites
Error rateLowModerateHigh

Data Communication

Data communication refers to the transfer of data between two devices through a communication medium.

Essential Elements of Data Communication

  1. Sender – Device that sends data
  2. Receiver – Device that receives data
  3. Message – The data being transferred
  4. Medium – Path (cable/wireless)
  5. Protocol – Set of rules for communication (TCP/IP, HTTP)

Forms of Data Transmission

  • Simplex - One-way communication only Example: TV broadcast
  • Half-Duplex - Two-way communication but not simultaneously Example: Walkie-talkie
  • Full-Duplex - Two-way communication at the same time Example: Mobile phone, Zoom call

Types of Transmission Media

1. Guided (Wired) Media

  • Twisted pair cable
  • Coaxial cable
  • Fiber optics

2. Unguided (Wireless) Media

  • Radio waves
  • Microwaves
  • Infrared
  • Satellite

Network Topologies

Topology refers to the physical or logical arrangement of computers in a network.

www.pratapsolution.com

A. Bus Topology

  • All computers connected to a single central cable (bus).

Advantages

  • Easy to install
  • Low cost

Disadvantages

  • If main cable fails, entire network stops
  • Slow when many devices connect

B. Star Topology

  • All computers connected to a central device (hub or switch).

Advantages

  • Easy to manage
  • Failure of one device does not affect others
  • High performance

Disadvantages

  • If hub/switch fails → network fails

C. Ring Topology

  • Devices connected in a circular path; data moves in one direction.

Advantages

  • Simple and organized
  • Equal access for all nodes

Disadvantages

  • Failure of one device breaks the whole network

D. Mesh Topology

  • Each device connected to every other device.

Advantages

  • Very reliable
  • No data congestion

Disadvantages

  • Very expensive
  • Complicated to maintain

E. Tree (Hierarchical) Topology

  • Combination of star + bus; arranged in hierarchical form.

Advantages

  • Scalable
  • Easy to expand

Disadvantages

  • Higher cost than bus topology

F. Hybrid Topology

  • Mixture of two or more topologies (star+ring, bus+mesh).

Advantages

  • Flexible and scalable

Disadvantages

  • Complex design
  • High cost

Summary Table of Topologies

TopologyKey FeatureStrengthWeakness
BusSingle cableCheapCable failure = network failure
StarCentral hubReliableHub failure is critical
RingCircularEqual accessOne point failure
MeshEvery node connectedHighly reliableVery costly
TreeHierarchicalScalableHigh cost
HybridMixed designFlexibleComplex