Chapter 11: Modern Operating Systems — UNIX and Windows

Syllabus 9.7 — Basic Characteristics of Modern Operating Systems: UNIX, Windows

1. What is UNIX?

UNIX is a multiuser, multitasking, portable operating system originally developed at Bell Labs in 1969 by Ken Thompson and Dennis Ritchie. It was first written in assembly, then rewritten in C, making it highly portable across hardware platforms.

Why UNIX Became Popular
Multiuser & Multitasking
Highly portable (written in C)
Stable and secure
Modular design
Powerful networking

UNIX Philosophy

📌 “Do one thing and do it well.”

Instead of one huge monolithic program, UNIX uses many small utilities that cooperate through pipes.

Example: sort | grep | wc — three small tools chained together.

UNIX Architecture

Layer (Top to Bottom)
Users
↓ Shell (interprets commands)
↓ Kernel (core OS services)
↓ Hardware

📌 Memory Trick — USKH: U → Users   S → Shell   K → Kernel   H → Hardware

UNIX Components

ComponentRoleExamples / Details
Kernel Heart of UNIX — manages CPU, memory, devices, processes, files Process scheduling, memory management, device I/O
Shell Interface between user and kernel; interprets commands Bourne Shell (sh), Bash, C Shell (csh), Z Shell (zsh)
File System Organizes files, directories, and devices Everything in UNIX is a file — including devices like printer, keyboard, hard disk

UNIX Directory Structure

DirectoryPurpose
/Root — top of the hierarchy
/homeUser home directories
/binEssential commands (ls, cp, mv)
/etcSystem configuration files
/devDevice files (disk, terminal, printer)
/tmpTemporary files
/usrUser applications and libraries

UNIX Process Management

System CallPurpose
fork()Creates a new child process; parent continues while child begins execution
exec()Replaces current process image with a new program
wait()Parent waits for child process to complete

UNIX Security & Permissions

UNIX security is based on Users, Groups, and Permissions (rwx).

PermissionSymbolNumeric Value
Readr4
Writew2
Executex1
Example PermissionMeaning
rwxr-xr-- (755)Owner: read+write+execute  |  Group: read+execute  |  Others: read only
rwx------ (700)Owner has all permissions; no one else can access

📌 Memory Trick — RWX: R → Read(4)   W → Write(2)   X → Execute(1)

Common UNIX Commands

CommandPurpose
pwdPrint current working directory
lsList files and directories
cdChange directory
mkdirCreate a new directory
cpCopy file
mvMove or rename file
rmRemove file
catDisplay file contents
chmodChange file permissions
psShow running processes

Advantages and Disadvantages of UNIX

AdvantagesDisadvantages
Highly stable and reliableSteeper learning curve (CLI-heavy)
Strong security modelLess user-friendly for beginners
Portable (runs on many hardware types)Commercial UNIX variants can be expensive
Efficient multiuser/multitaskingSmaller consumer software ecosystem
Powerful networkingHardware support can be limited

2. What is Windows?

Windows is a family of GUI-based operating systems developed by Microsoft, and is the world's most widely used desktop operating system.

Key Characteristics
Graphical User Interface (GUI)
Multitasking and Multiprocessing
Plug-and-Play hardware support
Built-in networking
User-friendly design

Windows Architecture

LayerComponents
User ModeApplications, GUI (Explorer), System Utilities, Win32 Subsystem
Windows APIInterface between applications and kernel
Kernel ModeMemory Manager, Scheduler, Device Drivers, Security Manager, I/O Manager
HardwarePhysical CPU, RAM, storage, devices

Windows uses a Hybrid Kernel — combines features of monolithic and microkernel architectures.

📌 Memory Trick — AWKH: A → Applications   W → Windows API   K → Kernel   H → Hardware

Windows Registry

The Windows Registry is a centralized hierarchical database that stores all system configuration.

Registry Stores
Hardware configuration
User settings and preferences
Installed software information
System and security policies

Unlike UNIX (where config is spread across text files in /etc), Windows centralizes all configuration in the Registry.

Windows File Systems

File SystemFeaturesStatus
FATSimple, limited features, no permissionsLegacy
FAT32Improved FAT; max file size 4 GBUSB drives, older systems
NTFSPermissions, encryption, compression, journaling, large file supportPrimary modern Windows FS
exFATExtended FAT for flash storageUSB, SD cards

📌 Memory Trick — PACE (NTFS Features): P → Permissions   A → Access control   C → Compression   E → Encryption

Windows Security

