Do not forget to write your name University roll no in first page of your sheet and do sign each and every page. Code will be handwritten and must contain output screenshot.
Q1 Write a c Program code for Worst Fit Memory management Scheme.
INPUT
Enter the number of blocks: 3
Enter the number of files: 2
Enter the size of the blocks:- Block 1: 5, Block 2: 2, Block 3: 7
Enter the size of the files:- File 1: 1, File 2: 4
Q2 Suppose that a disk drive has 100 cylinders numbered 0 to 99. The drive is currently serving a request at cylinder 24. The queue of pending requests in SCAN order is- 12, 26, 24, 4, 42, 8 and 50. Starting from the current head position, Write a C program to Implement SCAN Disk Scheduling Algorithm and calculate the total distance that the disk arm moves.