1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ahat [919]
3 years ago
8

Suppose that a disk drive has 2,000 cylinders numbered 0 to 1999. The drive is currently serving a request at cylinder 142, 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 the following disk scheduling algorithm Scan
Computers and Technology
1 answer:
BlackZzzverrR [31]3 years ago
5 0

Answer:

7080

Explanation:

Let totaldistanceincylinders (total seek distance)=x=0

Its  

     142-86=56                  x=56

      1470-86=1384                      x= 56+ 1384=1440

      1470-913= 557             x= 1440+557= 1997

      1774-913=861                    x= 1997+ 861=2858

      1774-948= 826              x=2858+826=3684

      1509-948=561             x=3684+561=4245

      1509-1022=    487        x=4245+487=4732

      1750-1022=728          x=4732+728=5460

      1750-130=1620          x=5460+1620=7080

       hence, total distance in cylinders = 7080

This is the total seek distance.

             

   

You might be interested in
Write the following function without using the C++ string class or any functions in the standard library, including strlen(). Yo
dolphi86 [110]

Answer:

The function in C++ is as follows

int chkInd(string str1, string str2){    

int lenstr1=0;

while(str1[lenstr1] != '\0'){  lenstr1++;  }

int index = 0; int retIndex=0;

for(int i=lenstr1-1;i>=0; i--){

   while (str2[index] != '\0'){

       if (str1[i] == str2[index]){

           retIndex=1;

           break;         }

       else{   retIndex=0;      }

  index++;    }

  if (retIndex == 0){   return i;   }else{return -1;}}

}

Explanation:

This defines the function

int chkInd(string str1, string str2){    

First, the length of str1 is initialized to 0

int lenstr1=0;

The following loop then calculates the length of str1

while(str1[lenstr1] != '\0'){  lenstr1++;  }

This initializes the current index and the returned index to 0

int index = 0; int retIndex=0;

This iterates through str1

for(int i=lenstr1-1;i>=0; i--){

This loop is repeated while there are characters in str2

   while (str2[index] != '\0'){

If current element of str2 and str1 are the same

       if (str1[i] == str2[index]){

Set the returned index to 1

           retIndex=1;

Then exit the loop

           break;         }

If otherwise, set the returned index to 0

       else{   retIndex=0;      }

Increase index by 1

  index++;    }

This returns the calculated returned index; if no matching is found, it returns -1

  if (retIndex == 0){   return i;   }else{return -1;}}

}

4 0
3 years ago
In the 2007/2010 version of Paint, which of the following tools are located in the View tab? (Select all that apply.)
zaharov [31]
The answers are full screen and gridlines.
7 0
4 years ago
100 POINTS PLEASE HELP
Oksana_A [137]

Answer:

hope this helped ,do consider giving brainliest

Explanation:

import numpy as np

#PrintArray Function

def printArray(array):

for i in range(len(array)):

for j in range(len(array[i])):

print(array[i][j], end= " ")

print()

#Flip horizontal function

def flipHorizontal(array):

#reversing the order of arrays

array2 = np.fliplr(array).copy() printArray(array2)

#Flip Vertical function

def flipVertical(array):

#Preserving the order of array and reversing each array.

array3 = np.flipud(array).copy() printArray(array3)

#Main() function def main():

array = [[0,2,0,0,0],[0,2,0,0,0],[0,2,2,0,0],[0,2,0,2,0],[0,2,0,0,2]]

print("The array: \n")

printArray(array)

print("\nFlipped horizontally: \n") flipHorizontal(array)

print("\nFlipped vertically: \n") flipVertical(array)

if __name__=="__main__":

main()Explanation:

6 0
2 years ago
Read 2 more answers
The ipv6 address fields are 128 bits long, and as such there is no need to extend ip addressing by using either dhcp or nat (i.e
Minchanka [31]

Answer:

True

Explanation:

according to coursehero it's true

6 0
2 years ago
What do the Sikh people wear on their head?
Mama L [17]

Answer:

Explanation:

It is called "Turban"

Sikhs wear the turban, to take care of the hair, promote equality, and preserve the Sikh identity

4 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that estimates the approximate number of times the user’s heart has beat in his/her lifetime using an average he
    12·1 answer
  • Sara is writing a program to input her monthly phone bills and output the month name and amount for the month with maximum amoun
    7·1 answer
  • Reading is the process of transferring data, instructions, and information from memory to a storage medium.
    15·1 answer
  • R15. Suppose there are three routers between a source host and a destination host. Ignoring fragmentation, an IP datagram sent f
    8·1 answer
  • What is the key value proposition of Google Search campaigns?A. Appear as a text ad, a video ad, or a banner ad on one of Google
    13·1 answer
  • A computer’s BIOS is defined as the
    12·2 answers
  • Which examples are relevant sources for students to use in research?
    6·1 answer
  • Sistema binario, realizar el pasaje de binario a decimal; 00110011 11101100 11100001 11001100 10010101 11001111 10000001 1000110
    14·1 answer
  • Write a function called middle(string str) that returns a string containing the middle character in str if the length of str is
    10·1 answer
  • when inputting a formula into excel or other spreadsheet software, what components are required for the formula to function prop
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!