Computer and Information TechnologyUnit 412 min read
Operating Systems & Software: Core Functions, Types & Real-World Roles
Unit 4 of Computer and Information Technology: Explores operating systems (OS) as the bridge between hardware and software, their core functions (process management, memory allocation, file systems), types (Windows, Linux, embedded), and software classification (system vs. application), with real-world examples from Ne
TAKEAWAYS:
- An operating system is the invisible middleware that allocates CPU, memory, and storage while ensuring security and user interfaces (e.g., Windows 11’s task manager).
- Processes and threads (not just programs) run concurrently, managed by the OS scheduler (e.g., Pathao’s ride-matching app handles thousands of threads per second).
- Memory hierarchy (registers → cache → RAM → disk) explains why modern OSes use virtual memory (e.g., Ncell’s app crashes less often due to swap space).
- File systems (NTFS, ext4) organize data but differ in speed, error handling, and compatibility (e.g., Daraz’s servers use ext4 for faster order processing).
- Software is classified into system software (OS, drivers) and application software (MS Word, Google Maps), each serving distinct roles.
- Security (firewalls, access control) is built into OSes like Linux’s SELinux to protect against malware (e.g., NEPSE’s trading systems use hardened OSes to prevent fraud).
1. Operating Systems: The Invisible OS
An operating system (OS) is a program that manages computer hardware, software resources, and provides common services for computer programs. Without an OS, hardware would be useless—like a car engine without a driver.
Core Functions of an OS
Every OS performs these five critical tasks:
Key Idea: The OS is the traffic cop of the computer—deciding which program gets CPU time, where data is stored, and how users interact.
Types of Operating Systems
| Type | Description | Example (Nepal/Global) | Use Case |
|---|---|---|---|
| General-purpose | Designed for broad use (desktops, servers). | Windows 11, macOS, Linux (Ubuntu) | Personal computers, business servers |
| Embedded | Minimal OS tailored for specific hardware (no GUI, low power). | Android (smartphones), iOS, RTOS (NTC routers) | IoT devices, ATMs, traffic lights |
| Real-time | Guarantees response within strict time limits (critical systems). | VxWorks (military drones), QNX (automotive) | Medical equipment, industrial automation |
| Distributed | Manages multiple computers as a single system (networked). | Google’s Borg, Hadoop (cloud computing) | Big data processing, cloud services |
| Mobile | Lightweight OS for smartphones/tablets. | Android (Google), iOS (Apple) | Pathao app, eSewa transactions |
Why Nepal Uses Linux:
- NEPSE (Nepal Stock Exchange) runs on Linux servers for stability and security.
- Khalti (digital wallet) uses Docker containers (Linux-based) to isolate payment services.
2. How Operating Systems Work: A Deep Dive
Processes vs. Threads
- Process: An independent program with its own memory space (e.g., Chrome tab, Notepad).
- Thread: A lighter sub-unit of a process sharing memory (e.g., YouTube video playback + comments in the same Chrome tab).
graph TD
A["Process"] -->|"Contains"| B["Main Thread"]
A -->|"May have"| C["Thread 1"]
A -->|"May have"| D["Thread 2"]
B -->|"Runs"| E["CPU Time"]
C -->|"Runs"| E
D -->|"Runs"| EWorked Example: Pathao’s Ride-Matching
- When you request a ride, Pathao’s backend runs multiple threads:
- Driver matching thread (finds nearest available driver).
- Payment processing thread (validates eSewa/Khalti).
- GPS tracking thread (updates driver location).
- If one thread fails (e.g., payment timeout), others continue (e.g., driver still locates you).
Memory Management: Why RAM Isn’t Enough
Computers use a memory hierarchy to balance speed and cost:
figure: Memory Hierarchy
| Level | Type | Speed | Capacity | Cost | Example |
|---|---|---|---|---|---|
| 1 (Fastest) | Registers | Nanoseconds | KB | High | CPU registers |
| 2 | Cache (L1/L2) | Picoseconds | MB | Medium | Intel Core i7 cache |
| 3 | RAM | Nanoseconds | GB | Low | 8GB DDR4 in a laptop |
| 4 | SSD | Microseconds | TB | Very Low | Ncell’s cloud storage |
| 5 (Slowest) | HDD | Milliseconds | TB | Lowest | Old Windows XP machines |
Virtual Memory: When RAM is full, the OS swaps unused data to disk (like a notebook’s sticky notes).
- Example: If your laptop runs 10 Chrome tabs + Photoshop, the OS moves inactive tabs to swap space on the SSD.
File Systems: How Data is Organized
A file system defines how data is stored, named, and accessed. Key types:
| Feature | NTFS | ext4 | APFS |
|---|---|---|---|
| Case Sensitivity | No (case-insensitive) | Yes | Yes |
| Journaling | Yes (partial) | Yes (full) | Yes (full) |
| Max File Size | 16TB | 16TB | 8EB (exabyte!) |
| Used By | Windows PCs | Linux servers | MacBooks |
Why Daraz Uses ext4:
- Journaling prevents data corruption during power failures (critical for order processing).
- Faster writes than NTFS, reducing delays in inventory updates.
3. Software: System vs. Application
Software is classified into two broad categories:
System Software
- Operating Systems (Windows, Linux).
- Device Drivers (e.g., NTC’s Wi-Fi router driver).
- Utilities (Disk cleanup, antivirus like Bitdefender).
Application Software
- Productivity: MS Word, Google Docs.
- Entertainment: YouTube, Spotify.
- Business: QuickBooks (accounting), SAP (ERP).
- Nepal-Specific:
- eSewa/Khalti: Payment gateway software.
- NEPSE Trading App: Stock market application.
Worked Example: eSewa’s Software Stack
- System Software: Linux server (Ubuntu) runs eSewa’s backend.
- Application Software: PHP + MySQL handles transactions.
- Security Layer: Firewall (iptables) blocks DDoS attacks.
4. Operating System Security: Protecting Your Data
Security is built into the OS. Key mechanisms:
| Security Feature | How It Works | Example |
|---|---|---|
| User Accounts | Restricts access via usernames/passwords. | Your Ncell account. |
| File Permissions | Controls who can read/write files. | Only you can edit your resume.docx. |
| Firewalls | Blocks malicious traffic. | NTC’s router firewall blocks hackers. |
| Encryption | Scrambles data (AES-256). | eSewa encrypts your transaction data. |
Real-World Attack: The 2021 NEPSE Hack
- Issue: Hackers exploited weak access controls in NEPSE’s legacy system.
- Fix: Migrated to Linux-based servers with SELinux (mandatory access control).
- Lesson: Modern OSes enforce security by default.
5. Real-World Applications of Operating Systems
## In the Real World
eSewa (Nepal)
- Idea Used: Distributed OS (multiple servers handle transactions).
- How: eSewa’s backend runs on Linux containers (Docker) to isolate payment services. If one container crashes, others keep processing transactions.
- Worked Example: During Janai Purnima 2023, eSewa handled 50,000+ transactions/sec without downtime due to load balancing.
Pathao (Ride-Hailing)
- Idea Used: Real-time OS (low-latency scheduling).
- How: Pathao’s app uses Android’s Binder IPC (Inter-Process Communication) to instantly match drivers and riders. Threads handle:
- GPS updates.
- Payment validation.
- Ride status updates.
- Worked Example: A 2-second delay in thread switching could lose a rider to Uber.
NEPSE (Stock Exchange)
- Idea Used: Embedded OS + High Availability.
- How: NEPSE’s trading servers run on Linux with HA (High Availability) clusters. If one server fails, another takes over in <2 seconds.
- Worked Example: During Chhath festival 2022, NEPSE’s OS ensured no single point of failure during peak trading hours.
6. Exam Tips for Unit 4
Define Clearly
- For "Operating System", always include:
- Manages hardware/software.
- Provides user interface (CLI/GUI).
- Example: "Windows 11 is an OS that manages resources for applications like Chrome and Photoshop."
- For "Operating System", always include:
Compare File Systems
- The exam often asks: "Why does Linux prefer ext4 over NTFS?"
- Answer Structure:
- Speed: ext4 has faster writes.
- Journaling: ext4 prevents corruption.
- Compatibility: NTFS works on Windows, but ext4 is Linux-native.
Process vs. Thread
- Process: Independent (e.g., two Chrome windows).
- Thread: Shared memory (e.g., one Chrome window with multiple tabs).
- Exam Trick: Draw a thread vs. process diagram (like above) to score full marks.
Memory Hierarchy
- Always mention trade-offs: "Registers are fastest but smallest; HDDs are slowest but cheapest."
- Bonus: Relate to real life: "Your phone’s RAM is like your short-term memory—limited but fast."
Security Questions
- If asked about NEPSE’s security, mention:
- Firewalls (block attacks).
- Encryption (AES-256 for data).
- Access Control (only traders can execute orders).
- If asked about NEPSE’s security, mention:
Software Classification
- System Software = "Manages hardware".
- Application Software = "Performs user tasks".
- Example: "MS Excel is application software; Windows Defender is system software."
Final Note: Operating systems are everywhere—from your phone (Android) to Nepal’s stock exchange (Linux). Master the core functions (process management, memory, file systems) and real-world examples (eSewa, Pathao, NEPSE) to ace this unit. Draw diagrams (processes, memory hierarchy) to visualize concepts. Good luck!
Based on the TU BTTM syllabus for Computer and Information Technology (ITC307), unit 4.
Discussion
Loading…