BCA101 Computer Fundamentals and Applications

Computer Fundamentals and ApplicationsUnit 216 min read

OS, Software Types, CLI/GUI, Memory Hierarchy & Virus Protection

Unit 2 of Computer Fundamentals and Applications covers the core concepts of operating systems (OS), their types (CLI vs GUI), software classification (system vs application), memory hierarchy, and computer viruses—essential for TU BCA exams and real-world IT roles.

Key points

  • An OS acts as a bridge between hardware and software, managing resources like CPU, memory, and I/O devices.
  • Software is classified into **system software** (e.g., OS, compilers) and **application software** (e.g., MS Word, Photoshop).
  • Memory hierarchy follows the principle of **speed vs. cost**, with CPU registers being fastest but smallest, and secondary storage (HDD/SSD) being slowest but largest.
  • Computer viruses exploit vulnerabilities in software; prevention includes **antivirus software, firewalls, and user awareness**.
  • CLI (Command Line Interface) is faster for automation, while GUI (Graphical User Interface) is user-friendly for beginners.
  • DOS commands are still relevant for **file management, directory navigation, and system maintenance** in legacy systems.
  • ```

1. Operating Systems (OS): The Brain of the Computer

An Operating System (OS) is a system software that manages hardware and software resources, providing a user-friendly interface for users and applications. Without an OS, a computer would be useless—it acts like a traffic controller, ensuring smooth communication between hardware (CPU, RAM, storage) and software (applications, drivers).

Key Functions of an OS

mindmap
  root((Operating System Functions))
    OS["Manages Hardware Resources"]
      CPU["Process Scheduling (FCFS, SJF, Round Robin)"]
      Memory["Memory Allocation (Partitioning, Paging)"]
      I/O["Device Drivers (Printer, Keyboard, Disk)"]
    OS["Provides User Interface"]
      CLI["Command Line (DOS, Linux Terminal)"]
      GUI["Graphical (Windows, macOS, Android)"]
    OS["Manages File Systems"]
      File["Organization (FAT32, NTFS, ext4)"]
      Security["Permissions (Read/Write/Execute)"]
    OS["Handles Multitasking"]
      Process["Concurrent Execution (Threads, Processes)"]
      Priority["Scheduling Algorithms (Priority, RR)"]
    OS["System Security & Stability"]
      Authentication["User Logins, Biometrics"]
      Recovery["Crash Handling, Backup Systems"]

Types of Operating Systems

Type Description Examples Use Case
Batch OS Executes jobs in batches (no user interaction). Early IBM Mainframes Legacy banking systems
Time-Sharing OS Multiple users share CPU time (multitasking). Unix, Linux University server labs
Distributed OS Manages multiple computers as a single system. Google File System, Hadoop Cloud computing (AWS, Azure)
Real-Time OS Guarantees response within strict deadlines. VxWorks, FreeRTOS Medical devices, robotics
Network OS Manages resources across a network. Windows Server, Novell NetWare Corporate LANs
Embedded OS Runs on dedicated hardware (low resource usage). Android (for phones), iOS Smartphones, IoT devices

CLI vs. GUI: Which is Better?

Feature Command Line Interface (CLI) Graphical User Interface (GUI)
Ease of Use Hard for beginners (requires memorization) Intuitive (icons, menus, drag-and-drop)
Speed Faster for automation and bulk operations Slower due to graphical overhead
Flexibility High (supports scripting, batch processing) Limited (depends on GUI tools)
Resource Use Lightweight (less memory/CPU) Heavy (requires more resources)
Examples DOS, Linux Terminal, PowerShell Windows, macOS, Ubuntu Desktop

Worked Example: DOS vs. GUI in File Management

  • GUI (Windows Explorer):
    • Click → Open → Select → Drag → Drop
    • Time taken: ~10 seconds (for a novice)
  • CLI (DOS):
    • Command: copy C:\file.txt D:\backup\
    • Time taken: ~2 seconds (for an expert)
    • Bonus: Can automate with a batch script (copy.bat).
CLI (Command Line)GUI (Graphical User Interface)faster for experts, more flexible
Comparison of CLI vs. GUI efficiency (expert user scenario)

2. Software Classification: System vs. Application

Software is broadly divided into two categories:

  1. System Software – Manages hardware and provides a platform for applications.
  2. Application Software – Performs specific tasks for end-users.

System Software

classDiagram
    class SystemSoftware {
        +Manages Hardware
        +Provides Platform for Apps
        +Includes OS, Drivers, Utilities
    }
    class OS {
        +Windows
        +Linux
        +macOS
        +Handles CPU, Memory, I/O
    }
    class DeviceDrivers {
        +Printer Drivers
        +GPU Drivers
        +Network Drivers
        +Enables Hardware Communication
    }
    class Utilities {
        +Antivirus
        +Disk Cleanup
        +File Compression
        +Maintenance & Optimization
    }
    SystemSoftware <|-- OS
    SystemSoftware <|-- DeviceDrivers
    SystemSoftware <|-- Utilities
    note for OS "Examples: Windows 11, Ubuntu 22.04"
    note for DeviceDrivers "Example: NVIDIA GeForce Driver"
    note for Utilities "Example: CCleaner, Malwarebytes"

Examples of System Software:

  • Operating Systems: Windows 11, Ubuntu, macOS
  • Device Drivers: Printer drivers, GPU drivers (NVIDIA, AMD)
  • Utilities: Antivirus (Norton, McAfee), Disk Defragmenter, Task Manager

Application Software

classDiagram
    class ApplicationSoftware {
        +Performs User Tasks
        +Runs on System Software
        +Examples: Word, Excel, Games
    }
    class Productivity {
        +MS Office, LibreOffice
        +Word Processing, Spreadsheets
    }
    class Entertainment {
        +VLC, Spotify, Photoshop
        +Media & Graphics
    }
    class Specialized {
        +AutoCAD, MATLAB
        +Engineering & Science
    }
    ApplicationSoftware <|-- Productivity
    ApplicationSoftware <|-- Entertainment
    ApplicationSoftware <|-- Specialized

Examples of Application Software:

  • Productivity: MS Word, Excel, Google Docs
  • Entertainment: YouTube, Spotify, Adobe Photoshop
  • Specialized: MATLAB (for engineers), AutoCAD (for architects)

Real-World Example: eSewa (Nepal) & Software Layers

  • System Software: Linux OS (runs on eSewa’s servers)
  • Application Software: eSewa mobile app (for users)
  • Database Software: MySQL (stores transaction data)
  • Network Software: Apache HTTP Server (handles web requests)

3. Memory Hierarchy: Speed vs. Cost Tradeoff

Computers use a memory hierarchy where faster memory is smaller and more expensive, while slower memory is larger and cheaper.

mindmap
  root((Memory Hierarchy))
    Registers["Fastest (ns), Smallest (KB)"]
      CPU["Stores intermediate results"]
    Cache["Faster than RAM (µs), MBs" ]
      L1["Smallest, fastest cache"]
      L2["Larger, slightly slower"]
      L3["Shared cache in multi-core CPUs"]
    RAM["Volatile (loses data on power off), GBs (ms)"]
      DRAM["Dynamic RAM (used in PCs)"]
      SRAM["Static RAM (used in cache)"]
    SecondaryStorage["Non-volatile (persists without power), TBs (ms to sec)"]
      HDD["Mechanical (slower, cheaper)"]
      SSD["Solid State (faster, expensive)"]
      CloudStorage["Remote (Google Drive, Dropbox)"]

Worked Example: Memory Access in a Bank Transaction (Pathao App)

  1. CPU Registers: Stores temporary calculations (e.g., fare amount).
  2. Cache (L1/L2): Fetches frequently used app data (e.g., user location).
  3. RAM: Loads the entire Pathao app when opened.
  4. SSD (Secondary Storage): Stores user profiles and transaction history.
  5. Cloud Storage: Backs up data to Pathao’s servers.

4. Computer Viruses & Malware: Threats & Prevention

A computer virus is a malicious program that replicates itself and spreads to other files or computers. Unlike biological viruses, they do not spread through air or contact but via infected files, emails, or networks.

Types of Malware

Type Description Example
Virus Attaches to clean files and spreads when executed. ILOVEYOU Virus (2000)
Worm Self-replicating, spreads without user action (networks). Morris Worm (1988)
Trojan Horse Disguised as legitimate software. Fake "Antivirus 2009" scam
Ransomware Encrypts files and demands payment. WannaCry (2017)
Spyware Secretly collects user data. Keyloggers, Adware
Adware Displays unwanted ads. Pop-up ads in browsers
Boot sectorFile infectorVirusesNetwork-basedWormsBackdoorSpywareTrojansCrypto-malwareRansomwareAdwareMalware
Classification of common malware types with examples

Symptoms of a Virus Infection

  • Slow computer performance
  • Frequent crashes or error messages
  • Unknown programs running
  • Unexpected pop-ups or ads
  • Hard disk activity when idle

Prevention Techniques

  1. Install Antivirus Software (Norton, McAfee, Windows Defender)
  2. Keep OS & Software Updated (Patches fix vulnerabilities)
  3. Avoid Pirated Software (Common source of malware)
  4. Use Firewalls (Blocks unauthorized network access)
  5. Regular Backups (Recover data if infected)
  6. Educate Users (Avoid phishing emails, suspicious links)

Real-World Example: Ncell & Mobile Banking Security

  • Problem: Fake banking apps (Trojan) steal login credentials.
  • Solution:
    • 2FA (Two-Factor Authentication) – Extra security layer.
    • Biometric Login – Fingerprint/Face ID reduces phishing risks.
    • Regular Security Updates – Patches vulnerabilities in the app.

5. DOS Commands: Still Relevant in 2024?

Despite GUI dominance, DOS (Disk Operating System) commands are still used in:

  • Server administration (Linux/Unix terminals)
  • Automation scripts (Batch files in Windows)
  • Troubleshooting (Networking, file recovery)

Common DOS Commands (Windows)

Command Description Example
dir Lists files and folders in a directory. dir C:\
cd Changes directory. cd Documents
copy Copies files from one location to another. copy file.txt D:\backup\
del Deletes a file. del oldfile.txt
md Creates a new directory. md NewFolder
rd Removes a directory. rd OldFolder
ren Renames a file or folder. ren oldname.txt newname.txt
help Displays help for a command. help copy
ipconfig Shows network configuration (IP, DNS). ipconfig /all
ping Tests network connectivity. ping google.com
shutdown Turns off or restarts the computer. shutdown /s /t 60 (shuts down in 60 sec)
dircopydelmdcdTOP
Example DOS command stack showing basic file operations

Worked Example: Managing a Daraz Order Queue (Using DOS) Suppose Daraz’s backend uses a batch script to process orders:

@echo off
:loop
dir C:\Orders\Pending\*.txt /b > orderlist.txt
for /f "delims=" %%i in (orderlist.txt) do (
    echo Processing order: %%i
    move C:\Orders\Pending\%%i C:\Orders\Processed\
    timeout /t 5
)
goto loop
  • What it does:
    1. Lists all pending orders (dir).
    2. Moves each order to the "Processed" folder (move).
    3. Adds a 5-second delay (timeout) to simulate processing.

## In the Real World

  1. eSewa (Nepal) – OS & Security

    • OS: Runs on Linux servers (stable for financial transactions).
    • Security: Uses encryption (SSL/TLS) to protect user data.
    • Database: MySQL stores transaction records securely.
  2. Khalti – Memory & Multitasking

    • RAM: Handles thousands of transactions per second (high-speed processing).
    • CPU Scheduling: Uses Round Robin to ensure fair processing of all requests.
    • Backup: Cloud storage (AWS) ensures data is never lost.
  3. NTC (Nepal Telecom) – Network OS

    • Router OS: Cisco IOS manages internet traffic across Nepal.
    • Load Balancing: Distributes data across multiple servers to prevent overload.
    • Firewalls: Blocks DDoS attacks to keep the network secure.
  4. Pathao – CLI for Backend Automation

    • Scripting: Uses Python/Bash scripts to automate driver assignments.
    • Logging: tail -f /var/log/pathao.log (Linux command) to monitor errors in real-time.
    • Database: PostgreSQL stores ride history for analytics.
  5. Nepal Rastra Bank – Ransomware Threat

    • Problem: In 2021, a ransomware attack locked bank systems.
    • Solution:
      • Offline backups (prevents data loss).
      • Employee training (avoids phishing emails).
      • Antivirus updates (blocks new malware strains).

## Exam Tip: How to Score Full Marks

  1. Define Clearly – Always start with a precise definition before explaining.

    • ❌ "OS manages hardware."
    • ✅ "An Operating System is a system software that acts as an intermediary between hardware and software, managing resources like CPU, memory, and I/O devices."
  2. Use Diagrams & Tables – TU exams love visuals. Draw:

    • Memory hierarchy (speed vs. cost).
    • OSI model (if networking is involved).
    • Comparison tables (CLI vs. GUI, System vs. Application Software).
  3. Relate to Real-World Examples – Examiners appreciate practical connections.

    • "Like how eSewa uses Linux for security, Windows Server is used in corporate networks for stability."
  4. DOS Commands – Be Exact

    • ❌ "Use copy to move files."
    • ✅ "The command copy C:\file.txt D:\backup\ copies file.txt from C: to D: drive."
  5. Virus Prevention – List & Explain

    • Don’t just say "Use antivirus."
    • Instead:

      *"Prevention includes:

      1. Antivirus software (e.g., Norton) to detect malware.
      2. Firewalls to block unauthorized access.
      3. Regular updates to patch vulnerabilities.
      4. User awareness to avoid phishing scams."*
  6. Memory Hierarchy – Explain the Tradeoff

    • "Faster memory (like CPU cache) is expensive but essential for speed, while slower memory (like HDD) is cheaper but stores more data."
  7. Avoid Vague Answers – If asked about GUI vs. CLI, don’t just say "GUI is easier."

    • Instead:

      "GUI is user-friendly (icons, drag-and-drop) but slower due to graphical overhead, while CLI is faster for automation but requires technical knowledge."


Final Reminder:

  • Memorize key commands (dir, cd, copy, del).
  • Understand OS functions (process management, memory allocation).
  • Practice drawing diagrams (memory hierarchy, OS types).
  • Relate theory to real-world apps (eSewa, Khalti, NTC).

Good luck! 🚀

Based on the TU BCA syllabus for Computer Fundamentals and Applications (BCA101), unit 2.

Discussion

Loading…