154 Operating Systems (Computer Science) questions asked in DSSSB TGT / PGT previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.
Consider the following statements about deadlock:
A. Existence of a cycle in resource-allocation graph indicates deadlock.
B. Existence of a cycle in wait-for graph indicates deadlock.
C. Mutual-exclusion, hold and wait, no preemption and circular wait conditions, if occur simultaneously, may lead to deadlock.
Mark the correct option :
AOnly (b) is correct
BOnly (c) is correct
COnly (a) and (c) are correct
DOnly (b) and (c) are correct
Show answerHide answer
Correct answer: (D) Only (b) and (c) are correct
Explanation
Corrected: the book's key says (c). A cycle in a resource-allocation graph does not always mean deadlock (with multiple instances), so A is false; B and C are correct.
Semaphores are used to solve the problem of ______.
AMutual exclusion
BRace condition
CProcess synchronization
DThe belady problem
Show answerHide answer
Correct answer: (C) Process synchronization
Explanation
Semaphores are a synchronization tool. They control how concurrent processes access shared resources, which solves process synchronization problems, including mutual exclusion.
Given the list of tasks in Col-A and list of data structure in Col-B. Identify the best match.
Col-A | Col-B
A. Recursion | (i) Binary tree
B. Scheduling | (ii) Stack
C. Sorting | (iii) Queue
AA-(i), B-(iii), C-(ii)
BA-(ii), B-(i), C-(iii)
CA-(iii), B-(ii), C-(i)
DA-(ii), B-(iii), C-(i)
Show answerHide answer
Correct answer: (D) A-(ii), B-(iii), C-(i)
Explanation
Recursion uses a stack of activation records, scheduling uses a queue (first come, first served), and sorting can use a binary tree (as in a BST or heap).
Which of the following applications may use a stack?
(A) Parenthesis balancing program
(B) Process scheduling in operating system
(C) Conversion of infix arithmetic expression to postfix form
A(A) and (B)
B(B) and (C)
C(A) and (C)
D(A), (B) and (C)
Show answerHide answer
Correct answer: (C) (A) and (C)
Explanation
Stacks are used for parenthesis balancing and infix-to-postfix conversion, so (A) and (C) are correct. Process scheduling uses queues, not stacks.
A thread is called a lightweight process. Threads of the same process share its code, data and files, so creating and switching between them costs little.
The diagram given below represents
Diagram: Processes enter a 'ready queue' which feeds the 'CPU'; an arrow leaves the CPU (exit). From the CPU, four paths lead back to the ready queue:
1. I/O request → I/O queue → I/O → back to ready queue
2. time slice expired → back to ready queue
3. fork a child → child executes → back to ready queue
4. wait for an interrupt → interrupt occurs → back to ready queue
AProcess creation
BProcess state
CQueuing diagram
DCommunication model
Show answerHide answer
Correct answer: (C) Queuing diagram
Explanation
The diagram shows the ready queue, the I/O queues and the events that move a process between them. This is the queueing diagram of process scheduling.
If a child is suffering from dyslexia, the teacher should adopt the following remedial strategy.
Ahelping them to develop their listening skills by tracking the words provided from the audio book / recorded study material / materials
BContinuing the learning process without any modifications
CProviding counting materials such as counters, rulers, etc
DDoing physical exercises showing the directions like left and right
Show answerHide answer
Correct answer: (A) helping them to develop their listening skills by tracking the words provided from the audio book / recorded study material / materials
Explanation
Children with dyslexia struggle with reading text. Audio books and recorded material help them learn by listening while they follow the words.
If the time quantum size is 2 units of an there is only one job of 14 time unit in a ready queue, the round-robin scheduling algorithm will cause ______ context switches.
A8
B5
C6
D7
Show answerHide answer
Correct answer: (C) 6
Explanation
A 14-unit job with a 2-unit quantum runs in 7 slices. A switch is counted between slices, giving 7 − 1 = 6 context switches.
The data blocks of a very large file in UNIX file system are allocated using
Acontiguous allocation
Blinked allocation
Cindexed allocation
Dan extension of indexed allocation
Show answerHide answer
Correct answer: (D) an extension of indexed allocation
Explanation
UNIX inodes use an extended indexed scheme: 12 direct block pointers plus single, double and triple indirect blocks. This lets very large files be addressed.
Consider the memory reference string given below, for a memory with 3 frames per process.
7, 0, 1, 2, 0, 3, 0, 4, 2, 3
The number of page faults for FIFO page replacement policy are ______.
ATen
BSeven
CNine
DEight
Show answerHide answer
Correct answer: (C) Nine
Explanation
With FIFO and 3 frames: 7, 0, 1, 2 are faults (4 so far), 0 is a hit, then 3, 0, 4, 2, 3 are all faults. That gives 9 page faults.
Consider three processes P₁, P₂, P₃, requiring 24, 3, 3 units of CPU time respectively. For time quantum of 4 units and Round - Robin scheduling policy, the average waiting time is ______.
A5.66 units
B17 units
C10 units
D15.66 units
Show answerHide answer
Correct answer: (A) 5.66 units
Explanation
With a quantum of 4: P1 runs 0–4, P2 runs 4–7, P3 runs 7–10, then P1 runs 10–30. Waiting times are P1 = 6, P2 = 4, P3 = 7. The average is 17/3 ≈ 5.66 units.
Which of the following statements about disk scheduling algorithms is correct ?
AThe disk arm behaves like an elevator in SCAN algorithm
BFCFS provides fastest service to the disk requests
CSSTF algorithm is an optimal algorithm
DSCAN algorithm provides more uniform wait time compared to C - SCAN algorithm
Show answerHide answer
Correct answer: (A) The disk arm behaves like an elevator in SCAN algorithm
Explanation
In SCAN, the disk arm moves to one end, then reverses, serving requests along the way, like an elevator. C-SCAN, not SCAN, gives more uniform waiting time.
ACounting semaphore can be used to control access to finite number of instances of a resource
BReader writers problem typically arises when several concurrent processes share the data base
CBanker's algorithm prevents dead lock
DA computer system is in a safe state only if there exists a safe sequence
Show answerHide answer
Correct answer: (C) Banker's algorithm prevents dead lock
Explanation
The banker's algorithm avoids deadlock (by checking for a safe state); it does not prevent it. Prevention means removing one of the four necessary conditions.
Consider a set of n tasks with known runtimes r1, r2 ........ rn, to be run on a uniprocessor machine, Which of the following processor scheduling algorithm will result in the maximum throughput.
APriority scheduling
BRound-robin
CFCFS
DShortest job first
Show answerHide answer
Correct answer: (D) Shortest job first
Explanation
Shortest Job First runs the shortest tasks first, so the average waiting time is minimised and the most jobs are completed per unit time.
The kernal keeps track of the state of each executing program by using a data structure called ______.
AProcess control block
BUser control block
CFile control block
DMemory control block
Show answerHide answer
Correct answer: (A) Process control block
Explanation
The OS stores each process's state, program counter, registers, scheduling and memory information in its Process Control Block (PCB), which it uses to save and restore the process during context switches.
AA process of re-arranging a given set of objects in a specific order.
BTo facilitate the later search for members of the sorted set.
CIs a relevant and essential activity, particularly in data processing.
DAll of these
Show answerHide answer
Correct answer: (A) A process of re-arranging a given set of objects in a specific order.
Explanation
Sorting is defined as re-arranging a given set of objects in a specific order (Wirth's definition). The other options describe why sorting is useful, not what sorting is.
Which of the following techniques allows execution of programs larger than the size of physical memory ?
AThrashing
BDMA
CBuffering
DDemand paging
Show answerHide answer
Correct answer: (D) Demand paging
Explanation
Demand paging (virtual memory) loads pages only when they are needed, so a program larger than physical memory can still run. Thrashing is a performance problem, not a technique.
An operating system contains 3 user processes each requiring 2 units of resource R. The minimum number of units of R such that no deadlock will ever occur is :
A5
B2
C3
D4
Show answerHide answer
Correct answer: (D) 4
Explanation
With n processes each needing k units, n(k−1) + 1 units guarantee no deadlock: 3 × (2−1) + 1 = 4.
Correct answer: (B) Number of processes completed per unit time
Explanation
Throughput is the number of processes completed per unit time. Turnaround time is the time to complete one process, and response time is the time to first response.
Which one of these is not a condition for Resource Deadlock?
ANon-sharable resources
BHold-and-wait
CPreemption
DCircular waits
Show answerHide answer
Correct answer: (C) Preemption
Explanation
The four Coffman conditions are mutual exclusion (non-sharable resources), hold and wait, NO preemption and circular wait. Preemption itself prevents deadlock, so it is not a condition.
Match the following.
A. Disk scheduling — i. Shortest Job First
B. CPU scheduling — ii. Banker's Algorithm
C. Page replacement — iii. Shortest Seek Time
D. Deadlock — iv. Least Recently Used
AA-iii, B-i, C-iv, D-ii
BA-i, B-iv, C-ii, D-iii
CA-iii, B-iv, C-i, D-ii
DA-iv, B-i, C-ii, D-iii
Show answerHide answer
Correct answer: (A) A-iii, B-i, C-iv, D-ii
Explanation
Shortest Seek Time First is disk scheduling, Shortest Job First is CPU scheduling, Least Recently Used is page replacement, and the Banker's algorithm is deadlock avoidance.
Which of the following statement is true about semaphore?
I. It can be implemented using software
II. It can be implemented using hardware
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
Semaphores can be implemented in software (e.g., with OS/kernel code or algorithms like Peterson's) and with hardware support such as test-and-set or atomic instructions.
Consider a main memory with 3 page frames in the following sequence of page reference 3, 4, 2, 3, 9, 1, 6, 3, 4, 9. What is the number of page fault using FIFO page replacement algorithm?
A9
B10
C8
D7
Show answerHide answer
Correct answer: (A) 9
Explanation
FIFO with 3 frames: faults on 3, 4, 2; 3 hits; then faults on 9 (out 3), 1 (out 4), 6 (out 2), 3 (out 9), 4 (out 1), 9 (out 6). Total = 9 faults.
Which one of the following is not a condition for process state transition from running state to wait state?
AIf a process request an Input/Output operation
BIf a higher priority process arrived
CIf a lower priority process arrived
DIf a process waits for some action performed by another process
Show answerHide answer
Correct answer: (C) If a lower priority process arrived
Explanation
A process goes from running to waiting only when it waits for I/O or for an event. A lower-priority arrival never affects the running process (a higher-priority arrival may preempt it to ready).
Match the following window of visual basic with their function.
A. Immediate window — i. It Display the properties for the current object
B. Properties window — ii. It design the form
C. Project explorer windows — iii. It list the forms and modules for the current projects
D. Design window — iv. It give current values of variables
AA-iv, B-i, C-iii, D-ii
BA-ii, B-i, C-iii, D-iv
CA-i, B-iii, C-ii, D-iv
DA-iv, B-iii, C-ii, D-i
Show answerHide answer
Correct answer: (A) A-iv, B-i, C-iii, D-ii
Explanation
The Immediate window shows/evaluates current variable values, the Properties window shows the selected object's properties, Project Explorer lists forms and modules, and the Design window is where the form is designed.
ACustomer relationship management includes the methodologies, technology and capabilities that help an enterprise to manage customer relationships
BCustomer relationship management is a corporate level strategy which focuses on creating new customers
CCustomer relationship management is the process of planning, implementation and controlling the operations of the supply chain
DCustomer relationship management is the process of daily production and distribution
Show answerHide answer
Correct answer: (A) Customer relationship management includes the methodologies, technology and capabilities that help an enterprise to manage customer relationships
Explanation
CRM covers the methods, technology and capabilities a business uses to manage and analyse its interactions with customers.
Which of the following can help a teacher to make teaching-learning process participatory in social science?
I. By arranging debate, discussions on emerging social issues for example: dowry, population growth etc.
II. By teaching students that how to cooperate with each other.
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
Debates and discussions on social issues, and teaching students to cooperate, both make social science learning participatory.
Q43DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
The memory resident components of an operating system are commonly known as the ________ of the operating system.
ABlocks
BKernel
CPartition
DSegments
Show answerHide answer
Correct answer: (B) Kernel
Explanation
The kernel is the core of the OS. It stays resident in main memory and manages the CPU, memory and devices. Other OS parts can be loaded only when needed.
Q44DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
Process of recovering the design and the requirement specification of a product an analysis of its code is called as
ASoftware analysis
BSoftware engineering
CSoftware reverse engineering
Dsoftware return engineering
Show answerHide answer
Correct answer: (C) Software reverse engineering
Explanation
Reverse engineering analyses existing code to recover its design and requirements specification. It is often used when maintaining legacy software.
Q45DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
Which of the following are monolithic kernel Systems?
I. Linux
II. Windows
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
Linux is a classic monolithic kernel. The Windows NT kernel also runs most OS services in kernel mode and is usually described as hybrid, but the exam treats both as monolithic.
Q46DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
Which of the following statement(s) is/are true regarding processes and threads in operating system?
I. Threads encapsulates concurrency within a process.
II. Process encapsulates protection within the system.
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
Threads give concurrency inside a single process. A process gives protection: each process has its own address space and resources. Both statements are true.
Q47DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
Which of the following statement(s) is/are true regarding threads in operating system?
I. The threads in a process are visible to other processes.
II. A thread is strictly private resource of a process.
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (B) Only II
Explanation
A thread belongs to its process and shares only that process's resources, so it is private to the process. Threads of one process are not visible to other processes, so statement I is false.
Q48DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
Which of the following is not a state of a process in operating system?
AWaiting
BExcite
CRunning
DReady
Show answerHide answer
Correct answer: (B) Excite
Explanation
The standard process states are new, ready, running, waiting (blocked) and terminated. "Excite" is not a process state.
Q49DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
Which of the following is not a CPU scheduling Algorithm?
AFCFS
BC-SCAN
CSJF
DSJN
Show answerHide answer
Correct answer: (B) C-SCAN
Explanation
C-SCAN is a disk scheduling algorithm. FCFS, SJF and SJN (shortest job next) are CPU scheduling algorithms.
Q50DSSSB TGT Computer Science (Technical), 8 Aug 2021, Shift 2
Which of the following statement(s) is/are true about CPU scheduling algorithm?
I. Shortest remaining time first scheduling may cause starvation.
II. Round Robin is better than First Come First Serve in terms of response time.
AOnly I
BOnly II
CBoth I and II
DNeither I nor II
Show answerHide answer
Correct answer: (C) Both I and II
Explanation
SRTF keeps choosing short jobs, so long jobs can starve. Round Robin gives every process a time slice quickly, so its response time is better than FCFS. Both statements are true.
How to use these DSSSB TGT / PGT Computer Science questions
Every question here was asked in a real DSSSB TGT / PGT paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full DSSSB TGT / PGT papers as timed tests to check your speed under exam conditions.