Loading…
Loading…
Loading…
48 solved previous-year questions (2024, 2023, 2022, 2021, 2018) for Rajasthan Basic Computer Instructor (Rajasthan Staff Selection Board (RSMSSB)). Solve directly below or challenge friends on WhatsApp.
Select the correct option.
In an RDBMS table, which statement accurately distinguishes a UNIQUE constraint from a PRIMARY KEY constraint?
Correct Answer: (B) A UNIQUE constraint permits NULL values, whereas a PRIMARY KEY disallows NULL values
Entity Integrity vs. Uniqueness
Both PRIMARY KEY and UNIQUE enforce uniqueness across non-NULL values in a column or column set. However, by entity integrity rules, a PRIMARY KEY cannot contain NULLs and a table has at most one primary key, whereas multiple UNIQUE constraints can exist and NULL values are allowed.
Asked in RSMSSB Basic Computer Instructor (18 Jun 2022, Paper 2)
Eliminating Incorrect Options
The other three statements invert the SQL rules regarding NULL permissions, constraint multiplicity per table, and duplicate prevention.
Select the correct option.
Which database object is automatically executed by the DBMS in response to a specified DML event (such as INSERT, UPDATE, or DELETE) on a table?
Correct Answer: (C) Trigger
Event-Condition-Action Model of Triggers
A Trigger is a stored procedural block bound to a table that fires automatically (BEFORE, AFTER, or INSTEAD OF) whenever a designated DML event (INSERT, UPDATE, or DELETE) occurs, enabling auditing or custom business rules.
Asked in RSMSSB Basic Computer Instructor (18 Jun 2022, Paper 2)
Distinguishing Alternatives
A Cursor iterates row-by-row over a result set inside procedural SQL; a View is a saved query; an Assertion is a global declarative constraint not tied to procedural event execution.
Select the correct option.
A relational table is said to be in First Normal Form (1NF) if and only if:
Correct Answer: (B) Every attribute domain contains only atomic (indivisible) values
First Normal Form (1NF)
1NF enforces the basic structural requirement of the relational model: each cell of a table must hold a single atomic value, disallowing repeating groups, arrays, or nested relations.
Asked in RSMSSB Senior Computer Instructor (19 Jun 2022, Paper 2)
Mapping Higher Normal Forms
Option A defines 2NF; Option C defines 3NF; Option D defines BCNF.
Select the correct option.
Which CPU scheduling algorithm suffers from the 'Convoy Effect', where short processes experience long delays waiting behind a single long CPU-bound process?
Correct Answer: (A) First-Come, First-Served (FCFS)
Convoy Effect in FCFS
Because FCFS is strictly non-preemptive and executes processes in arrival order regardless of burst length, a single long CPU-bound process arriving ahead of many short I/O-bound processes forces all short processes to wait, lowering both CPU and I/O device utilization.
Asked in RSMSSB Basic Computer Instructor (18 Jun 2022, Paper 2)
How Other Schedulers Avoid It
SJF/SRTF prioritize short bursts to minimize average waiting time, while Round Robin uses time slicing so no process monopolizes the CPU.
Select the correct option.
In a paging memory management scheme, logical memory is divided into fixed-size blocks called ________, and physical memory is divided into fixed-size blocks of the same size called ________.
Correct Answer: (B) Pages; Frames
Pages vs. Frames
Paging eliminates external fragmentation by partitioning physical RAM into fixed-size frames and breaking each process's logical address space into equal-sized pages, mapped via a per-process page table.
Asked in RSMSSB Basic Computer Instructor (18 Jun 2022, Paper 2)
Eliminating Incorrect Options
Reversing the terms ('Frames; Pages') swaps physical and logical units; segments are variable-sized logical regions; sectors and tracks are physical disk geometry terms.
Select the correct option.
Which deadlock handling strategy dynamically evaluates every resource request by checking whether granting it leaves the system in a safe state with at least one safe execution sequence?
Correct Answer: (B) Deadlock Avoidance
Deadlock Avoidance
Deadlock avoidance (implemented by algorithms such as Banker's Algorithm) requires prior knowledge of each process's maximum resource claims and simulates every allocation request to confirm a safe sequence still exists before granting it.
Asked in RSMSSB Senior Computer Instructor (19 Jun 2022, Paper 2)
Distinguishing Other Strategies
Deadlock prevention statically rules out one of the four Coffman conditions; Ostrich ignores deadlocks; recovery terminates or preempts processes after deadlock has already occurred.
Select the correct option.
Which type of SQL JOIN returns all records from both the left and right tables, filling in NULL for columns from the side where no matching row exists?
Correct Answer: (D) FULL OUTER JOIN
Outer Join Semantics
FULL OUTER JOIN combines the results of both LEFT OUTER JOIN and RIGHT OUTER JOIN. It preserves every row from both input tables, matching pairs where the join predicate holds and padding non-matching columns with NULL.
Asked in DSSSB TGT Computer Science (2024 Official Paper)
Comparing Join Variants
INNER JOIN drops all non-matching rows; LEFT OUTER JOIN preserves only unmatched rows from the left table; RIGHT OUTER JOIN preserves only unmatched rows from the right table.
Select the correct option.
Among the ACID properties of database transactions, which property ensures that either all operations of a transaction execute completely or none of them take effect?
Correct Answer: (A) Atomicity
ACID Atomicity
Atomicity treats a transaction as an indivisible 'all-or-nothing' unit of work. If any failure occurs mid-transaction, the recovery manager uses undo logs to roll back all partial changes.
Asked in Bihar STET Paper 2 Computer Science (May 2024, Shift 1)
Comparing C, I, and D
Consistency preserves database integrity invariants before and after execution; Isolation hides intermediate uncommitted state from concurrent transactions; Durability guarantees committed updates survive system crashes.
Select the correct option.
In an Entity-Relationship (ER) diagram, how is a weak entity set represented, and how are its entities uniquely identified?
Correct Answer: (C) Double rectangle; by its partial key (discriminator) combined with the identifying owner's primary key
Weak Entity Representation
A weak entity set lacks sufficient attributes to form a primary key of its own. In Chen's ER notation, it is drawn as a double rectangle, linked via a double diamond (identifying relationship) to its strong owner entity set.
Asked in BPSC TRE 3.0 PGT Computer Science (Jul 2024)
Primary Key Formation
Its primary key is formed by combining the primary key of the identifying owner entity set with the weak entity's partial key (discriminator, underlined with a dashed line).
Select the correct option.
In a virtual memory system using demand paging, what happens when a running process accesses a logical page whose page-table entry is marked invalid (not resident in physical RAM)?
Correct Answer: (B) A page fault trap is raised to load the page from disk
Page Fault Handling
When the MMU finds the valid-invalid bit set to invalid for a valid virtual address, it triggers a page fault trap to the OS. The OS locates the missing page in secondary storage (swap/backing store), loads it into a free physical frame, updates the page table, and restarts the faulting instruction.
Asked in DSSSB TGT Computer Science (2024 Official Paper)
Eliminating Incorrect Options
A page fault is a normal recoverable trap in demand paging, not a kernel crash, CPU mode reset, or deadlock.
Select the correct option.
Which core component of an operating system resides permanently in memory during operation and directly controls hardware, CPU scheduling, and memory allocation?
Correct Answer: (B) Kernel
Role of the Kernel
The kernel is the privileged core of the operating system that mediates all access to CPU, RAM, and I/O devices through system calls and interrupt handlers.
Asked in Bihar STET Paper 2 Computer Science (May 2024, Shift 1)
Eliminating Incorrect Options
The shell is a user-space command interpreter; compilers and assemblers are language-translation tools.
Select the correct option.
Which disk file allocation method brings all pointers to a file's data blocks together into a single dedicated index block, supporting direct access without external fragmentation?
Correct Answer: (D) Indexed allocation
Indexed Allocation
In indexed allocation, each file has its own index block containing an array of disk-block addresses. The i-th entry directly points to the i-th block of the file, enabling fast random (direct) access while avoiding external fragmentation.
Asked in BPSC TRE 3.0 PGT Computer Science (Jul 2024)
Comparing Alternatives
Contiguous allocation suffers from external fragmentation and file-growth limits; linked allocation supports only sequential access efficiently because pointers are scattered across data blocks.
Select the correct option.
In Structured Query Language (SQL), which of the following commands is NOT a Data Definition Language (DDL) command?
Correct Answer: (D) UPDATE
SQL Sub-language Classification
DDL commands define or modify database schema structures and include CREATE, ALTER, DROP, and TRUNCATE. UPDATE modifies existing row values inside a table without changing the schema, so it belongs to Data Manipulation Language (DML).
Asked in Bihar STET Paper 2 Computer Science (Sep 2023, Shift 1)
Key Difference
DDL statements typically issue an implicit commit in most RDBMS engines, whereas DML statements (INSERT, UPDATE, DELETE) operate within transactions and can be rolled back.
Select the correct option.
A relation already in Second Normal Form (2NF) reaches Third Normal Form (3NF) when which type of dependency on candidate keys is removed?
Correct Answer: (C) Transitive functional dependency
3NF Condition
A relation R in 2NF is in 3NF if no non-prime attribute is transitively dependent on a candidate key—that is, for every non-trivial functional dependency X -> A, either X is a superkey or A is a prime attribute.
Asked in Bihar STET Paper 2 Computer Science (Sep 2023, Shift 2)
Mapping Other Dependencies
Partial functional dependencies are eliminated in 2NF; multi-valued dependencies are eliminated in 4NF; join dependencies are eliminated in 5NF.
Select the correct option.
In the logical query processing order of an SQL SELECT statement, which clause is evaluated first?
Correct Answer: (C) FROM
SQL Logical Execution Order
Although SELECT is written first syntactically, the SQL engine logically processes clauses in the order: FROM (and JOINs) -> WHERE -> GROUP BY -> HAVING -> SELECT -> DISTINCT -> ORDER BY -> LIMIT.
Asked in KVS PGT Computer Science (Feb 2023 Official Paper)
Why FROM Comes First
The database must first identify and assemble the base relation(s) in the FROM clause before row filtering (WHERE), grouping (GROUP BY), or column projection (SELECT) can occur.
Select the correct option.
In a relational database, if relation A has 5 tuples and relation B has 4 tuples, what is the cardinality of the Cartesian product (CROSS JOIN) A x B?
Correct Answer: (C) 20
Cardinality of Cartesian Product
The Cartesian product A x B pairs every tuple of relation A with every tuple of relation B. Therefore, |A x B| = |A| * |B| = 5 * 4 = 20 tuples.
Asked in KVS PGT Computer Science (Feb 2023 Official Paper)
Degree vs. Cardinality
Note that the degree (number of attributes/columns) of A x B is the sum of degrees (deg(A) + deg(B)), whereas the cardinality (number of rows) is the product (5 * 4 = 20), not the sum (9).
Select the correct option.
In SQL, which object acts as a virtual table whose result set is derived dynamically from a stored query over one or more base tables?
Correct Answer: (B) View
SQL Views
A View (created via CREATE VIEW) is a named virtual relation defined by a SELECT query. A standard view does not physically store rows; instead, its defining query runs against the underlying base tables whenever the view is queried.
Asked in HTET Level 3 PGT Computer Science (Dec 2023)
Eliminating Other Database Objects
An Index is a physical access structure (like a B+ tree) for faster lookup; a Trigger is an event-driven stored procedure; a Sequence is a numeric counter generator.
Select the correct option.
Which SQL command is used to modify existing data values in records of a database table?
Correct Answer: (D) UPDATE
DML UPDATE Statement
The UPDATE statement (e.g., UPDATE Emp SET Salary = Salary * 1.1 WHERE Dept = 'IT';) modifies column values of existing tuples that match the WHERE condition.
Asked in BPSC TRE 2.0 PGT Computer Science (15 Dec 2023)
Eliminating Incorrect Options
INSERT adds new rows; ALTER changes table schema (adding/dropping columns or constraints); CREATE defines a new table.
Select the correct option.
A relation R initially has degree 4 and cardinality 10. If 1 new attribute (column) is added and 3 new tuples (rows) are inserted into R, what are the resulting degree and cardinality?
Correct Answer: (A) Degree 5, Cardinality 13
Degree and Cardinality Definitions
In the relational model, 'degree' is the number of attributes (columns) in the relation schema, and 'cardinality' is the number of tuples (rows) in the relation instance.
Asked in BPSC TRE 1.0 PGT Computer Science (26 Aug 2023)
Calculation
Adding 1 column increases degree from 4 to 4 + 1 = 5. Inserting 3 rows increases cardinality from 10 to 10 + 3 = 13.
Select the correct option.
Moving an entire process from main memory to secondary disk storage (and later back into memory) to free space for other processes is known as:
Correct Answer: (B) Swapping
Swapping in Memory Management
Swapping is performed by the medium-term scheduler to temporarily roll out an inactive or lower-priority process from RAM to backing store (swap space) and swap it back in later when memory becomes available.
Asked in Bihar STET Paper 2 Computer Science (Sep 2023, Shift 1)
Eliminating Incorrect Options
Spooling buffers I/O jobs (such as print jobs) on disk; Thrashing is excessive page-swapping overhead in virtual memory; Deadlock is permanent resource blocking.
Select the correct option.
In a virtual memory system, when the total working set of active processes exceeds available physical frames and the system spends more time swapping pages than executing instructions, the condition is called:
Correct Answer: (D) Thrashing
Thrashing Mechanism
When processes lack enough frames to hold their active working sets, page faults spike continuously. The CPU scheduler sees falling CPU utilization and may admit even more processes, worsening page-fault thrashing until throughput collapses.
Asked in Bihar STET Paper 2 Computer Science (Sep 2023, Shift 2)
Remediation and Distractors
Thrashing is mitigated using the working-set model or page-fault frequency control. External fragmentation and compaction apply to contiguous memory allocation, while spooling manages slow I/O devices.
Select the correct option.
An operating system contains 3 user processes, each requiring a maximum of 2 units of resource type R. What is the minimum number of units of resource R required so that deadlock can never occur?
Correct Answer: (C) 4
Worst-Case Non-Deadlock Formula
In the worst case just before deadlock, each of the n processes holds (max_need - 1) units and waits for 1 more unit. Adding just 1 extra resource unit guarantees at least one process can complete and release its resources.
Asked in KVS PGT Computer Science (Feb 2023 Official Paper)
Step-by-Step Calculation
Minimum units = n * (k - 1) + 1 = 3 * (2 - 1) + 1 = 3 + 1 = 4 units. With 3 units, all three processes could hold 1 unit each and deadlock.
Select the correct option.
Which of the following is NOT a core function of a standard operating system kernel?
Correct Answer: (D) Virus protection and signature scanning
Core OS Responsibilities
An operating system's primary responsibilities are process/CPU management, main memory management, file system management, I/O device control, and basic access protection.
Asked in HTET Level 3 PGT Computer Science (Dec 2023)
Why Virus Protection is Excluded
Virus protection and malware signature scanning are performed by specialized utility/security application software rather than core kernel resource management.
Select the correct option.
Banker's Algorithm in an operating system is used for:
Correct Answer: (B) Deadlock avoidance
Banker's Algorithm
Proposed by Edsger Dijkstra, Banker's Algorithm tests resource-allocation requests against Available, Max, Allocation, and Need matrices to verify whether a safe sequence exists, making it the classic deadlock avoidance algorithm.
Asked in BPSC TRE 2.0 PGT Computer Science (15 Dec 2023)
Eliminating Incorrect Options
Deadlock prevention restricts resource request rules statically; CPU burst prediction uses exponential averaging in SJF; thrashing prevention uses working-set monitoring.
Select the correct option.
A system uses a 32-bit logical address space and a page size of 4 KB (4096 bytes). How many bits are used for the page number and the page offset respectively?
Correct Answer: (A) 20 bits and 12 bits
Page Offset Bits
A page size of 4 KB = 4 * 1024 = 4096 = 2^12 bytes. Therefore, the page offset requires log2(2^12) = 12 bits.
Asked in BPSC TRE 1.0 PGT Computer Science (26 Aug 2023)
Page Number Bits
Subtracting the offset bits from the 32-bit logical address gives 32 - 12 = 20 bits for the page number (supporting up to 2^20 pages).
Select the correct option.
Which SQL statement is used to remove an existing primary key constraint from a table named Student in MySQL?
Correct Answer: (A) ALTER TABLE Student DROP PRIMARY KEY;
Dropping a Primary Key in MySQL
Because a table can have at most one primary key, MySQL allows dropping it directly without specifying a constraint name using the DDL statement: ALTER TABLE Student DROP PRIMARY KEY;.
Asked in HTET Level 3 PGT Computer Science (Dec 2022)
Eliminating Invalid Syntax
DELETE PRIMARY KEY, REMOVE PRIMARY KEY, and DROP PRIMARY KEY ON TABLE are not valid SQL DDL statements.
Select the correct option.
The phenomenon in which increasing the number of allocated page frames can sometimes increase the number of page faults is called ________, and it is exhibited by the ________ page replacement policy.
Correct Answer: (B) Belady's Anomaly; FIFO
Belady's Anomaly in FIFO
Normally, allocating more physical frames reduces page faults. However, First-In, First-Out (FIFO) is not a stack algorithm (it violates the inclusion property), so on certain reference strings (like 1,2,3,4,1,2,5,1,2,3,4,5) increasing frames from 3 to 4 increases page faults from 9 to 10—known as Belady's Anomaly.
Asked in HTET Level 3 PGT Computer Science (Dec 2022)
Stack Algorithms Never Exhibit Belady's Anomaly
LRU and Optimal are stack algorithms satisfying the inclusion property, so they never suffer from Belady's Anomaly.
Select the correct option.
In an Entity-Relationship (ER) model, a collection of entities of the same type that share the same properties or attributes is called:
Correct Answer: (A) Entity set
ER Model Terminology
An entity is a distinguishable real-world object (e.g., a specific student), while an entity type defines the schema (attributes) shared by similar entities. The collection of all entities of a particular entity type present in the database at any point in time is called an entity set.
Asked in DSSSB TGT Computer Science (1 Aug 2021, Shift 1)
Eliminating Incorrect Options
Value set (or domain) specifies the permitted set of values for an attribute; tuple domain applies to relational rows rather than ER collections; attribute key is an identifier attribute.
Select the correct option.
Which SQL query correctly retrieves the lowest value from the Price column of the Products table?
Correct Answer: (B) SELECT MIN(Price) FROM Products;
SQL Aggregate Functions
Standard SQL defines five core aggregate functions: MIN(), MAX(), SUM(), AVG(), and COUNT(). MIN(Price) scans all non-NULL values in the Price column and returns the minimum scalar value.
Asked in DSSSB TGT Computer Science (7 Aug 2021, Shift 2)
Eliminating Incorrect Options
LOW(), BOTTOM(), and SMALLEST() are not standard ANSI SQL aggregate functions and will raise a syntax or undefined function error.
Select the correct option.
Which SQL statement removes an existing named integrity constraint (such as a foreign key named fk_dept) from a table named Employee?
Correct Answer: (C) ALTER TABLE Employee DROP CONSTRAINT fk_dept;
DDL Constraint Modification
Integrity constraints are part of a table's schema definition and are modified using the ALTER TABLE DDL command. The ANSI SQL syntax to remove a named constraint is ALTER TABLE <table_name> DROP CONSTRAINT <constraint_name>;.
Asked in DSSSB PGT Computer Science (11 Jul 2021, Shift 1)
Eliminating Incorrect Options
DELETE is a DML command that acts on rows rather than schema constraints, while MODIFY TABLE ... REMOVE and standalone DROP CONSTRAINT ... ON are invalid SQL syntax.
Select the correct option.
Which normal form requires a relation to be in 1NF and ensures that no non-prime attribute is partially dependent on any candidate key?
Correct Answer: (A) Second Normal Form (2NF)
Full Functional Dependency and 2NF
A relation is in Second Normal Form (2NF) if it is in 1NF and every non-prime attribute (an attribute not part of any candidate key) is fully functionally dependent on every candidate key, eliminating partial dependencies.
Asked in DSSSB PGT Computer Science (11 Jul 2021, Shift 2)
Distinguishing Higher Normal Forms
3NF further removes transitive dependencies of non-prime attributes on candidate keys; BCNF requires every determinant of a non-trivial FD to be a superkey; 4NF addresses multi-valued dependencies.
Select the correct option.
Consider the following concurrency control protocols: (I) Strict Two-Phase Locking (2PL) and (II) Basic Timestamp Ordering. Which of these ensures both conflict serializability and freedom from deadlocks?
Correct Answer: (B) II only
Analyzing Protocol Guarantees
Basic Timestamp Ordering orders transactions strictly by their assigned timestamps (TS). Whenever a transaction attempts an out-of-order read or write, it is immediately aborted and rolled back rather than waiting, which guarantees conflict serializability and makes deadlocks impossible.
Asked in DSSSB PGT Computer Science (11 Jul 2021, Shift 2)
Why Strict 2PL Fails Deadlock Freedom
Strict 2PL guarantees conflict serializability and recoverability (cascadeless schedules), but because transactions wait to acquire locks held by other transactions, cyclic wait-for chains (deadlocks) can occur.
Select the correct option.
In an SQL query containing GROUP BY Dept, which clause must be used to filter only those departments whose AVG(Salary) exceeds 50000?
Correct Answer: (D) HAVING AVG(Salary) > 50000
WHERE vs. HAVING
The WHERE clause filters individual rows before grouping takes place, so it cannot reference aggregate functions like AVG(Salary). The HAVING clause runs after GROUP BY and filters entire groups based on aggregate conditions.
Asked in HTET Level 3 PGT Computer Science (Dec 2021)
Eliminating Incorrect Options
WHERE with an aggregate raises an invalid use of group function error; FILTER is not a standalone clause for group filtering in standard SELECT syntax; ORDER BY only sorts output rows.
Select the correct option.
During a context switch in an operating system, where does the kernel save the execution state (registers, program counter, and scheduling info) of the outgoing process?
Correct Answer: (A) Process Control Block (PCB)
Process Control Block (PCB)
The PCB is the kernel data structure representing each process. When a context switch occurs, the OS saves the CPU registers, program counter, process state, and memory pointers of the paused process into its PCB and reloads the state of the next process from its PCB.
Asked in DSSSB TGT Computer Science (1 Aug 2021, Shift 1)
Eliminating Incorrect Options
The TLB caches virtual-to-physical page translations; FAT tracks disk clusters for files; IVT stores addresses of interrupt service routines.
Select the correct option.
In operating system process synchronization, which pair of standard indivisible (atomic) operations is defined to access a semaphore S?
Correct Answer: (B) wait() and signal()
Semaphore Atomic Operations
Introduced by Edsger Dijkstra, a semaphore S is an integer synchronization variable modified only through two atomic operations: wait() (originally P, decrements S and blocks if S <= 0) and signal() (originally V, increments S and wakes a waiting process).
Asked in DSSSB TGT Computer Science (7 Aug 2021, Shift 2)
Eliminating Incorrect Options
push/pop operate on stacks; fork/exec create and replace processes in Unix; open/close manage file descriptors.
Select the correct option.
Which of the four necessary conditions for deadlock requires that at least one resource be held in a non-sharable mode so that only one process can use it at a time?
Correct Answer: (C) Mutual Exclusion
Mutual Exclusion Condition
Mutual exclusion states that at least one resource must be non-sharable: if another process requests that resource, the requesting process must wait until the resource is released.
Asked in DSSSB PGT Computer Science (11 Jul 2021, Shift 1)
Distinguishing the Other Three Coffman Conditions
Hold and Wait means holding >=1 resource while waiting for more; No Preemption means resources cannot be forcibly taken; Circular Wait means a closed wait cycle exists among processes.
Select the correct option.
In a paging scheme, if the logical address space is 2^16 bytes and the page size is 2^9 bytes, how many bits are required to represent the page offset?
Correct Answer: (C) 9 bits
Splitting a Logical Address
A logical address consists of a page number (p) and a page offset (d). The page offset must uniquely index every byte within one page.
Asked in DSSSB PGT Computer Science (11 Jul 2021, Shift 1)
Bit Calculation
Since the page size is 2^9 bytes, the offset requires log2(2^9) = 9 bits. The remaining 16 - 9 = 7 bits specify the page number.
Select the correct option.
Why is a thread referred to as a 'lightweight process' compared to a traditional process?
Correct Answer: (A) Threads share code, data, and OS resources with peer threads of the same process
Thread Resource Sharing
Threads within the same process share the code section, data section, heap, and open files/signals, while keeping only a small private context (thread ID, program counter, register set, and stack). Creating and switching threads therefore incurs far less overhead than heavyweight processes.
Asked in DSSSB PGT Computer Science (11 Jul 2021, Shift 2)
Eliminating Incorrect Options
Separate processes—not threads—have isolated address spaces; every thread must have its own PC and stack to execute independently; kernel-level threads are scheduled directly by the OS.
Select the correct option.
An operating system uses Shortest Remaining Time First (SRTF) scheduling. Consider four processes with (Arrival Time, Burst Time): P1(0, 20), P2(15, 25), P3(30, 10), and P4(45, 15). What is the total waiting time for process P2?
Correct Answer: (C) 15
Gantt Chart Timeline under SRTF
0-15: P1 runs (remaining 5). At t=15, P2 arrives (25 > 5), so P1 finishes at t=20. 20-30: P2 runs for 10 units (remaining 15). At t=30, P3 arrives (10 < 15) and preempts P2, running 30-40. 40-45: P2 runs for 5 units (remaining 10). At t=45, P4 arrives (15 > 10), so P2 finishes during 45-55.
Asked in HTET Level 3 PGT Computer Science (Dec 2021)
Waiting Time Calculation
Completion Time of P2 = 55; Arrival Time = 15 -> Turnaround Time = 55 - 15 = 40. Waiting Time = Turnaround Time - Burst Time = 40 - 25 = 15 (P2 waited 15..20 and 30..40).
Select the correct option.
A relation schema R is in Boyce-Codd Normal Form (BCNF) if and only if for every non-trivial functional dependency X -> Y that holds on R:
Correct Answer: (B) X is a superkey of R
BCNF Formal Definition
BCNF strengthens 3NF by removing the exception that allows Y to be a prime attribute when X is not a superkey. Formally, R is in BCNF iff every non-trivial FD X -> Y (where Y is not a subset of X) has X as a superkey of R.
Asked in KVS PGT Computer Science (23 Dec 2018 Official Paper)
Eliminating Incorrect Options
'Y is a prime attribute' is the relaxed 3NF allowance (which BCNF forbids if X is not a superkey); a BCNF relation can also have multiple overlapping candidate keys.
Select the correct option.
If transaction A holds a shared lock (S) on data item R, and transaction B also requests a shared lock on R, what will happen?
Correct Answer: (D) The shared lock request of B will be granted immediately
Lock Compatibility Matrix
Shared locks (S-locks) are acquired for read operations. Because concurrent reads do not conflict with each other, S-locks are mutually compatible, so the lock manager immediately grants B's shared lock request alongside A's.
Asked in UPPSC LT Grade Computer (29 Jul 2018 Official Paper)
When Blocking Occurs
Blocking only occurs if either transaction requests an Exclusive lock (X-lock) on R, because an X-lock conflicts with both S-locks and other X-locks.
Select the correct option.
In a relational database management system, SQL commands such as COMMIT, ROLLBACK, and SAVEPOINT belong to which category?
Correct Answer: (C) Transaction Control Language (TCL)
Transaction Control Language (TCL)
TCL commands manage the lifecycle and boundaries of database transactions: COMMIT makes changes permanent, ROLLBACK undoes uncommitted changes, and SAVEPOINT sets intermediate rollback markers.
Asked in UPPSC LT Grade Computer (29 Jul 2018 Official Paper)
Eliminating Other Categories
DDL manages schema objects (CREATE, ALTER, DROP); DML manipulates row data (SELECT, INSERT, UPDATE, DELETE); DCL manages permissions (GRANT, REVOKE).
Select the correct option.
In RDBMS design, different classes of relations are systematically created using which technique to prevent modification (insertion, deletion, and update) anomalies?
Correct Answer: (A) Normal forms (Normalization)
Purpose of Normal Forms
Normalization decomposes poorly structured relations into smaller, lossless, dependency-preserving relations conforming to normal forms (1NF, 2NF, 3NF, BCNF), which eliminates redundant storage and insertion/deletion/update anomalies.
Asked in UPPSC LT Grade Computer (29 Jul 2018 Official Paper)
Eliminating Incorrect Options
Denormalization intentionally reintroduces redundancy for read performance; static hashing is a physical file organization method rather than a logical schema anomaly-prevention technique.
Select the correct option.
In operating system file management, which pair of file operations directly manipulates the 'open-count' maintained for each entry in the system-wide open-file table?
Correct Answer: (B) open and close
System-Wide Open-File Table
The OS maintains an open-count per entry in the system-wide open-file table to track how many processes currently have that file open. Calling open() increments (or creates) the count, and calling close() decrements it—removing the entry only when open-count reaches zero.
Asked in KVS PGT Computer Science (23 Dec 2018 Official Paper)
Eliminating Incorrect Options
read, write, and seek advance or access file contents/offsets on an already-open file without changing how many processes hold it open.
Select the correct option.
In the bounded-buffer Producer-Consumer problem using semaphores (mutex = 1, empty = n, full = 0), which sequence of operations must the Consumer execute before removing an item from the buffer?
Correct Answer: (A) wait(full); wait(mutex);
Consumer Synchronization Order
The Consumer must first verify that at least one filled slot exists by calling wait(full), and only then acquire the critical section lock via wait(mutex) before removing the item and calling signal(mutex); signal(empty);.
Asked in KVS PGT Computer Science (23 Dec 2018 Official Paper)
Why Reversed Order Deadlocks
Executing wait(mutex) before wait(full) would cause the Consumer to hold the mutex lock while sleeping on an empty buffer, preventing the Producer from ever entering the critical section to produce an item (deadlock).
Select the correct option.
Which Linux/Unix shell command prints the full absolute path of the current working directory?
Correct Answer: (D) pwd
pwd Command
pwd stands for 'Print Working Directory'. Executing pwd displays the full path from the root directory (/) to the user's current directory in the filesystem.
Asked in UPPSC LT Grade Computer (29 Jul 2018 Official Paper)
Eliminating Other Commands
cd changes the working directory; ls and dir list directory contents rather than printing the current directory path alone.
Select the correct option.
Consider a virtual memory system with 3 initially empty page frames and the page reference string: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5. How many page faults occur under the FIFO page replacement algorithm?
Correct Answer: (C) 9
FIFO Frame Trace (3 Frames)
1->[1] (F1), 2->[1,2] (F2), 3->[1,2,3] (F3), 4->[2,3,4] (F4), 1->[3,4,1] (F5), 2->[4,1,2] (F6), 5->[1,2,5] (F7), 1->hit, 2->hit, 3->[2,5,3] (F8), 4->[5,3,4] (F9), 5->hit.
Asked in UPPSC LT Grade Computer (29 Jul 2018 Official Paper)
Result Summary
There are 9 page faults and 3 page hits (on the second 1, second 2, and final 5). Interestingly, with 4 frames on this same string, FIFO produces 10 faults (Belady's Anomaly).
Select the correct option.
Which of the following is NOT one of the four necessary conditions for a deadlock to occur?
Correct Answer: (C) Preemption
Coffman Conditions
The four necessary conditions for deadlock are Mutual Exclusion, Hold and Wait, No Preemption (resources cannot be forcibly taken from a holding process), and Circular Wait.
Asked in UPPSC LT Grade Computer (29 Jul 2018 Official Paper)
Why Preemption Prevents Deadlock
Preemption (forcibly reclaiming resources) actually breaks the 'No Preemption' condition and prevents deadlocks rather than causing them.
Yes. Remock provides bilingual English and हिंदी previous year questions for Rajasthan Basic Computer Instructor with instant answer checking and step-by-step solutions.
Rajasthan Basic Computer Instructor Paper 1 & Paper 2 has 200 questions in 240 minutes with −1/3 negative marking per wrong answer.
Yes, Remock has full-length, sectional, and previous-year-pattern mock tests for Rajasthan Basic Computer Instructor in the TCS iON exam console with unlimited reattempts.