Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Assignment 2 COMP 2320 --- 1st Semester, 2001-2002 Due: Tuesday, December 4 (5:00pm) 1. Consider the following page reference requests from a process: (60 marks) 30624300 30624770 534202 13942 43140624 30624300 30624770 534202 13943 13424 Given that SIX page frames are allocated for this process, and starting with SIX empty page frames, write a program to indicate the number of read and write page faults for each of the following replacement algorithms. i) FIFO replacement ii) LRU replacement iii) Clock replacement 2. Given a hard disk of 200 tracks (Track 0-199) with Track 0 being the innermost track. Write down the track numbers the disk head will travel for the following 5 disk scheduling algorithms with the following sequence of disk track requests: 103, 110, 95, 130, 143, 55, 50, 147, 40. The disk head has just finished a request at track 105 and is currently at track 100. For this exercise, which diskscheduling algorithm (FIFO, LIFO, SSTF, SCAN, C-SCAN) is most effective? (10 marks) 3. Given the following set of processes, sketch the run-time schedule according to each of the scheduling policy below: (30 marks) Process 1 2 3 4 5 i) ii) iii) iv) v) vi) Arrival Time 0 2 4 6 8 Service Time 3 6 4 6 3 Round Robin (Quantum = 1) Round Robin (Quantum = 2) Round Robin (Quantum = 3) Multiple Feedback Queues (Quantum = 1 for every queue) Multiple Feedback Queues (Quantum = 2 for every queue) Multiple Feedback Queues (Quantum = 2i where i = 0, 1, 2, 3, …) General note: These exercises are not meant to be hard, but to give you some practice on replacement policies, CPU and disk scheduling. I encourage group discussion but I discourage copying programs or assignments. So please don’t let me catch you. Good Luck on your Final Examination!!