Menu

4 Suppose Disk Drive 5000 Cylinders Mumbered 0 4999 Drive Cylinder 12s Queue Pending Reque Q43791595

4. Suppose that a disk drive has 5000 cylinders, mumbered 0 to 4999. The drive is cylinder 12S. The queue of pending requests4. Suppose that a disk drive has 5000 cylinders, mumbered 0 to 4999. The drive is cylinder 12S. The queue of pending requests, in FIF0 order, is 86, 1470, 913, Starting from the current head position, what is the total distance (in cylinders) currently serving a request at eylinder 143, and the previous request was at 1774, 948, 1509, 1022, 175o, 130 that the disk arm moves to satisfy all the pending requests, for each of the following disk-scheduling algorithms? [10points] a. FCFS b. SSTF c. SCAN 5. Using the program shown in the following figure, explain what the output will be at lines X and Y. include <sys/types.b include atdio.b> inelude <cueistd.h> adefine SIZE 5 (0,1,2.4): int nums (SIZE] – int main() IT aur pid.t pid: pid – fork(): if (pid 0) ( for (i = 0; i < SIZE; i++) ( nuns (i] -i: printf (“CHILD: A “,nuns L1)): LINE X/ else if (pid > 0) wait (NULL); for (i 0; i < SIZE; i++) printf(“PARENT: %d “,nuns(i]); / LINE Y / return 0; Show transcribed image text 4. Suppose that a disk drive has 5000 cylinders, mumbered 0 to 4999. The drive is cylinder 12S. The queue of pending requests, in FIF0 order, is 86, 1470, 913, Starting from the current head position, what is the total distance (in cylinders) currently serving a request at eylinder 143, and the previous request was at 1774, 948, 1509, 1022, 175o, 130 that the disk arm moves to satisfy all the pending requests, for each of the following disk-scheduling algorithms? [10points] a. FCFS b. SSTF c. SCAN 5. Using the program shown in the following figure, explain what the output will be at lines X and Y. include inelude adefine SIZE 5 (0,1,2.4): int nums (SIZE] – int main() IT aur pid.t pid: pid – fork(): if (pid 0) ( for (i = 0; i 0) wait (NULL); for (i 0; i

Expert Answer


Answer to 4. Suppose that a disk drive has 5000 cylinders, mumbered 0 to 4999. The drive is cylinder 12S. The queue of pending req…

OR