{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cop4600-fa07-quiz3Solutions

# cop4600-fa07-quiz3Solutions - Answer i Starting from 35 the...

This preview shows pages 1–2. Sign up to view the full content.

COP4600 Operating Systems Solutions for Quiz 3 Prepared by Tuba Yavuz-Kahveci University of Florida [email protected] Student Information First Name: Last Name: UFID: Signature: Important note: There are 2 questions. Please read the questions carefully. Good luck! Questions 1. (3 pts) Assume that there are 50 cylinders (numbered 1 to 50) on a hard disk and that the cylinders are arranged consecutively based on cylinder numbers (i.e., cylinder i is next to cylinder i + 1). Find out the seek cost in terms of number of cylinders visited for the cylinder request set 2 , 13 , 29 , 37 , 48 , 50 using i) Shortest Seek First algorithm and ii) Elevator algorithm (assuming the direction is initially UP). Assume that the disk arm is initially at cylinder 35. Show the movement of the arm for each individual step for both cases.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Answer: i) Starting from 35, the order is: 37, 29, 13, 2, 48, 50, which gives 2 + 8 + 16 + 11 + 46 + 2 = 85 cylinders visited. ii) Starting from 35, the order is: 37, 48, 50, 29, 13, 2, which gives 2 + 11 + 2 + 21 + 16 + 11 = 63 cylinders visited. 2. (2 pts) Which data structure can potentially reduce the amount of disk arm motion if used for keeping the list of free blocks on a disk? Explain. Answer: Acceptable answers: bitmap, File Allocation Table (FAT), and linked lists (as long as keeps the size of the contiguous chunk of free blocks in each node). By the way, the linked list implementation that is discussed in the textbook in Section 6.3 Keeping Track of Free Blocks cannot guarantee ﬁnding contiguous free disk blocks). 2...
View Full Document

{[ snackBarMessage ]}