🇮🇳 GATE CS & IT Engineering · subject

GATE CS & IT Engineering Operating System Syllabus

The Operating System syllabus for GATE CS & IT Engineering in full: 8 chapters and 5 topics, every one listed below, plus 51 Operating System flashcards with answers.

8Chapters
5Topics
51Flashcards

Operating System syllabus: all 8 chapters

Expand any chapter to see its topics and sub-topics.

  1. System calls

    overview

    No separate topics listed for this chapter.

  2. Processes and Threads

    overview

    No separate topics listed for this chapter.

  3. Inter-process Communication

    overview

    No separate topics listed for this chapter.

  4. Concurrency and Synchronization

    overview

    No separate topics listed for this chapter.

  5. Deadlock

    overview

    No separate topics listed for this chapter.

  6. CPU and I/O Scheduling

    2 topics
    • CPU Scheduling
    • I/O Scheduling
  7. Memory Management and Virtual Memory

    2 topics
    • Memory Management
    • Virtual Memory
  8. File Systems

    1 topic
    • File Systems

GATE CS & IT Engineering Operating System flashcards — 51 questions with answers

  1. What is the difference between preemptive and non-preemptive CPU scheduling?

    In non-preemptive scheduling, once the CPU is allocated to a process it keeps the CPU until it terminates or switches to the waiting state. In preemptive scheduling, the CPU can be forcibly taken from a running process (e.g., when a higher-priority process arrives or a time quantum expires).

  2. Define turnaround time, waiting time, and response time in CPU scheduling.

    Turnaround Time $= $ Completion Time $-$ Arrival Time. Waiting Time $= $ Turnaround Time $-$ Burst Time. Response Time $= $ Time of first CPU allocation $-$ Arrival Time.

  3. What scheduling algorithm gives the provably minimum average waiting time, and is it preemptive or non-preemptive?

    Shortest Job First (SJF) gives the minimum average waiting time among all non-preemptive algorithms. Its preemptive version is Shortest Remaining Time First (SRTF).

  4. Why can the FCFS scheduling algorithm cause the 'convoy effect'?

    In FCFS, if a long CPU-bound process arrives first, all shorter processes behind it must wait for it to finish, leading to poor average waiting time. This piling up of short processes behind one long process is the convoy effect.

  5. In Round Robin scheduling, how does the time quantum value affect performance?

    If the time quantum is very large, RR degenerates into FCFS. If it is very small, context-switch overhead dominates and throughput drops. The quantum should be large relative to the context-switch time but small enough to keep response time low.

  6. What is starvation in CPU scheduling and what technique solves it?

    Starvation is the indefinite postponement of a low-priority process because higher-priority processes keep arriving. It is solved by aging, which gradually increases the priority of a process the longer it waits.

  7. For SJF, given processes with burst times, what is the formula used to predict the next CPU burst via exponential averaging?

    $$\tau_{n+1} = \alpha\, t_{n} + (1-\alpha)\,\tau_{n}$$ where $t_n$ is the actual length of the $n$th burst, $\tau_n$ is the previous prediction, and $0 \leq \alpha \leq 1$.

  8. What is the difference between a priority scheduling algorithm and SJF?

    SJF is a special case of priority scheduling where the priority is the inverse of the predicted next CPU burst (shorter burst = higher priority). General priority scheduling can use any externally or internally defined priority criterion.

  9. Compute the average waiting time for FCFS with processes P1, P2, P3 having burst times 24, 3, 3 (arriving at time 0 in that order).

    Waiting times: P1 $=0$, P2 $=24$, P3 $=27$. $$\text{Avg WT} = \frac{0 + 24 + 27}{3} = 17 \text{ ms}$$

  10. In Multilevel Feedback Queue scheduling, how do processes move between queues?

    A process that uses too much CPU time is demoted to a lower-priority queue; a process that waits too long in a lower queue can be promoted (aged) to a higher queue. This favors short and I/O-bound processes while preventing starvation.

  11. What is the formula for CPU utilization in terms of context-switch overhead with time quantum $q$ and context-switch time $s$?

    $$\text{CPU Utilization} = \frac{q}{q + s}$$ where $q$ is the time quantum and $s$ is the context-switch time.

  12. Differentiate between the long-term, short-term, and medium-term schedulers.

    Long-term (job) scheduler selects which jobs enter the ready queue, controlling the degree of multiprogramming. Short-term (CPU) scheduler selects which ready process runs next and executes frequently. Medium-term scheduler handles swapping processes in and out of memory.

  13. What is the goal of disk (I/O) scheduling, and what three components make up a disk access time?

    Disk scheduling aims to minimize total head movement / access time. Disk access time $= $ Seek Time $+$ Rotational Latency $+$ Transfer Time.

  14. How does the SSTF (Shortest Seek Time First) disk scheduling algorithm work, and what is its main drawback?

    SSTF selects the pending request closest to the current head position (minimum seek). Its drawback is starvation of requests far from the head, and it is not optimal overall.

  15. Describe the SCAN (elevator) disk scheduling algorithm.

    The disk head moves in one direction servicing all requests until it reaches the end of the disk, then reverses direction and services requests on the way back, like an elevator.

  16. How does C-SCAN differ from SCAN, and why is it preferred?

    In C-SCAN, the head services requests in one direction to the end, then jumps back to the beginning without servicing on the return, treating the disk as circular. This gives a more uniform wait time than SCAN, which favors recently passed cylinders.

  17. What is the difference between LOOK and SCAN disk scheduling?

    LOOK is like SCAN but the head only goes as far as the last request in each direction instead of all the way to the end of the disk, then reverses. C-LOOK is the circular variant of LOOK.

  18. Calculate total head movement for FCFS servicing the request queue 98, 183, 37 starting at head position 53.

    Movement $= |98-53| + |183-98| + |37-183| = 45 + 85 + 146 = 276$ cylinders.

  19. What is rotational latency, and what is its average value for a disk rotating at $r$ RPM?

    Rotational latency is the time for the desired sector to rotate under the head. On average it is half a rotation: $$\text{Avg Latency} = \frac{1}{2} \cdot \frac{60}{r} \text{ seconds} = \frac{30}{r}\text{ s}$$

  20. Give the formula for data transfer time of one sector on a disk rotating at $r$ RPM with $N$ sectors per track.

    $$T_{transfer} = \frac{1}{r/60} \cdot \frac{1}{N} = \frac{60}{r \cdot N} \text{ seconds}$$ i.e., the time for one full rotation divided by the number of sectors per track.

