Aspirant Academy

MCQ

Paper - II (vii) — Computer Organization and Operation System MCQ - Practice Questions with Answers

Solve 56 Paper - II (vii) — Computer Organization and Operation System questions for RAS/RPSC preparation.

Practice questions

Q1A direct-mapped cache has 64 lines, each line stores 32 bytes, and physical addresses are 24 bits. For a byte-addressable memory, how many bits are used for tag, line index, and block offset respectively?

A 13 tag bits, 6 index bits, 5 offset bits
B 14 tag bits, 5 index bits, 5 offset bits
C 12 tag bits, 6 index bits, 6 offset bits
D 12 tag bits, 7 index bits, 5 offset bits
Explanation

The block offset identifies a byte inside a 32-byte line, so it needs log2(32) = 5 bits. A direct-mapped cache with 64 possible lines needs log2(64) = 6 index bits. The physical address is 24 bits, so the remaining 24 - 5 - 6 = 13 bits form the tag used to test whether the indexed line is the requested block.

Q2An 8-bit ALU adds 0111 1011 and 0100 1110, treating the operands as two's-complement signed integers. Which flag interpretation is correct?

A Neither signed overflow nor unsigned carry occurs
B Unsigned carry occurs, but signed overflow does not occur
C Both signed overflow and unsigned carry occur
D Signed overflow occurs, but there is no carry out of the most significant bit
Explanation

The binary sum is 1100 1001, which is 201 if unsigned but -55 if interpreted as 8-bit two's complement. Since 123 and 78 are both positive signed operands, the negative signed result indicates overflow. Because 201 is below 256, no carry out of bit 7 is generated.

Q3A system has total resources (A, B, C) = (10, 5, 7). For processes P0-P4, Allocation/Max are: P0 (0,1,0)/(7,5,3), P1 (2,0,0)/(3,2,2), P2 (3,0,2)/(9,0,2), P3 (2,1,1)/(2,2,2), P4 (0,0,2)/(4,3,3). Which sequence is a safe sequence under the Banker's algorithm?

A P4, P0, P1, P2, P3
B P0, P2, P1, P3, P4
C P2, P1, P3, P4, P0
D P1, P3, P4, P0, P2
Explanation

The currently available vector is total minus allocated: (10,5,7) - (7,2,5) = (3,3,2). P1 needs (1,2,2), so it can finish and release (2,0,0), making (5,3,2). P3 then needs (0,1,1), P4 needs (4,3,1), P0 needs (7,4,3) after those releases, and finally P2 needs (6,0,0). Therefore P1, P3, P4, P0, P2 is safe.

Q4In a demand-paged operating system, a page fault occurs while a process is executing in user mode. Which sequence best describes what happens before the faulting instruction can complete?

A Trap to the kernel, validate the reference, obtain the page from backing store if valid, update the page table, and restart the faulting instruction
B Disable all interrupts permanently and mark the process as terminated
C Flush the entire virtual address space and allocate a new process identifier
D Directly load the missing page into the CPU register file and continue with the next instruction
Explanation

A page fault is an exception handled by the operating system. If the virtual address is legal but the page is not resident, the OS selects or allocates a frame, reads the page from backing store, records the valid mapping, and resumes execution so that the instruction that faulted can be retried.

Q5A CPU has separate interrupt-enable and interrupt-pending bits. An I/O device finishes a transfer while interrupts are disabled. Which behaviour is most consistent with interrupt-driven I/O?

A The device completion must be lost because interrupts were disabled
B The completion is recorded as pending, and the service routine runs after interrupts are enabled and priority checks permit it
C The CPU must poll the device forever because interrupt-driven I/O cannot coexist with masking
D The CPU immediately branches to the service routine even though interrupts are disabled
Explanation

Interrupt-driven I/O allows a device to signal that it needs attention, but processors commonly provide masking or enable bits to protect critical sections. If the request is maskable and interrupts are disabled, the event is not serviced immediately. A pending indication lets the processor recognize and handle the interrupt later, subject to priority and enable rules.

