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:
-
Command Prompt / Terminal - A text-based window to enter commands.
-
Commands - Single-line instructions.
Examples: -
Syntax - Each command must follow a proper structure.
Example: -
Switches / Options - Modify how commands work.
Example (Windows):Example (Linux):
-
File Paths - Absolute and relative paths are used for navigation.
-
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:
- Desktop - Main working area with wallpaper and icons.
- Icons - Small graphical symbols for applications/files.
- Windows - Boxes to display files, apps, and settings.
- Menus - Drop-down options (File, Edit, View, etc.).
- Taskbar / Dock - Shows running applications and system notifications.
- Buttons - Minimize, maximize, close button.
- Pointer / Cursor - Controlled by mouse or touchpad.
- Dialog Boxes - Pop-up windows for user input.
- Touch Interface (mobile GUI) - Scroll, tap, swipe gestures.
Summary Table
| Category | Command-Based OS (CLI) | GUI-Based OS |
|---|---|---|
| Interface | Text-based | Graphical |
| Ease of Use | Hard for beginners | Easy & user-friendly |
| Speed | Fast for experts | Slightly slower |
| Memory Use | Low | Higher |
| Examples | DOS, Linux terminal | Windows, Android |
| Input | Keyboard commands | Mouse, touch, keyboard |
| Best For | Programming, servers | Normal 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
| Feature | LAN | MAN | WAN |
|---|---|---|---|
| Area | Small (building) | City/metropolitan | Worldwide |
| Speed | High | Medium–High | Low–Medium |
| Cost | Low | Medium | High |
| Ownership | Private | Public or private | Telecom/ISPs |
| Devices | Switch, Wi-Fi | Routers | Routers, satellites |
| Error rate | Low | Moderate | High |
Data Communication
Data communication refers to the transfer of data between two devices through a communication medium.
Essential Elements of Data Communication
- Sender – Device that sends data
- Receiver – Device that receives data
- Message – The data being transferred
- Medium – Path (cable/wireless)
- 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.
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
| Topology | Key Feature | Strength | Weakness |
|---|---|---|---|
| Bus | Single cable | Cheap | Cable failure = network failure |
| Star | Central hub | Reliable | Hub failure is critical |
| Ring | Circular | Equal access | One point failure |
| Mesh | Every node connected | Highly reliable | Very costly |
| Tree | Hierarchical | Scalable | High cost |
| Hybrid | Mixed design | Flexible | Complex |
