Operating Systems: Memory, Process, and File Management
Comprehensive quiz covering OS concepts including virtual memory, paging, TLB, process scheduling, threads, file systems, and system calls
Questions
In a memory scheme, the address of a location is specified by a page address and a displacement within a page, in hexadecimal.
of pages = 16
of words per page = 256
The address of the 11th page, 94th word is
- B5E
- A5D
- 5EB
- E9C
Find the valid statement.
- Pages that are shared between two or more processes can never be swapped out to the disk.
- The allocated portions of memory using a buddy system are all the same size.
- Demand paging requires the programmer to take specific action to force the operating system to load a particular virtual memory page.
- Prepaging is one possibility for the fetch policy in a virtual memory system.
LRU cache replacement is used in
- associative cache
- direct mapped cache
- set-associative
- none of these
In a paging system with TLB it is observed that for every 10 memory accesses, 9 accesses are successfully found in TLB. Find out effective access time, if memory access is 200 ms and cache access is 10 ms while finding page base address.
- 20 ms
- 30 ms
- 40 ms
- None of these
The difference between the time you get results and the time of submission is
- elapsed
- turnaround
- system
- none of these
A paging system is employing HW cache as TLB of 20 ns access time (search time) and physical memory access time is 100 ns. It is observed that the hit ratio is 98%. The effective memory access time is
- 120 ns
- 122 ns
- 220 ns
- None of these
A currently running process can be put on a ready queue or one of the I/O queues by each of the following except
- the process did an illegal memory access
- the process issued an I/O request
- there was an interrupt
- the process issued a system call
Find incorrect statement about FAT-32 compared to VFAT.
- The FAT-32 system enables users to manage 8 GB volumes with cluster sizes of just 4 kB. For hard drives up to a maximum of 32 GB, the cluster size is 16 kB
- FAT-32 also does not limit the number of directories or files in the root directory
- FAT-32 supports long file names
- None of these
When a user program calls a system call
- mode changes to system mode
- interrupts are enabled
- system call number is sued to find out code in system call interrupt vector area
- all of these
In the burst mode, DMA transfers
- entire block
- one byte at a time
- one record at a time
- none of these
A two-way set associative memory with 1K is used, then the number of locations are
- 1024
- 16
- 512
- None of these
Which of the following best describes the threads?
- Threads are more cheaper to create and destroy as they don not require allocation of real addresses
- Switching of threads is faster
- Threads will have their own stack and registers
- All of these
Which of the following statements is false?
- VM implements the translation of a programs address space to physical address space.
- VM allows each program to exceed the size of the primary memory.
- VM increases degree of multiprogramming.
- VM reduces the context switching overhead.
When miss occurs, then _____ procedure can respond quicly to CPU.
- look-aside
- look-through
- can’t say
- none of these
Find the invalid statement.
- One useful measure of a system’s ability to handle a large number of jobs is throughput, defined as the total time required to execute the set of jobs.
- A process in a blocked state is waiting for an event, but that event is not related to the virtual memory subsystem.
- Process state transition diagrams are helpful to understand the ways in which a process and the OS must react to different situations.
- A process control block would typically contain information about memory allocations, threads and other information used to manage the process.
Consider the following program.
int main(){
int status;
int counter = 1;
if (fork() == 0) {
counter++;
printf(“%d”,counter);
}
else {
if (fork() == 0) {
printf(“5”,);
counter--;
printf(“%d”,counter);
exit(0);
}
else {
if (wait(&status) > 0) {
printf(“6”);
}
}
}
printf(“3”);
exit(0);
}
The output which is not possible from this program is
- 253063
- 251633
- 520633
- 506323
Disk allocation table
- FAT
- Open file table
- Bit map
- None of these
Find the odd-one out.
- Programmers (assembly) can access all registers in a processor
- Programmer (assembly) cannot access all registers in a processor
- Some registers are not part of instruction set
- None of these
Pentium processor the code cache as a TLB of ___ entries.
- 16
- 32
- 64
- None of these
When Unix opens a file, it selects an unused file descriptor
- with the lowest value
- that was closed most recently
- with the highest value
- none of these