Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Chapter: 34
Q941:
In a hierarchical paging system, what is the function of the inner page table?
A. It translates the inner page offset to a physical frame
B. It stores the mapping of the entire address space
C. It provides read-only access to pages
D. It manages the page directory
Correct Answer:
A
Chapter: 34
Q942:
In a page table, each entry typically contains what information?
A. The frame number associated with a page
B. The logical address of the page
C. The data stored in the page
D. The process ID of the program
Correct Answer:
A
Chapter: 35
Q943:
In paging, which type of code can be shared between multiple processes?
A. Reentrant code
B. Stack code
C. Dynamic code
D. Data code
Correct Answer:
A
Chapter: 35
Q944:
Segmentation is a memory management scheme that supports which programmer's view of memory?
A. Functions
B. Memory pages
C. Segments
D. Processes
Correct Answer:
C
Chapter: 35
Q945:
A logical address in segmentation consists of which two components?
A. Segment number and offset
B. Address base and length
C. Physical address and page number
D. Data and code
Correct Answer:
A
Chapter: 35
Q946:
What does the segment base contain in segmentation?
A. Physical address
B. Segment name
C. Segment offset
D. Segment length
Correct Answer:
A
Chapter: 35
Q947:
In segmentation, which register points to the segment table's location in memory?
A. Segment-table base register (STBR)
B. Segment-table length register (STLR)
C. Program counter (PC)
D. Instruction register (IR)
Correct Answer:
A
Chapter: 35
Q948:
What happens when a segment number is greater than the value in STLR in segmentation?
A. The segment is invalid
B. The segment is relocated
C. The program crashes
D. The segment is executed
Correct Answer:
A
Chapter: 35
Q949:
What is one advantage of segmentation in memory management?
A. Sharing of segments
B. Fixed segment size
C. Easy allocation
D. Contiguous memory allocation
Correct Answer:
A
Chapter: 35
Q950:
In paging, how does sharing of memory benefit multiple processes?
A. Shared code can be accessed by multiple processes without duplication
B. Each process gets its own copy of the code
C. Code is loaded into a separate physical memory for each process
D. Data is shared among processes
Correct Answer:
A
Chapter: 35
Q951:
In segmentation, which type of code is typically marked as read-only or execute-only for protection?
A. Instructions
B. Data
C. Stack
D. Code segments
Correct Answer:
A
Chapter: 35
Q952:
What is the main issue with segmentation that leads to external fragmentation?
A. Variable segment sizes
B. Fixed segment sizes
C. Static memory allocation
D. Memory compaction
Correct Answer:
A
Chapter: 35
Q953:
The protection of segments in a system is ensured by which component?
A. Segment-table entries
B. Memory bus
C. Program counter
D. Cache memory
Correct Answer:
A
Chapter: 35
Q954:
When does external fragmentation occur in segmentation?
A. When memory is not contiguous
B. When memory is compacted
C. When memory is allocated dynamically
D. When segments are too small
Correct Answer:
A
Chapter: 35
Q955:
Which algorithm is commonly used to solve the memory allocation problem in segmentation?
A. Best fit or worst fit
B. First fit
C. Next fit
D. Equal fit
Correct Answer:
A
Chapter: 35
Q956:
In the context of segmentation, what happens when a job is latched in memory during I/O operations?
A. It should wait until I/O is completed
B. It will run even if I/O is in progress
C. It will crash the system
D. I/O operations should be done in OS buffers
Correct Answer:
D
Chapter: 35
Q957:
What happens when segmentation is combined with paging?
A. Paged segmentation eliminates external fragmentation
B. Segmentation results in more fragmentation
C. Paging will increase memory usage
D. Segmentation will be more complex
Correct Answer:
A
Chapter: 35
Q958:
A segment-table entry's protection bits include which of the following?
A. Read, write, execute bits
B. Data, code, instruction bits
C. Validity, length, offset bits
D. Memory, data, stack bits
Correct Answer:
A
Chapter: 35
Q959:
What does the segment-table length register (STLR) indicate?
A. The number of segments used by a program
B. The total memory allocated for the program
C. The offset for each segment
D. The location of the segment in memory
Correct Answer:
A
Chapter: 35
Q960:
In segmentation, what does the segment limit specify?
A. The length of the segment
B. The memory address of the segment
C. The offset within the segment
D. The segment's base address
Correct Answer:
A