
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a request at cylinder 2,150, and the previous request was at cylinder 1,805. The queue of pending requests, in FIFO order, is: 2,069, 1,212, 2,296, 2,800, 544, 1,618, 356, 1,523, 4,965, 3681 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
e. C-SCAN
f. C-LOOK
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 5. There are two parts of question 5 a. When can you apply the queue data structure to real-life? Given an example to explain it. b. Can the stack policy apply to a set of documents that wait for printing? The answer is yes or no? Submit P Type here to search Prt Scn W E Rarrow_forwardSubject: Operating Systemsarrow_forwardProblem 2. In Project 6 you are required to use pthreads condition variables and mutexes to synchronize accesses to shared variables in your priority queue implementation. Ben Bitdiddle wants to try (on his own) to do it using semaphores instead. As in Project 6, the “next" operation returns the highest-priority item in the queue; if the queue is empty, it blocks until the queue becomes non-empty. The “insert" operation places an item in the queue, and if the queue went from empty to non-empty, it signals any waiting threads. Ben's implementation uses a (global) semaphore to count the number of items in the queue, and uses the Bryant and O'Hallaron "P()" and "V()" wrapper functions (see text) to decrement and increment it. He declares a global sem_t list_size and initializes it with sem_init(&list_size,0,0). The global variable list_head points to the first item in the list and is initially NULL. a. In Ben's first attempt, the pq_next() function does this: P(list_size); // block until…arrow_forward
- Consider a hash table of capacity 5 that uses open addressing with linear probing. This hash table uses a hash function that takes the remainder when the hash code of a string is divided by the capacity of the hash table. (For example, "air" hashes 0.) The hashCode method has been overridden for strings, which simply returns 0 if a string begins with 'a', 1 if it begins with 'b', etc. /** Returns 0 if a String begins with 'a', 1 if it begins with 'b', etc. */ public int hashCode() { return this.charAt(0) - 'a'; } Assume that "apple", and "butter" have been inserted in this order into the hash table. "fig" is to be inserted into the hash table. (a) Which array slot/index should "fig" be placed? Answer: (b) What is the load factor after "fig" is inserted into the hash table? Answer:arrow_forwardIn §12.2 Lamport's Hash we mentioned the notion of using only 64 bits of the hash. At each stage, 128 bits are computed, 64 bits are thrown away, and the hash of the retained 64 bits is used in the next stage. The purpose of only using 64 bits is so that a human does not need to type as long a string. Assuming the person will still only type 64 bits, does it work if hashn does a hash of all 128 bits of hashn-1, but what the person actually transmits is 64 bits of the result?arrow_forwardAnswer the following questions about a scheduling system for assigning chefs to cooking slots. Within the system, every single chef and every single cooking slot is assigned an integer ID. These IDs start with 1 and increment by 1. That is, if there is a chef with ID equal to 6, there must be chefs with IDs equal to 1, 2, 3, 4 and 5. The same restriction applies to the cooking slot IDs. Note that any cooking slot not assigned a chef will be covered by Sara and her amazing cooking skills. \begin{enumerate} \item Consider the chefs with IDs ranging from $p$ to $q$ inclusive, where $p \leq q$, and consider the cooking slots with IDs ranging from $r$ to $s$ inclusive, where $r \leq s$. How many distinct functions for assigning these chefs to cooking slots are there? (The chefs are the domain and the cooking slots are the codomain.) \item Consider the chefs and cooking slots with IDs ranging from $p$ to $q$ inclusive, where $p \leq q$. How many distinct functions for assigning…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education