Process, Memory and File Management
Process management
A process is a program in execution. A thread is a smaller unit of a process.
| State | Meaning |
|---|---|
| New | Process is being created. |
| Ready | Waiting for the CPU. |
| Running | Using the CPU. |
| Waiting (blocked) | Waiting for input or output. |
| Terminated | Finished. |
The Process Control Block (PCB) stores a process's information. Switching the CPU from one process to another is a context switch.
CPU scheduling algorithms
| Algorithm | Rule |
|---|---|
| FCFS | First Come First Served. Simple, can cause long waits. |
| SJF | Shortest Job First. Lowest average waiting time. |
| Round Robin | Each process gets a fixed time quantum in turn. Used in time-sharing. |
| Priority | Highest priority first. Low priority may starve. |
Worked example (FCFS). Processes P1, P2, P3 arrive together with burst times 5, 3 and 2 ms. Waiting times: P1 = 0, P2 = 5, P3 = 8. Average waiting time = (0 + 5 + 8) รท 3 = 4.33 ms. With SJF (order 2, 3, 5) waits are 0, 2, 5 and the average is 2.33 ms, which is why SJF is optimal.
Deadlock
Processes wait for each other forever. It needs all four conditions: mutual exclusion, hold and wait, no pre-emption, circular wait.
Memory management
| Term | Meaning |
|---|---|
| Paging | Memory divided into fixed-size blocks: pages (program) and frames (RAM). |
| Segmentation | Memory divided into variable-size logical parts (code, data, stack). |
| Internal fragmentation | Wasted space inside an allotted block. |
| External fragmentation | Free space split into pieces too small to use. |
| Virtual memory | Disk space used as extra RAM, so large programs can run. |
| Thrashing | The system spends more time swapping pages than working. |
| Page replacement | FIFO, LRU (Least Recently Used), Optimal. |
File systems
| System | Facts |
|---|---|
| FAT32 | Old. Maximum file size 4 GB. Works on pen drives and all systems. |
| exFAT | For flash drives and large files. |
| NTFS | Windows standard. Large files, security permissions, encryption, compression. |
| ext4 | Linux standard. |
A file has a name and an extension: .docx, .xlsx, .pptx, .pdf, .txt, .jpg, .png, .mp3, .mp4, .zip, .exe. Files are arranged in folders (directories); the top is the root.
Keep practising
Notes are only half the work. Test yourself with questions and discuss doubts with other aspirants.
Prepared for exam revision from standard computer textbooks, Microsoft documentation and official sources. Features differ between Excel and Word versions (2016, 2019, 2021, 365) so check which version your exam follows. Found a mistake? Tell us.