Show the other 31 Operating System flashcards
  1. What is the disk data transfer rate in terms of bytes per track and RPM?

    $$\text{Transfer Rate} = (\text{bytes per track}) \times \frac{r}{60} \text{ bytes/second}$$ where $r$ is the rotation speed in RPM (number of tracks read per second times track capacity).

  2. What is internal fragmentation and in which memory allocation scheme does it occur?

    Internal fragmentation is the unused space inside an allocated block/partition because the allocation is larger than the requested memory. It occurs in fixed-size partitioning and in paging (within the last page).

  3. What is external fragmentation and which allocation scheme suffers from it?

    External fragmentation is free memory split into small non-contiguous holes that collectively are large enough but individually too small to satisfy a request. It occurs in variable-size partitioning and pure segmentation.

  4. Compare First-Fit, Best-Fit, and Worst-Fit memory allocation strategies.

    First-Fit allocates the first hole large enough (fast). Best-Fit allocates the smallest hole that fits (least leftover but more external fragmentation and slow). Worst-Fit allocates the largest hole (leaves large usable remainder but wastes big holes).

  5. In paging, how is a logical address split, and what does each part index?

    A logical address is split into a page number $p$ and a page offset $d$. $p$ indexes the page table to find the frame number; $d$ is the offset within the frame. If logical address space is $2^m$ and page size is $2^n$, then $p$ has $m-n$ bits and $d$ has $n$ bits.

  6. What is the purpose of a Translation Lookaside Buffer (TLB)?

    The TLB is a small, fast associative cache that stores recent page-number-to-frame-number translations, avoiding a slow page-table lookup in main memory for each address translation.

  7. Give the formula for Effective Memory Access Time (EMAT) with a TLB of hit ratio $h$, TLB access time $t$, and memory access time $m$.

    $$\text{EMAT} = h(t + m) + (1-h)(t + 2m)$$ assuming the page table is in memory (one extra access on a TLB miss).

  8. What is the key difference between paging and segmentation?

    Paging divides memory into fixed-size pages/frames (transparent to the programmer, causes internal fragmentation). Segmentation divides memory into variable-size logical units like code, stack, data (visible to the programmer, causes external fragmentation).

  9. How does a segmentation address translation use the segment table?

    A logical address is $\langle$segment number $s$, offset $d\rangle$. The segment table gives a base and a limit for segment $s$. If $d < \text{limit}$, the physical address is base $+ d$; otherwise a trap (addressing error) occurs.

  10. What is the difference between logical (virtual) and physical address space?

    A logical address is generated by the CPU and seen by the process; a physical address is the actual location in main memory. The Memory Management Unit (MMU) maps logical to physical addresses at runtime.

  11. What is demand paging in virtual memory?

    Demand paging loads a page into memory only when it is referenced (a page fault occurs), rather than loading the entire process upfront. This reduces memory use and startup I/O via lazy loading.

  12. Give the formula for the Effective Access Time (EAT) under demand paging with page-fault rate $p$, memory access time $m$, and page-fault service time $f$.

    $$\text{EAT} = (1-p)\,m + p\,f$$ where $p$ is the probability of a page fault and $f$ includes the time to service the fault (swap in the page).

  13. What is Belady's Anomaly and which page-replacement algorithm exhibits it?

    Belady's Anomaly is the counterintuitive phenomenon where increasing the number of page frames increases the number of page faults. It can occur with the FIFO page-replacement algorithm.

  14. How does the Optimal (OPT/MIN) page-replacement algorithm work, and why is it not practical?

    OPT replaces the page that will not be used for the longest time in the future, giving the minimum possible page faults. It is impractical because it requires future knowledge of the reference string; it is used only as a benchmark.

  15. Describe the LRU (Least Recently Used) page-replacement algorithm.

    LRU replaces the page that has not been used for the longest time in the past, approximating OPT using past behavior. It can be implemented with counters/timestamps or a stack and does not suffer from Belady's Anomaly (it is a stack algorithm).

  16. What is thrashing in virtual memory, and what causes it?

    Thrashing is when a process spends more time paging (swapping pages in and out) than executing, due to having too few frames to hold its working set. A high degree of multiprogramming causes it; it can be controlled using the working-set model or page-fault frequency.

  17. State the principle of locality of reference and its two types.

    Programs tend to reference a small, clustered set of pages over a short time. Temporal locality: a referenced item is likely referenced again soon. Spatial locality: items near a referenced item are likely referenced soon.

  18. What is the working set of a process, and how is it defined with a window $\Delta$?

    The working set $W(t,\Delta)$ is the set of distinct pages referenced in the most recent $\Delta$ memory references. Its size approximates the locality; if total working-set demand exceeds available frames, thrashing occurs.

  19. For a page reference string with FIFO and 3 frames, what data structure determines the victim page?

    FIFO uses a queue: the page that has been in memory the longest (the one at the front of the queue / first loaded) is selected as the victim, regardless of usage.

  20. What is the difference between a page fault and a segmentation fault?

    A page fault is a normal event where a referenced valid page is not in memory and must be brought in from disk. A segmentation fault is an illegal memory access (e.g., offset beyond a segment's limit or invalid address) that the OS treats as an error.

  21. How does the second-chance (clock) page-replacement algorithm work?

    It is FIFO with a reference bit. When a page is selected for replacement, if its reference bit is 1, it is given a second chance (bit cleared to 0, moved to the rear); if 0, it is replaced. The pages are scanned cyclically like a clock.

  22. In an inverted page table, what is stored and what is its main advantage?

    An inverted page table has one entry per physical frame, storing the (process-id, page-number) pair occupying that frame. Its advantage is that table size depends on physical memory, not on each process's virtual address space, saving memory.

  23. What are the three common methods of allocating disk blocks to files?

    Contiguous allocation (blocks are consecutive), Linked allocation (each block points to the next), and Indexed allocation (an index block holds pointers to all of the file's blocks).

  24. What are the advantages and disadvantages of contiguous file allocation?

    Advantages: simple, supports fast sequential and direct (random) access with minimal seeking. Disadvantages: suffers external fragmentation and difficulty in growing files / finding space for new files.

  25. What is the main disadvantage of linked file allocation?

    Linked allocation supports only efficient sequential access; direct access is slow because reaching block $i$ requires following $i$ pointers. It also wastes space for pointers and is vulnerable if a pointer is corrupted.

  26. What is an i-node (index node) in a Unix file system, and what does it contain?

    An i-node is a data structure storing a file's metadata: permissions, owner, size, timestamps, link count, and pointers to the file's data blocks (direct, single, double, and triple indirect pointers). It does not store the file name.

  27. In a Unix-style inode with direct and indirect block pointers, how is large-file addressing achieved?

    The inode holds some direct block pointers plus single, double, and triple indirect pointers. Each indirection level points to a block of pointers, allowing the maximum file size to scale roughly as (direct $+ k + k^2 + k^3$) blocks, where $k$ is the number of pointers per block.

  28. What is the difference between a hard link and a symbolic (soft) link?

    A hard link is another directory entry pointing to the same inode (same file, shares the inode and increments link count). A symbolic link is a separate file containing the pathname of the target; it can cross file systems but breaks if the target is deleted.

  29. How does a File Allocation Table (FAT) file system track file blocks?

    FAT keeps a table at the start of the volume with one entry per disk block. Each entry holds the index of the next block in the file (forming a chain), with special markers for end-of-file and free blocks, improving random access over plain linked allocation.

  30. What are the two main methods of free-space management on disk?

    Bit vector (bitmap): one bit per block indicating free/allocated, simple and allows finding contiguous runs but needs the whole map. Linked list (free list): free blocks are chained together; space-efficient but slow to traverse for contiguous space.

  31. Compute the maximum file size for a Unix inode with 10 direct, 1 single, 1 double, and 1 triple indirect pointer, with block size 1 KB and 4-byte block pointers.

    Pointers per block $k = 1024/4 = 256$. Max size $= (10 + 256 + 256^{2} + 256^{3})$ blocks $\times 1\text{ KB} = (10 + 256 + 65536 + 16777216)\,\text{KB} \approx 16\,\text{GB}$.

GATE CS & IT Engineering Operating System FAQ

What is in the GATE CS & IT Engineering Operating System syllabus?

GATE CS & IT Engineering Operating System is split into 8 chapters: System calls, Processes and Threads, Inter-process Communication, Concurrency and Synchronization, Deadlock, CPU and I/O Scheduling, Memory Management and Virtual Memory and File Systems. Together they contain 5 topics.

How many chapters are in GATE CS & IT Engineering Operating System?

8 chapters, containing 5 topics. The largest chapter is CPU and I/O Scheduling, with 2 topics.

Are there flashcards for GATE CS & IT Engineering Operating System?

Yes — a 51-card Operating System deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.