Computer Organization & Operating Systems - Complete Guide
Last Updated: August 19, 2026 | Marks Weightage: ~12 Marks | BPSC CS Teacher
Master the concepts of Computer Organization and Operating Systems with this comprehensive guide for the BPSC Computer Science Teacher exam.
1. CPU Architecture
🏛️ Von Neumann Architecture
- Single memory space for data and instructions
- Used in most modern CPUs (x86, x64)
- Simple and cost-effective
- Components: CPU, Memory, I/O, Bus
🏛️ Harvard Architecture
- Separate memory for data and instructions
- Used in microcontrollers and DSPs
- Faster due to simultaneous access
- Example: ARM Cortex-M series
2. Instruction Cycle
The CPU follows a continuous cycle to execute instructions:
- 📥 FETCH: Control Unit fetches instruction from memory
- 🔍 DECODE: Control Unit decodes the instruction
- ⚡ EXECUTE: ALU performs the operation
- 💾 STORE: Result is stored in register or memory
3. Memory Management
📊 Memory Hierarchy
- Registers: Fastest, inside CPU
- Cache (L1, L2, L3): High-speed, inside CPU
- RAM (Main Memory): Volatile, primary storage
- Secondary Storage: HDD, SSD, non-volatile
🔄 Virtual Memory
- Uses disk space as extension of RAM
- Paging: Fixed-size blocks (frames/pages)
- Segmentation: Variable-sized segments
- Page Replacement Algorithms: FIFO, LRU, Optimal
4. I/O Organization
- I/O Interfaces: USB, SATA, PCIe, HDMI
- Interrupts: Hardware/Software signals to CPU
- DMA (Direct Memory Access): Transfers data directly between I/O and memory without CPU involvement
5. Operating System Types
📦 Batch OS
Processes jobs in batches, no user interaction
⏱️ Multi-programming
Multiple programs in memory, CPU switches between them
🔄 Time-Sharing
Multiple users share CPU time
⚡ Real-Time
Fixed time constraints (e.g., medical, aerospace)
🌐 Distributed
Multiple computers work as one system
📱 Mobile OS
Android, iOS, HarmonyOS
6. Process Management
🔄 Process States
- New: Process being created
- Ready: Waiting for CPU
- Running: Executing on CPU
- Waiting: Waiting for I/O
- Terminated: Process finished
📋 Process Control Block (PCB)
- Process ID (PID)
- Process State
- Program Counter (PC)
- Registers
- Memory Limits
- Open Files
7. CPU Scheduling Algorithms
| Algorithm | Description | Pros | Cons |
|---|---|---|---|
| FCFS (First Come First Served) | Processes executed in arrival order | Simple, fair | Convoy effect |
| SJF (Shortest Job First) | Shortest burst time first | Minimizes waiting time | Starvation of longer jobs |
| Priority Scheduling | Higher priority processes first | Critical tasks get priority | Starvation of low priority |
| Round Robin (RR) | Time quantum-based, preemptive | Fair time sharing | More context switches |
8. Deadlock
🚫 Conditions
- Mutual Exclusion: Resources cannot be shared
- Hold and Wait: Holding resources while waiting
- No Preemption: Resources cannot be forcibly taken
- Circular Wait: Circular chain of waiting processes
✅ Prevention & Avoidance
- Prevention: Break one of the 4 conditions
- Avoidance: Banker's Algorithm (ensure safe state)
- Detection: Periodic check for deadlock
- Recovery: Abort process or preempt resources
9. File Systems
- FAT (File Allocation Table): Simple, used in older Windows
- NTFS (New Technology File System): Modern Windows, supports encryption, compression
- ext2/ext3/ext4: Linux file systems
- APFS: Apple File System
10. Frequently Asked Questions
❓ What is the difference between Von Neumann and Harvard Architecture?
Von Neumann uses a single memory for data and instructions, Harvard uses separate memories.
❓ What is the Instruction Cycle?
Fetch → Decode → Execute → Store
❓ What are the 4 conditions for deadlock?
Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait
❓ What is the Banker's Algorithm?
It is a deadlock avoidance algorithm that checks if the system is in a safe state before allocating resources.