Page 269 - DCAP103_Principle of operating system
P. 269

Principles of Operating Systems



                   Notes            2.  In what situations would using memory as a RAM disk be more useful than using it as
                                      a disk cache?
                                    3.  None of the disk-scheduling disciplines, except FCFS, are truly fair (starvation may occur).
                                      (a)  Explain why this assertion is true.

                                      (b)  Describe a way to modify algorithms such as SCAN to ensure fairness.
                                      (c)  Explain why fairness is an important goal in a time-sharing system.

                                      (d)  Give three or more examples of circumstances in which it is important that the operating
                                         system be unfair in serving I/O requests.

                                    4.  Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4999. The drive is currently
                                      serving a request at cylinder 143, and the previous request was at cylinder 125. The queue
                                      of pending requests, in FIFO order, is

                                       86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130.
                                       Starting from the current head position, what is the total distance (in cylinders) that the
                                      disk arm moves to satisfy all the pending requests for each of the following disk-scheduling
                                      algorithms?
                                      (a)  FCFS
                                      (b)  SSTF

                                      (c)  SCAN

                                      (d)  LOOK
                                      (e)  C-SCAN
                                      (f)  C-LOOK

                                    5.  Write a Java program for disk scheduling using the SCAN and C-SCAN disk-scheduling
                                      algorithms.
                                    6.  Is  disk  scheduling,  other  than  FCFS  scheduling,  useful  in  a  single-user  environment?
                                      Explain your answer.
                                    7.  Compare  the  performance  of  C-SCAN  and  SCAN  scheduling,  assuming  a  uniform
                                      distribution of requests. Consider the average response time (the time between the arrival
                                      of a request and the completion of that request’s service), the variation in response time,
                                      and the effective bandwidth. How does performance depend on the relative sizes of seek
                                      time and rotational latency?

                                    8.  Why is rotational latency usually not considered in disk scheduling? How would you
                                      modify SSTF, SCAN, and C-SCAN to include latency optimization?

                                    9.  Why is it important to balance file system I/O among the disks and controllers on a system
                                      in a multitasking environment?
                                   10.  Is there any way to implement truly stable storage? Explain your answer.
                                   11.  Discuss the relative advantages and disadvantages of sector sparing and sector slipping.







        262                               LOVELY PROFESSIONAL UNIVERSITY
   264   265   266   267   268   269   270   271   272   273   274