Multiple Choice Section Flashcards
(33 cards)
The cursor that indicates the position in a file being read/written to by a process is
stored in:
a).-the PCB
b).-The inode
c).-the file descriptor
d).-TCB
c).-the file descriptor
An OS knows the type of file system stored on a disk partition by looking at the
following section on the partition:
a).-master boot record
b).-superblock
c).-free space management
d).-i-nodes
b).-superblock
The data block free list for a file system can usually be found in:
a).-The inode free list
b).-the superblock
c).-the boot block
d).-the metadata block
b).-the superblock
The following is a process synchronization solution that does not require hardware
support:
a).-Peterson’s solution
b).-Test-And-Set instruction
c).-Swap instruction
d).-None of the above
a).-Peterson’s solution
The following process synchronization solutions involve busy wait:
a).-Swap instruction;
b).-Peterson’s solution;
c).-Test-And-Set instruction;
d).-All of the above;
d).-All of the above;
In local page replacement schemes, when a process needs a frame it can page out:
a).-any other page that process may have in memory;
b).-any page that belongs to any other process currently in memory;
c).-both ‘a’ and ‘b’;
d).-none of the above;
a).-any other page that process may have in memory;
If you are using a single-processor CPU system and want to protect a short critical
section, the best and most efficient choice will be:
a).-disabling interrupts;
b).-A mutex implemented using the Swap instruction;
c).-A semaphore implemented in the OS kernel;
d).-None of the above
a).-disabling interrupts;
The optimal page replacement algorithm chooses the page to be replaced as follows:
a).-The page that has been in memory for the longest time;
b).-The page that has been referenced the least in recent time;
c).-The page that will be referenced the farthest in the future (or not referred at all);
d).-The page that has the most recent timestamp;
c).-The page that will be referenced the farthest in the future (or not referred at all);
The best technique for file block allocation when we intend to use random access is:
a).-Contiguous allocation;
b).-Linked allocation;
c).-Index allocation;
d).-None of the above;
Index allocation;
What page would be the worst candidate to replace out of the following ones during
the execution of page replacement algorithm:
a).-A page that has the referenced bit set to 0 and the dirty bit set to 0;
b).-A page that has the referenced bit set to 1 and the dirty bit set to 0;
c).-A page that has the referenced bit set to 0 and the dirty bit set to 1;
d).-A page that has the referenced bit set to 1 and the dirty bit set to 1;
d).-A page that has the referenced bit set to 1 and the dirty bit set to 1;
Which of the following page-replacement algorithms would be the best from the
point of view of page-fault rate (i.e. the one that minimizes page faults)?
a).-LRU
b).-FIFO
c).-Optimal Replacement
d).-Second chance
c) Optimal Replacement ?
In the optimal page replacement algorithm, the page to be replaced is chosen as
follows:
-The page that has been in memory for the longest time;
-The page that has been referenced the least in recent time;
-The page that will be referenced the farthest in the future or not referenced;
-The page that has the most recent timestamp
- The page that will be referenced the farthest in the future or not referenced. ?
In the clock page replacement algorithm, the following is true when a page needs to
be replaced:
-If the next page has the referenced bit set to 1, the bit is set to 0 and the page is
spared;
-If the next page has the referenced bit set to 0, the page is replaced and the pointer
is advanced;
-Both ‘a’ and ‘b’ hold true;
-Neither ‘a’ nor ‘b’ hold true
- Both ‘a’ and ‘b’ hold true ?
In Global page replacement schemes, when a process needs a frame it can page out:
-any other page that the process may have in memory;
-any page that belongs to any other process currently in memory;
-both ‘a’ and ‘b’;
-none of the above;
- any page that belongs to any other process currently in memory. ?
When using kernel-level threads, a thread context switch within the same address
space is equivalent/close to:
a).-A function call;
b).-A system call;
c).-A Process context switch;
d).-None of the previous;
b).-A system call; ?
Unix-native file systems employ the following for file protection/sharing:
a).-Uids and group ids and rwx permissions for each;
b).-ACLs;
c).-Both a and b;
d).-Neither a nor b;
a) Uids and group ids and rwx permissions for each ?
might be c).-Both a and b;
A pointer to the root directory i-node of a given file system stored in a disk partition
can be found in:
a).-Kernel memory;
b).-the superblock;
c).-each data block;
d).-none of the previous;
b) the superblock ?
The following is a software-based solution to the process synchronization problem:
a).-Peterson’s solution
b).-TestAndSet instruction
c).-Swap instruction
d).-none of the previous
a) Peterson’s solution ?
If you are using a multiprocessor system and want to protect a short critical section,
the best and most efficient choice which is free of a busy-wait will be:
a).-disabling interrupts;
b).-a mutex implemented using TestAndSet instruction;
c).-a semaphore implemented in the OS kernel;
d).-a monitor;
a) disabling interrupts ?
c).-a semaphore implemented in the OS kernel; ?
Windows file systems employ the following for file protection/sharing:
a).-Uids and group ids and rwx permissions for each
b).-ACLs
c).-Mandatory file locks
d).-Advisory file locks
b) ACLs ?
(Access Control Lists)
The i-node free list for a file system can usually be found in:
a).-The inode data block
b).-The superblock
c).-The boot block
d).-The master data block
b).-The superblock ?
A process synchronization solution that does require hardware support is:
a).-Peterson’s solution
b).-Test-And-Set instruction
c).-Blocking semaphores
d).-None of the above
b) Test-And-Set instruction ?
The best technique for file block allocation when we intend to use random file access
is:
-contiguous allocation;
-linked allocation;
-index allocation;
-none of the above;
-index allocation; ?
The LRU page replacement algorithm chooses the page to be replaced as follows:
-The page that has been in memory for the longest time;
-The page that has been referenced the least in recent time;
-The page that will be referenced the farthest in the future (or not referred at all);
-The page that has the oldest timestamp;
- The page that has been referenced the least in recent time. ?