MechanismPurpose
User AccountsSeparate identities with different privilege levels
Access Control Lists (ACL)Fine-grained per-file/folder permissions
Windows FirewallNetwork traffic filtering
BitLocker EncryptionFull disk encryption
Windows DefenderBuilt-in antivirus and threat protection
UAC (User Account Control)Prompts for admin consent on sensitive operations

Advantages and Disadvantages of Windows

AdvantagesDisadvantages
Easy to use with rich GUIHigher memory and CPU resource usage
Largest consumer software ecosystemMore frequently targeted by malware
Broad hardware compatibility (Plug-and-Play)Proprietary — closed source
Strong gaming support (DirectX)License cost for many versions
Familiar to most usersLess flexible than UNIX/Linux for servers

3. UNIX vs Windows Comparison

FeatureUNIXWindows
OriginBell Labs, 1969Microsoft
InterfaceCLI dominantGUI dominant
Kernel typeMonolithic (traditional) / ModularHybrid kernel
File systemext4, UFS, ZFSNTFS, FAT32, exFAT
File philosophyEverything is a fileDrive letters (C:, D:)
PortabilityHighly portable (written in C)Less portable
Security modelrwx user/group/other permissionsACL-based permissions
Config storageText files in /etcCentralized Registry
StabilityExtremely stable; preferred for serversVery stable for desktop
Typical useServers, cloud, supercomputers, researchDesktop, office, gaming
CostOften free (Linux variants)Paid licenses (consumer/enterprise)
FeatureUNIX Process ModelWindows Process Model
PhilosophyProcess-centric (fork/exec)Thread-centric scheduling
SchedulingPriority-based preemptivePreemptive priority scheduling
Both supportMultitasking, multiprocessing, multithreading, virtual memory, paging

UNIX vs Linux (Frequently Confused)

FeatureUNIXLinux
OriginBell Labs, 1969Linus Torvalds, 1991
TypeOriginal OS familyUNIX-like kernel (not original UNIX)
SourceProprietary (mostly)Open Source
RelationshipOriginalInspired by UNIX, developed independently

Important Examination Facts

FactDetail
UNIX developed1969 at Bell Labs
UNIX developersKen Thompson and Dennis Ritchie
UNIX written inC (originally assembly)
UNIX philosophy“Do one thing and do it well” / Everything is a file
Windows developerMicrosoft
Primary Windows file systemNTFS
Windows configurationCentralized Registry
Windows kernel typeHybrid kernel
UNIX shell examplesBash, sh, csh, zsh
UNIX permission numericr=4, w=2, x=1 (e.g., 755 = rwxr-xr-x)

Memory Tricks

MnemonicFull Form
UNIX Architecture — USKH U → Users   S → Shell   K → Kernel   H → Hardware
Windows Layers — AWKH A → Applications   W → Windows API   K → Kernel   H → Hardware
UNIX Permissions — RWX R → Read(4)   W → Write(2)   X → Execute(1)
NTFS Features — PACE P → Permissions   A → Access control   C → Compression   E → Encryption

Frequently Asked Exam Questions

QuestionAnswer
What is UNIX?A multiuser, multitasking OS developed at Bell Labs in 1969 by Ken Thompson and Dennis Ritchie
Role of the shell in UNIX?Interface between user and kernel; interprets and executes user commands
What is the Windows Registry?A centralized database storing hardware config, user settings, installed software, and system policies
What is NTFS?Primary modern Windows file system with permissions, encryption, compression, and journaling
What does “Everything is a file” mean?UNIX represents devices, sockets, and hardware as files for uniform access through a common interface
UNIX vs Windows key difference?UNIX: portable, CLI-focused, stable for servers. Windows: GUI-focused, user-friendly, desktop dominant.
What is the UNIX permission for 755?Owner: rwx (7)  |  Group: r-x (5)  |  Others: r-x (5)

Practice MCQs

  • 1. UNIX was originally developed at:
    A. IBM   B. Microsoft   C. Bell Labs   D. Apple
    ✅ Answer: C — Bell Labs
  • 2. Which component acts as the interface between user and UNIX kernel?
    A. Loader   B. Shell   C. Driver   D. Compiler
    ✅ Answer: B — Shell
  • 3. Which is the primary modern Windows file system?
    A. FAT   B. FAT32   C. NTFS   D. ext4
    ✅ Answer: C — NTFS
  • 4. Which UNIX permission allows execution of a file?
    A. Read   B. Write   C. Execute   D. Delete
    ✅ Answer: C — Execute (x, value = 1)
  • 5. Which statement best describes the Windows Registry?
    A. A file allocation table   B. A process scheduler   C. A centralized configuration database   D. A command interpreter
    ✅ Answer: C — A centralized configuration database