You've seen 5 of 56 sample questions

Unlimited practice on Paper - II (vii) — Computer Organization and Operation System comes with the RAS Test Series + Practice pack or Gate Pass.

More questions

6Two directory entries are hard links to the same regular file on a Unix-like file system. Which statement is necessarily true before either link is removed?

AThey have different inode numbers but always share the same file name
BOne link must be a symbolic link that stores the other link's pathname
CDeleting one directory entry immediately deletes the file data even while another hard link remains
DThey share the same inode and the inode link count is at least 2

7In 8-bit two's-complement arithmetic, the CPU adds 0111 0100 and 0101 1001. Which result and overflow interpretation is correct?

A1100 1101, interpreted as the correct signed value -51
B1100 1101, with no signed overflow because carry-out is 0
C1100 1101, with signed overflow
D0010 1101, with signed overflow

8During the fetch phase of a simple stored-program CPU, which register-level sequence is most consistent with fetching the next instruction from main memory?

APC -> MAR; memory read; MDR -> IR; PC incremented to the next instruction address
BIR -> MAR; ALU read; accumulator -> PC; MDR decoded as an address
CMAR -> PC; memory write; IR -> MDR; ALU increments the opcode field
DMDR -> MAR; I/O read; PC -> IR; status register increments

9A direct-mapped cache has 64 lines, each line holding 16 bytes. For a 32-bit byte address, which tag-index-offset split is correct?

A20 tag bits, 8 index bits, 4 offset bits
B22 tag bits, 4 index bits, 6 offset bits
C22 tag bits, 6 index bits, 4 offset bits
D24 tag bits, 4 index bits, 4 offset bits

10Which statement best distinguishes DMA-based I/O from programmed I/O for transferring a large disk block into main memory?

ADMA lets the device controller transfer the block to memory after setup, usually interrupting the CPU on completion
BProgrammed I/O bypasses the CPU for the data movement, while DMA makes the CPU copy each byte
CProgrammed I/O and DMA differ only in software naming; both require identical CPU instruction sequences for every byte
DDMA can be used only for keyboard input because disks require byte-at-a-time polling

11A single-threaded process running on a uniprocessor issues a blocking read system call for disk data that is not yet available. Which process-state transition is most accurate until the disk interrupt reports completion?

ARunning to suspended, then suspended to terminated after scheduler dispatch
BRunning to waiting, then waiting to ready after the I/O completion interrupt
CRunning to ready, then ready to terminated after the disk interrupt
DReady to running, then running to waiting after the interrupt

12A system uses 32-bit virtual addresses, 4 KB pages, and a two-level page table with 10 bits for the outer page-table index and 10 bits for the inner index. What is the virtual page number and page offset for virtual address 0x12345ABC?

AVirtual page number = 0x1234, offset = 0x5ABC
BVirtual page number = 0x12345, offset = 0xABC
CVirtual page number = 0x123, offset = 0x45ABC
DVirtual page number = 0x45ABC, offset = 0x123

13A paged system has a TLB lookup time of 20 ns and a main-memory access time of 100 ns. The TLB hit ratio is 90 percent. Assume no page faults, no cache, and that a TLB miss requires one memory access to read the page-table entry and one memory access to read the required word. What is the effective memory access time?

A118 ns
B130 ns
C220 ns
D140 ns

14A cache has hit time 2 ns, miss penalty 48 ns, and hit ratio 90%. What is the average memory access time, assuming miss penalty is additional time after the cache lookup?

A4.8 ns
B50.0 ns
C6.8 ns
D2.8 ns

15For the reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 with initially empty frames, which observation correctly illustrates Belady's anomaly under FIFO page replacement?

AFIFO gives 9 faults with 3 frames and 9 faults with 4 frames
BFIFO gives 10 faults with 3 frames and 9 faults with 4 frames
CFIFO gives 9 faults with 3 frames and 10 faults with 4 frames
DFIFO gives 10 faults with both 3 frames and 4 frames

More topics in Data Structures & Organization (Basic CI)

Explore other subjects