Which of the following is major part of time taken when accessing data on the disk?
Question 1 Explanation:
Seek time is time taken by the head to travel to the track of the disk where the data to be accessed is stored.
We describe a protocol of input device communication below. a. Each device has a distinct address b. The bus controller scans each device in sequence of increasing address value to determine if the entity wishes to communicate. c. The device ready to communicate leaves it data in IO register. d. The data is picked up and the controller moves to step-a above. Identify the form of communication best describes the IO mode amongst the following: Source: nptel
Programmed mode of data transfer
Question 2 Explanation:
From amongst the following given scenarios determine the right one to justify interrupt mode of data-transfer: Source: nptel
Bulk transfer of several kilo-byte
Moderately large data transfer but more that 1 KB
Short events like mouse action
Key board inputs
Question 3 Explanation:
Both keyboard and mouse controllers typically use interrupt mode.
Normally user programs are prevented from handling I/O directly by I/O instructions in them. For CPUs having explicit I/O instructions, such I/O protection is ensured by having the I/O instructions privileged. In a CPU with memory mapped I/O, there is no explicit I/O instruction. Which one of the following is true for a CPU with memory mapped I/O? (GATE CS 2005)
I/O protection is ensured by operating system routine(s)
I/O protection is ensured by a hardware trap
I/O protection is ensured during system configuration
I/O protection is not possible
Question 4 Explanation:
See question 1 of http://www.geeksforgeeks.org/operating-systems-set-16/
Put the following disk scheduling policies results in minimum amount of head movement.
Question 5 Explanation:
First Come -First Serve (FCFS) All incoming requests are placed at the end of the queue. Whatever number that is next in the queue will be the next number served. Using this algorithm doesn't provide the best results. Elevator (SCAN): This approach works like an elevator does. It scans down towards the nearest end and then when it hits the bottom it scans up servicing the requests that it didn't get going down. If a request comes in after it has been scanned it will not be serviced until the process comes back down or moves back up. Circular Scan (C-SCAN): Circular scanning works just like the elevator to some extent. It begins its scan toward the nearest end and works it way all the way to the end of the system. Once it hits the bottom or top it jumps to the other end and moves in the same direction. Keep in mind that the huge jump doesn't count as a head movement. Source: http://www.cs.iit.edu/~cs561/cs450/disksched/disksched.html
Consider a hard disk with 16 recording surfaces (0-15) having 16384 cylinders (0-16383) and each cylinder contains 64 sectors (0-63). Data storage capacity in each sector is 512 bytes. Data are organized cylinder-wise and the addressing format is <cylinder no., surface no., sector no.> . A file of size 42797 KB is stored in the disk and the starting disk location of the file is <1200, 9, 40>. What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner?
Question 6 Explanation:
42797KB will take 85512 sectors (42797*1024 bytes / 512 bytes) Since there are 64 sectors per surface, 85512/64 = 1337.406 sectors are required, so we take 1338 sectors these sectors are distributed among 16 surfaces, so 1338/16 = 83.58 cylinders will be required. So the final ans will be 84+1200 = 1284. one more fact to be noted is that the file occupies 83.58 cylinders, but the 0.58 cannot be accommodated in the first one (the file storage starts from <1200,9,40>). Hence, the file will be extended to 194 (85594-85400) more bytes of cylinder 1284.
A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is
Dependent on the size of the disk
Question 7 Explanation:
A computer handles several interrupt sources of which the following are relevant for this question.
. Interrupt from CPU temperature sensor (raises interrupt if CPU temperature is too high) . Interrupt from Mouse(raises interrupt if the mouse is moved or a button is pressed) . Interrupt from Keyboard(raises interrupt when a key is pressed or released) . Interrupt from Hard Disk(raises interrupt when a disk read is completed)Which one of these will be handled at the HIGHEST priority?
Interrupt from Hard Disk
Interrupt from Mouse
Interrupt from Keyboard
Interrupt from CPU temperature sensor
Question 8 Explanation:
Higher priority interrupt levels are assigned to requests which, if delayed or interrupted, could have serious consequences. Devices with high speed transfer such as magnetic disks are given high priority, and slow devices such as keyboard receive low priority (Source: Computer System Architecture by Morris Mano) Interrupt from CPU temperature sensor would have serious consequences if ignored.
An application loads 100 libraries at start-up. Loading each library requires exactly one disk access. The seek time of the disk to a random location is given as 10 ms. Rotational speed of disk is 6000 rpm. If all 100 libraries are loaded from random locations on the disk, how long does it take to load all libraries? (The time to transfer data from the disk block once the head has been positioned at the start of the block may be neglected)
Question 9 Explanation:
See Question 3 of http://www.geeksforgeeks.org/operating-systems-set-6/
A CPU generally handles an interrupt by executing an interrupt service routine
As soon as an interrupt is raised
By checking the interrupt register at the end of fetch cycle.
By checking the interrupt register after finishing the execution of the current instruction.
By checking the interrupt register at fixed time intervals.
Question 10 Explanation:
Hardware detects interrupt immediately, but CPU acts only after its current instruction. This is followed to ensure integrity of instructions.
A hard disk has 63 sectors per track, 10 platters each with 2 recording surfaces and 1000 cylinders. The address of a sector is given as a triple (c, h, s), where c is the cylinder number, h is the surface number and s is the sector number. Thus, the 0th sector is addressed as (0, 0, 0), the 1st sector as (0, 0, 1), and so on The address <400,16,29> corresponds to sector number:
Question 11 Explanation:
Overview The data in hard disk is arranged in the shown manner. The smallest division is sector. Sectors are then combined to make a track. Cylinder is formed by combining the tracks which lie on same dimension of the platters. Read write head access the disk. Head has to reach at a particular track and then wait for the rotation of the platter so that the required sector comes under it. Here, each platter has two surfaces, which is the r/w head can access the platter from the two sides, upper and lower. So,<400,16,29> will represent 400 cylinders are passed(0-399) and thus, for each cylinder 20 surfaces (10 platters * 2 surface each) and each cylinder has 63 sectors per surface. Hence we have passed 0-399 = 400 * 20 * 63 sectors + In 400th cylinder we have passed 16 surfaces(0-15) each of which again contains 63 sectors per cylinder so 16 * 63 sectors. + Now on the 16th surface we are on 29th sector. So, sector no = 400x20x63 + 16×63 + 29 = 505037. Reference : https://www.ilbe.com/1144674842 This solution is contributed by Shashank Shanker khare.
Consider the data given in previous question. The address of the 1039th sector is
(0, 15, 31)
(0, 16, 30)
(0, 16, 31)
(0, 17, 31)
Question 12 Explanation:
You can also see the image uploaded in previous question. (a) <0,15,31> 0th cylinder 15th surface and 31st sector So, 0 cylinders passed 0*20*63 As each cylinder has 20 surfaces and each surface has 63 sectors. + 15 surfaces passed (0-14) 15*63 As each surface has 63 sectors + We are on 31st sector So, sector no. =0*20*63+15*63+31=976 sector. Which is not equal to 1039. (b) <0,16,30> Similarly this represents, 0*20*63 + 16*63 (0-15 sectors and each sector has 63 sectors) + 30 sectors on 16th sector Sector no = 0*20*63+16*63+30=1038 sector which is not equal to 1039. (c) <0,16,31> Similarly this represents, 0*20*63 + 16*63 (0-15 sectors and each sector has 63 sectors) + 31 sectors on 16th sector Sector no = 0*20*63+16*63+31=1039 sector which is equal to 1039. Hence,option c is correct. (d) <0,17,31> Similarly this represents, 0*20*63 + 17*63 (0-16 sectors and each sector has 63 sectors) + 31 sectors on 17th sector Sector no = 0*20*63+17*63+31=1102 sector which is not equal to 1039. This solution is contributed by Shashank Shanker khare.
The data blocks of a very large file in the Unix file system are allocated using
an extension of indexed allocation
Question 13 Explanation:
The Unix file system uses an extension of indexed allocation. It uses direct blocks, single indirect blocks, double indirect blocks and triple indirect blocks. Following diagram shows implementation of Unix file system. The diagram is taken from Operating System Concept book.
For a magnetic disk with concentric circular tracks, the seek latency is not linearly proportional to the seek distance due to
non-uniform distribution of requests
arm starting and stopping inertia
higher capacity of tracks on the periphery of the platter
use of unfair arm scheduling policies
Question 14 Explanation:
Whenever head moves from one track to other then its speed and direction changes, which is noting but change in motion or the case of inertia. So answer B This explanation has been contributed by Abhishek Kumar. See Disk drive performance characteristics_Seek_time
Which of the following statements about synchronous and asynchronous I/O is NOT true?
An ISR is invoked on completion of I/O in synchronous I/O but not in asynchronous I/O
In both synchronous and asynchronous I/O, an ISR (Interrupt Service Routine) is invoked after completion of the I/O
A process making a synchronous I/O call waits until I/O is complete, but a process making an asynchronous I/O call does not wait for completion of the I/O
In the case of synchronous I/O, the process waiting for the completion of I/O is woken up by the ISR that is invoked after the completion of I/O
Question 15 Explanation:
There are two types of input/output (I/O) synchronization: synchronous I/O and asynchronous I/O. Asynchronous I/O is also referred to as overlapped I/O. In synchronous file I/O, a thread starts an I/O operation and immediately enters a wait state until the I/O request has completed. An ISR will be invoked after the completion of I/O operation and it will place process from block state to ready state. A thread performing asynchronous file I/O sends an I/O request to the kernel by calling an appropriate function. If the request is accepted by the kernel, the calling thread continues processing another job until the kernel signals to the thread that the I/O operation is complete. It then interrupts its current job and processes the data from the I/O operation as necessary. See Question 3 of http://www.geeksforgeeks.org/operating-systems-set-10/ Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365683%28v=vs.85%29.aspx This solution is contributed by Nitika Bansal
Consider a disk pack with 16 surfaces, 128 tracks per surface and 256 sectors per track. 512 bytes of data are stored in a bit serial manner in a sector. The capacity of the disk pack and the number of bits required to specify a particular sector in the disk are respectively:
256 Mbyte, 19 bits
256 Mbyte, 28 bits
512 Mbyte, 20 bits
64 Gbyte, 28 bit
Question 16 Explanation:
See Question 1 of http://www.geeksforgeeks.org/operating-systems-set-12/
Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85, 90, 100, 105, 110, 135 and 145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for cylinder 90 is serviced after servicing ____________ number of requests.
Question 17 Explanation:
In Shortest-Seek-First algorithm, request closest to the current position of the disk arm and head is handled first. In this question, the arm is currently at cylinder number 100. Now the requests come in the queue order for cylinder numbers 30, 85, 90, 100, 105, 110, 135 and 145. The disk will service that request first whose cylinder number is closest to its arm. Hence 1st serviced request is for cylinder no 100 ( as the arm is itself pointing to it ), then 105, then 110, and then the arm comes to service request for cylinder 90. Hence before servicing request for cylinder 90, the disk would had serviced 3 requests. Hence option C.
A device with data transfer rate 10 KB/sec is connected to a CPU. Data is transferred byte-wise. Let the interrupt overhead be 4 msec. The byte transfer time between the device interface register and CPU or memory is negligible. What is the minimum performance gain of operating the device under interrupt mode over operating it under program controlled mode?
Question 18 Explanation:
In programmed I/O, CPU does continuous polling, To transfer 10KB CPU polls for 1 sec = 10^6 micro-sec of processing In interrupt mode CPU is interrupted on completion of i\o , To transfer 10 KB CPU does 4 micro-sec of processing. Gain = 10^6 / 4 = 25000 250000 for 10000 bytes and 25 for 1 bytes.
Consider a disk drive with the following specifications: 16 surfaces, 512 tracks/surface, 512 sectors/track, 1 KB/sector, rotation speed 3000 rpm. The disk is operated in cycle stealing mode whereby whenever one byte word is ready it is sent to memory; similarly, for writing, the disk interface reads a 4 byte word from the memory in each DMA cycle. Memory cycle time is 40 nsec. The maximum percentage of time that the CPU gets blocked during DMA operation is:
Question 19 Explanation:
Time takes for 1 rotation = 60/3000 It reads 512*1024 Bytes in one rotation. Time taken to read 4 bytes = 153 ns 153 is approximately 4 cycles (160ns) Percentage of time CPU gets blocked = 40*100/160 = 25
Consider an operating system capable of loading and executing a single sequential user process at a time. The disk head scheduling algorithm used is First Come First Served (FCFS). If FCFS is replaced by Shortest Seek Time First (SSTF), claimed by the vendor to give 50% better benchmark results, what is the expected improvement in the I/O performance of user programs?
Question 20 Explanation:
Since Operating System can execute a single sequential user process at a time, the disk is accessed in FCFS manner always. The OS never has a choice to pick an IO from multiple IOs as there is always one IO at a time
A Unix-style i-node has 10 direct pointers and one single, one double and one triple indirect pointers. Disk block size is 1 Kbyte, disk block address is 32 bits, and 48-bit integers are used. What is the maximum possible file size ?
Question 21 Explanation:
Image Source: Wiki
Size of Disk Block = 1Kbyte Disk Blocks address = 32bits, but 48 bit integers are used for address Therefore address size = 6 bytes No of addresses per block = 1024/6 = 170.66 Therefore 170 ≈ 2^8 addresses per block can be stored Maximum File Size = 10 Direct + 1 Single Indirect + 1 Double Indirect + 1 Triple Indirect = 10 + 28 + 28*28 + 28*28*28 ≈ 224 Blocks Since each block is of size 210 Maximum files size = 224 * 210 = 234
A hard disk with a transfer rate of 10 Mbytes/ second is constantly transferring data to memory using DMA. The processor runs at 600 MHz, and takes 300 and 900 clock cycles to initiate and complete DMA transfer respectively. If the size of the transfer is 20 Kbytes, what is the percentage of processor time consumed for the transfer operation ?
Question 22 Explanation:
Transfer rate=10 MB per second Data=20 KB=20* 2 10 So Time=(20 * 2 10)/(10 * 2 20)= 2* 10-3 =2 ms Processor speed= 600 MHz=600 Cycles/sec Cycles required by CPU=300+900 =1200 For DMA=1200 So time=1200/(600 *10 6)=.002 ms In %=.002/2*100=.1% So (D) is correct option
Using a larger block size in a fixed block size file system leads to :
better disk throughput but poorer disk space utilization
better disk throughput and better disk space utilization
poorer disk throughput but better disk space utilization
poorer disk throughput and poorer disk space utilization
Question 23 Explanation:
Using larger block size makes disk utilization poorer as more space would be wasted for small data in a block. It may make throughput better as the number of blocks would decrease. A larger block size guarantees that more data from a single file can be written or read at a time into a single block without having to move the disk ́s head to another spot on the disk. The less time you spend moving your heads across the disk, the more continuous reads/writes per second. The smaller the block size, the more frequent it is required to move before a read/write can occur. Larger block size means less number of blocks to fetch and hence better throughput. But larger block size also means space is wasted when only small size is required and hence poor utilization.
This solution is contributed by Nitika Bansal
This solution is contributed by Nitika Bansal
Which of the following requires a device driver?
Question 24 Explanation:
A disk driver is software which enables communication between internal hard disk (or drive) and computer.
It allows a specific disk drive to interact with the remainder of the computer.
Thus, option (D) is the answer.
Please comment below if you find anything wrong in the above post.
A graphics card has on board memory of 1 MB. Which of the following modes can the card not support?
1600 x 400 resolution with 256 colours on a 17-inch monitor
1600 x 400 resolution with 16 million colours on a 14-inch monitor
800 x 400 resolution with 16 million colours on a 17-inch monitor
800 x 800 resolution with 256 colours on a 14-inch monitor
Question 25 Explanation:
See question 3 of http://www.geeksforgeeks.org/operating-systems-set-1/
Consider the situation in which the disk read/write head is currently located at track 45 (of tracks 0-255) and moving in the positive direction. Assume that the following track requests have been made in this order: 40, 67, 11, 240, 87. What is the order in which optimised C-SCAN would service these requests and what is the total seek distance?
Question 26 Explanation:
Circular scanning works just like the elevator to some extent. It begins its scan toward the nearest end and works it way all the way to the end of the system. Once it hits the bottom or top it jumps to the other end and moves in the same direction. Keep in mind that the huge jump doesn't count as a head movement. Solution: Disk queue: 40, 67, 11, 240, 87 and disk is currently located at track 45.The order in which optimised C-SCAN would service these requests is shown by the following diagram. Total seek distance=(67-45)+(87-67)+(240-87)+(255-240)+(255-0)+(11-0)+(40-11) =22+20+153+15+255+11+29 =505 Option (C) is the correct answer.
Reference: http://www.cs.iit.edu/~cs561/cs450/disksched/disksched.html http://iete-elan.ac.in/SolQP/soln/DC14_sol.pdf This solution is contributed by Nitika Bansal
Reference: http://www.cs.iit.edu/~cs561/cs450/disksched/disksched.html http://iete-elan.ac.in/SolQP/soln/DC14_sol.pdf This solution is contributed by Nitika Bansal
Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W head is on track 50. The additional distance that will be traversed by the R/W head when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN (Elevator) algorithm (assuming that SCAN algorithm moves towards 100 when it starts execution) is _________ tracks
Question 27 Explanation:
In Shortest seek first (SSTF), closest request to the current position of the head, and then services that request next. In SCAN (or Elevator) algorithm, requests are serviced only in the current direction of arm movement until the arm reaches the edge of the disk. When this happens, the direction of the arm reverses, and the requests that were remaining in the opposite direction are serviced, and so on.
Given a disk with 100 tracks And Sequence 45, 20, 90, 10, 50, 60, 80, 25, 70. Initial position of the R/W head is on track 50. In SSTF, requests are served as following Next Served Distance Traveled 50 0 45 5 60 15 70 10 80 10 90 10 25 65 20 5 10 10 ----------------------------------- Total Dist = 130 If Simple SCAN is used, requests are served as following Next Served Distance Traveled 50 0 60 10 70 10 80 10 90 10 45 65 [disk arm goes to 100, then to 45] 25 20 20 5 10 10 ----------------------------------- Total Dist = 140 Extra Distance traveled in SSTF = 140 - 120 = -10If SCAN with LOOK is used, requests are served as following
Next Served Distance Traveled 50 0 60 10 70 10 80 10 90 10 45 45 [disk arm comes back from 90] 25 20 20 5 10 10 ----------------------------------- Total Dist = 120 Extra Distance traveled in SSTF = 130 - 120 = 10
Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per minute (RPM). It has 600 sectors per track and each sector can store 512 bytes of data. Consider a file stored in the disk. The file contains 2000 sectors. Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is _________.
Question 28 Explanation:
Seek time (given) = 4ms RPM = 10000 rotation in 1 min [60 sec] So, 1 rotation will be =60/10000 =6ms [rotation speed] Rotation latency= 1/2 * 6ms=3ms # To access a file, total time includes =seek time + rot. latency +transfer time TO calc. transfer time, find transfer rate Transfer rate = bytes on track /rotation speed so, transfer rate = 600*512/6ms =51200 B/ms transfer time= total bytes to be transferred/ transfer rate so, Transfer time =2000*512/51200 = 20ms Given as each sector requires seek tim + rot. latency = 4ms+3ms =7ms Total 2000 sector takes = 2000*7 ms =14000 ms To read entire file ,total time = 14000 + 20(transfer time) = 14020 ms
Consider a typical disk that rotates at 15000 rotations per minute (RPM) and has a transfer rate of 50 × 106 bytes/sec. If the average seek time of the disk is twice the average rotational delay and the controller’s transfer time is 10 times the disk transfer time, the average time (in milliseconds) to read or write a 512 byte sector of the disk is _____________
Question 29 Explanation:
Disk latency = Seek Time + Rotation Time + Transfer Time + Controller Overhead Seek Time? Depends no. tracks the arm moves and seek speed of disk Rotation Time? depends on rotational speed and how far the sector is from the head Transfer Time? depends on data rate (bandwidth) of disk (bit density) and the size of request Disk latency = Seek Time + Rotation Time + Transfer Time + Controller Overhead Average Rotational Time = (0.5)/(15000 / 60) = 2 miliseconds [On average half rotation is made] It is given that the average seek time is twice the average rotational delay So Avg. Seek Time = 2 * 2 = 4 miliseconds. Transfer Time = 512 / (50 × 106 bytes/sec) = 10.24 microseconds Given that controller time is 10 times the average transfer time Controller Overhead = 10 * 10.24 microseconds = 0.1 miliseconds Disk latency = Seek Time + Rotation Time + Transfer Time + Controller Overhead = 4 + 2 + 10.24 * 10-3 + 0.1 miliseconds = 6.1 milisecondsRefer http://cse.unl.edu/~jiang/cse430/Lecture%20Notes/reference-ppt-slides/Disk_Storage_Systems_2.ppt
Consider a disk queue with requests for I/O to blocks on cylinders 47, 38, 121, 191, 87, 11, 92, 10. The C-LOOK scheduling algorithm is used. The head is initially at cylinder number 63, moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199. The total head movement (in number of cylinders) incurred while servicing these requests is: Note : This question was asked as Numerical Answer Type.
Question 30 Explanation:
The head movement would be :
63 => 87 24 movements 87 => 92 5 movements 92 => 121 29 movements 121 => 191 70 movements 191 --> 10 0 movement 10 => 11 1 movement 11 => 38 27 movements 38 => 47 9 movementsTotal head movements = 165
Which of the following DMA transfer modes and interrupt handling mechanisms will enable the highest I/O band-width?
Transparent DMA and Polling interrupts
Cycle-stealing and Vectored interrupts
Block transfer and Vectored interrupts
Block transfer and Polling interrupts
There are 31 questions to complete.