1.
_____ is the dynamic storage-allocation algorithm which results in the largest leftover hole in memory.
Correct Answer
C. Worst fit
Explanation
Worst fit is the dynamic storage-allocation algorithm that results in the largest leftover hole in memory. In this algorithm, the operating system allocates the largest available block of memory to a process, even if it is larger than what the process needs. This strategy helps in minimizing external fragmentation but may lead to inefficient memory utilization.
2.
Consider a logical address with a page size of 8 KB. How many bits must be used to represent the page offset in the logical address?
Correct Answer
C. 13
Explanation
A page size of 8 KB means that each page contains 8 * 1024 bytes. To represent the page offset, we need to determine the number of bits required to represent the number of bytes in a page. Since each byte can be represented by 8 bits, the total number of bits required to represent the page offset is 8 * 1024 = 8192 bits. However, since the question asks for the number of bits, we need to convert 8192 to binary and count the number of digits, which is 13. Therefore, 13 bits must be used to represent the page offset in the logical address.
3.
Consider a logical address with 18 bits used to represent an entry in a conventional page table. How many entries are in the conventional page table?
Correct Answer
A. 262144
Explanation
In a conventional page table, each entry represents a logical address. The number of entries in the page table is equal to the number of possible logical addresses. Given that there are 18 bits used to represent each entry, the total number of entries in the conventional page table can be calculated as 2^18, which equals 262144. Therefore, the correct answer is 262144.
4.
Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page number?
Correct Answer
A. 0xAE
Explanation
The given logical address 0xAEF9 is in hexadecimal format. To find the page number, we need to divide the logical address by the page size. The page size is given as 256 bytes. Dividing 0xAEF9 by 256 gives us a quotient of 0xAE. Therefore, the page number is 0xAE.
5.
Consider a 32-bit address for a two-level paging system with an 8 KB page size. The outer page table has 1024 entries. How many bits are used to represent the second-level page table?
Correct Answer
D. 9
Explanation
In a two-level paging system, the outer page table has 1024 entries. Since each entry represents a second-level page table, we can say that there are 1024 second-level page tables.
To find out how many bits are used to represent the second-level page table, we need to calculate the number of bits required to represent 1024.
Since 2^10 = 1024, we need 10 bits to represent 1024.
However, since the question asks for the number of bits used to represent the second-level page table, we subtract the number of bits used to represent the outer page table.
Since the outer page table has 1024 entries, we need 10 bits to represent it.
Therefore, the number of bits used to represent the second-level page table is 10 - 10 = 0 bits.
However, since the minimum number of bits required to represent anything is 1, we can say that the second-level page table requires 1 bit.
Therefore, the correct answer is 9.
6.
In systems that support virtual memory, ____.
Correct Answer
D. pHysical memory is separated from logical memory.
Explanation
In systems that support virtual memory, physical memory is separated from logical memory. This means that the operating system can allocate memory to processes in a way that is independent of the actual physical memory available in the system. The logical memory space is divided into pages, which are then mapped to physical memory or secondary storage as needed. This allows for more efficient memory management and the ability to run larger programs than what can fit into physical memory alone.
7.
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what is the number of page faults for the given reference string?
Correct Answer
B. 8
Explanation
The FIFO (First-In-First-Out) replacement algorithm works by replacing the oldest page in the frame when a page fault occurs. In this case, we have three frames available.
Initially, all frames are empty, so the first three page accesses (1, 2, 3) will result in page faults. The frames will be filled with these pages.
When the fourth page (4) is accessed, a page fault occurs as it is not present in any of the frames. The oldest page (1) is replaced with page 4.
The next two page accesses (2, 3) are already present in the frames, so no page faults occur.
When page 4 is accessed again, no page fault occurs as it is already in one of the frames.
The next three page accesses (1, 2, 1) result in page faults as these pages are not present in any of the frames. The oldest pages (2, 3) are replaced with pages 1 and 2 respectively.
Finally, when pages 1 and 3 are accessed again, no page faults occur as they are already in the frames.
Therefore, the total number of page faults using the FIFO algorithm is 8.
8.
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what will be the final configuration of the three frames following the execution of the given reference string?
Correct Answer
D. 3, 4, 2
9.
The path name /home/people/os-student/chap10.txt is an example of
Correct Answer
B. An absolute path name
Explanation
The given path name starts with a forward slash (/), which indicates that it starts from the root directory. An absolute path name specifies the complete location of a file or directory in the file system, starting from the root directory. Therefore, the given path name is an example of an absolute path name.
10.
A mount point is _____.
Correct Answer
D. The location within the file structure where the file system is to be attached.
Explanation
A mount point refers to the specific location within the file structure where a file system is attached. It is not limited to shared file systems, as it can be used for any type of file system.
11.
The surface of a magnetic disk platter is divided into ____.
Correct Answer
C. Tracks
Explanation
The surface of a magnetic disk platter is divided into tracks. Tracks are concentric circles on the surface of the disk that store data. Each track is divided into smaller units called sectors, which are used to organize and store data on the disk. Arms and cylinders are not correct answers as they do not represent the division of the disk surface.
12.
The SSTF scheduling algorithm ____.
Correct Answer
B. Services the request with the minimum seek time
Explanation
The SSTF (Shortest Seek Time First) scheduling algorithm selects the request with the minimum seek time. Seek time refers to the time taken by the disk arm to move to the desired track. By choosing the request with the minimum seek time, the algorithm aims to minimize the total seek time and improve disk access efficiency. This helps in reducing the average response time and improving overall system performance.
13.
Consider a disk queue holding requests to the following cylinders in the listed order: 116, 22, 3, 11, 75, 185, 100, 87. Using the SCAN scheduling algorithm, what is the order that the requests are serviced, assuming the disk head is at cylinder 88 and moving upward through the cylinders?
Correct Answer
B. 100 - 116 - 185 - 87 - 75 - 22 - 11 - 3
Explanation
The SCAN scheduling algorithm services requests by moving the disk head in one direction (either upward or downward) until it reaches the end of the disk, and then reverses direction and services requests in the opposite direction. In this case, the disk head starts at cylinder 88 and moves upward through the cylinders. The SCAN algorithm services requests in the order they are encountered while moving upward until reaching the highest cylinder (185), at which point it reverses direction. Therefore, the correct order of the serviced requests is 100 - 116 - 185 - 87 - 75 - 22 - 11 - 3.
14.
Consider a disk queue holding requests to the following cylinders in the listed order: 116, 22, 3, 11, 75, 185, 100, 87. Using the FCFS scheduling algorithm, what is the order that the requests are serviced, assuming the disk head is at cylinder 88 and moving upward through the cylinders?
Correct Answer
A. 116 - 22 - 3 - 11 - 75 - 185 - 100 - 87
Explanation
The FCFS (First-Come, First-Served) scheduling algorithm services the requests in the order they arrive. In this case, the disk head starts at cylinder 88 and moves upward through the cylinders. The first request in the queue is cylinder 116, so it is serviced first. Then, the requests are serviced in the order they appear in the queue: 22, 3, 11, 75, 185, 100, and finally 87. Therefore, the correct answer is 116 - 22 - 3 - 11 - 75 - 185 - 100 - 87.
15.
Consider a disk queue holding requests to the following cylinders in the listed order: 116, 22, 3, 11, 75, 185, 100, 87. Using the SSTF scheduling algorithm, what is the order that the requests are serviced, assuming the disk head is at cylinder 88 and moving upward through the cylinders?
Correct Answer
C. 87 - 75 - 100 - 116 - 185 - 22 - 11 - 3
Explanation
The SSTF (Shortest Seek Time First) scheduling algorithm selects the request with the shortest seek time from the current position of the disk head. In this case, the disk head starts at cylinder 88 and moves upward through the cylinders.
Initially, the disk head moves to cylinder 87 as it has the shortest seek time from 88. Then, it moves to cylinder 75, followed by 100, 116, 185, 22, 11, and finally 3.
Therefore, the order in which the requests are serviced using the SSTF scheduling algorithm is 87 - 75 - 100 - 116 - 185 - 22 - 11 - 3.
16.
Consider a disk queue holding requests to the following cylinders in the listed order: 116, 22, 3, 11, 75, 185, 100, 87. Using the C-SCAN scheduling algorithm, what is the order that the requests are serviced, assuming the disk head is at cylinder 88 and moving upward through the cylinders?
Correct Answer
D. 100 - 116 - 185 - 3 - 11 - 22 - 75 – 87
Explanation
The C-SCAN scheduling algorithm works by servicing requests in a circular manner. It always starts from the current head position and moves towards the end of the disk, servicing all the requests along the way. Once it reaches the end, it wraps around to the beginning and continues servicing any remaining requests. In this case, starting from cylinder 88 and moving upward, the order of servicing the requests would be: 100 - 116 - 185 - 3 - 11 - 22 - 75 – 87.
17.
Low-level formatting ____.
Correct Answer
A. Does not usually provide an error-correcting code
Explanation
Low-level formatting refers to the process of preparing a disk for use by creating the physical structures necessary for data storage. It involves dividing the disk into sections that the disk controller can read and write. However, low-level formatting does not typically include the implementation of an error-correcting code. Error-correcting codes are usually implemented at a higher level, such as in the file system or during data transmission, to detect and correct errors that may occur during storage or transmission of data. Therefore, the correct answer is that low-level formatting does not usually provide an error-correcting code.
18.
Host-attached storage is ____.
Correct Answer
C. Accessed via local I/O ports
Explanation
Host-attached storage refers to a storage system that is directly connected to a host computer via local I/O ports. This means that the storage device is physically connected to the host computer, allowing for faster data transfer and lower latency compared to accessing the storage remotely over a data network. Host-attached storage is suitable for use with hard disks and can be used in RAID arrays if needed.
19.
Which of the following disk head scheduling algorithms does not take into account the current position of the disk head?
Correct Answer
A. FCFS
Explanation
FCFS (First-Come, First-Served) is the disk head scheduling algorithm that does not take into account the current position of the disk head. It simply serves the requests in the order they arrive. This means that the disk head may have to travel long distances between requests, resulting in longer seek times and potentially slower overall performance compared to other algorithms that consider the current position of the disk head.
20.
What are the two components of positioning time?
Correct Answer
A. Seek time + rotational latency
Explanation
The two components of positioning time are seek time and rotational latency. Seek time refers to the time it takes for the read/write head to move to the desired track on the disk, while rotational latency is the time it takes for the desired sector to rotate under the read/write head. These two components combined make up the total positioning time, which is important in determining the overall performance of a disk drive.
21.
A RAID structure ____.
Correct Answer
B. Is primarily used to ensure higher data reliability
Explanation
A RAID structure is primarily used to ensure higher data reliability. RAID stands for redundant arrays of inexpensive disks, which means that it involves combining multiple disk drives into a single logical unit. This configuration provides redundancy and fault tolerance, allowing for data to be stored across multiple drives. In the event of a drive failure, the data can be reconstructed from the remaining drives, ensuring that data remains accessible and reliable. Therefore, the primary purpose of a RAID structure is to enhance data reliability.
22.
RAID level ____ is the most common parity RAID system.
Correct Answer
D. 5
Explanation
RAID level 5 is the most common parity RAID system. In RAID 5, data is striped across multiple drives with distributed parity. This means that each drive contains both data and parity information, allowing for fault tolerance and data recovery in case of a single drive failure. RAID 5 offers a good balance between performance, storage capacity, and data protection, making it widely used in various applications and industries.
23.
Which RAID level is best for storing large volumes of data?
Correct Answer
B. RAID level 3
Explanation
RAID level 3 is the best option for storing large volumes of data because it offers both data striping and dedicated parity. This means that data is divided and stored across multiple drives for increased performance, while parity information is stored on a dedicated drive for fault tolerance. This combination allows for efficient storage of large amounts of data with redundancy, ensuring both speed and data protection.