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
maria [59]
3 years ago
6

Disk requests come in to the disk driver for cylinders 10, 22, 20, 2, 40, 6, and 38, in that order. A seek takes 6 msec per cyli

nder moved. The arm is initially at cylinder 20.
How much seek time is needed if


a) FCFS


b) SSTF


c) SCAN (elevator)


algorithm is employed?
Computers and Technology
1 answer:
oksano4ka [1.4K]3 years ago
6 0

Answer:

For  FCFS = 876msec For SSTF = 360msec For SCAN(elevator) = 348msec

Explanation:

Considering FCFS algorithm.

In FCFS, the requests are addressed in the order they arrive in the disk queue, this means that the number of cylinders traveled becomes equal to the total of disk requests. With the arm initially at 20, the first request is to read cylinder 10.

Therefore the cylinders traversed for the first request = 20 – 10 = 10  

For the second request i.e. a movement from cylinder 10 to cylinder 22, the number of cylinders traversed is = 22 - 10 = 12.

Similarly, for the third request seek arm will return to 20 from 22 so, cylinders traversed through would be = 22-20 = 2.    

Also for the fourth request, cylinders traversed would be = 20 – 2 = 18.

For the fifth request, cylinders traversed = 40 – 2 = 38.

Now for the sixth request cylinders traversed = 40 – 6 = 34.

For the seventh and last request, cylinders traversed = 38 – 6 = 32.

So now to get the how much seek time is required for Disk scheduling algorithm  

First we would add the total cylinders traversed = 10 + 12 + 2+ 18+ 38 + 34 + 32

     = 146 cylinders  

So therefore the total seek time = number of cylinders traversed X seek time per cylinder

               = 146 X 6

   = 876msec

Considering SSTF algorithm.

In SSTF (Shortest Seek Time First), requests having shortest seek time are executed first. So, the seek time of every request is calculated in advance in the queue and then they are scheduled according to their calculated seek time. What this means is that the closest disk (cylinder) next to the position of the seek arm is attended to first. With   the arm at 20 initially, the first request is to read cylinder 22 (i.e. the closest cylinder to the seek arm)

Therefore the cylinders traversed for the first request = 22-20 = 2

For the second request, the disk to focus on is disk 20 and the cylinders traversed = 22-20 = 2

Similarly for the third request the seek arm will move to 10 from 20 so, cylinder traversed = 20-10 =10

For fourth request, cylinder traversed = 10 – 6 = 4

For the fifth request, cylinder traversed = 6 – 2 = 4

For sixth request, since all other disk request closer to it has been attended to the seek arm will move to disk 38 to attend to that disk request So, the cylinder traversed = 38 – 2 = 36

For the last request, cylinder traversed = 40 -38 = 2

So now to get the how much seek time is required for Disk scheduling algorithm  

First we would add the total cylinders traversed = 2 + 2 +10 + 4 + 4 + 36 + 2  

     = 60 cylinders

So therefore the total seek time = number of cylinders traversed X seek time per cylinder

     = 60 X 6 = 360msec

From Here we see that SSTF is better or an improvement to FCFS as it decrease the average response time (Average Response time is the response time of the all requests).

Considering SCAN (elevator) algorithm  

In SCAN algorithm the disk arm moves into a particular direction and services the requests coming in its path and after reaching the end of disk, it reverses its direction and again services the request arriving in its path. So, this algorithm works as an elevator and hence also known as elevator algorithm. Therefore the number of cylinder traveled becomes equal to the total of disk request. With the arm at 20 initially

The first request is to read cylinder 22 i.e. the first cylinder on the upward movement  

Therefore the cylinders traversed would be  =   20 – 22 = 2

For the second request is to read cylinder 38, and the cylinders traversed would be   = 38 – 22 =16

For the third request, seek arm will move to 40 So, the cylinders traversed would be = 40 – 38 = 2

For the fourth request, seek arm will return to 20 since from 40 since 40 is the highest in this upward elevator movement So, cylinders traversed would be = 40 -20 = 20  

For the fifth request, cylinder traversed would be = 20 – 10 = 10

For the sixth request, cylinder traversed would be   = 10 – 6 = 4

For the seventh and last request, cylinder traversed = 6 – 2 = 4

So now to get the how much seek time is required for Disk scheduling algorithm  

First we would add the total cylinders traversed = 2 + 16 + 2 + 20 +10+ 4 + 4 = 58 cylinders

So therefore the total seek time = number of cylinders traversed X seek time per cylinder

   = 58 X 6

          = 348msec

From Here we see that SCAN is better or an improvement to FCFS and SSTF as it decrease the average response time (Average Response time is the response time of the all requests).

You might be interested in
Certain files, such as the ____ and Security log in Windows, might lose essential network activity records if power is terminate
Hoochie [10]

Answer:

The answer to this question is a. Event log

Explanation:

Event log in Windows is a comprehensive record of security,system and application notifications stored by the Windows and it is used by administrators to determine problems in the system and foretell issues that going to happen in future.

Operating system and the Apps use event logs to keep account of important software and hardware activity that administrator can use to correct issues with the operating system.

7 0
3 years ago
**NEED HELP??!! Computer Science Questions!! KNOWING GIMP!!!!
Svetlanka [38]
<span>1. If my memory serves me well,  the answer is true. Free select tool is also called lasso and it’s used to free-hand selection. You can also combine free select tool segments with polygonal segments or other shapes.

2. I think this statement is definitely “False”. As I’ve mentioned before you can combine free selection with other selection features like polygonal by using anchors.

3. I’m not 100% sure, but I guess this one is true. As far as I remember, add to selection mode lets you to add new selection to any existing areas. So I think it’s possible to add selection to the existing one.

4. I think this one is also true. But it allows you just paint it, but it’s also kinda modification. Quick Mask allows you to isolate subject and paint selected object. It helps you not to brush subject accidentally. It’s a very useful tool as for me.

5. Yes, this statement is 100% true. But it could be gray for GIMP, because the mask is coded in gray tones, but I think that black is also gray tone. Color black or gray removes part of selection, and color white adds area to existing selection.

6. According to what I’ve mentioned before this one is also true, so there’s no need for additional explanation.

7. Another tool, similar to the Lasso/Free Select tool is the B) Scissors Tool. As there was mentioned intelligent scissors tool is almost the same as lasso but more user-friendly.

8. It’s false. You must click to the first point of your selection to finish the process or you will lose your selection.

9. I think this one is true. Paths tool includes two or more line segments connected by handle points. These points are kinda anchors I guess.

10. After making a selection using the Paths Tool, I must select the the D) Selection from Path button to turn my path into a selection. You can find it in path tool options.

11. Yes, it’s true, it allows you to make complex selections with curved or straight lines. Just drag one of the anchors to curve the line. Also you can create different geometrical figures with this tool.

12. Yes this is true. But there are much more cool blur filters than only Gaussian blur. Experiment on your own.

13. You can do all of the following given above. Every layer is kinda isolated image and you can modify it however you want.
<span>
14. I’m definitely sure that this statement is true. Just find layer drop down menu and follow the instructions given in this question. It’s simple.</span></span>
8 0
3 years ago
Which of the following is another name for cinematographers? (Select all that apply). lighting specialists production manager di
JulijaS [17]

Answer:

camera operators

directors of photography

Explanation:

Cinematography is simply the art of taking photos and being in charge of cameras in the process of film-making.

There are alternative names for a cinematographer and they include camera operators and directors of photography

3 0
3 years ago
Write a program that prints the following 45 pairs of numbers:
sattari [20]

Answer:

  • Code is in JAVA language. As there is no user input the logic is straightforward.
  • Below is the code along with a detailed explanation of the logic.
  • The class name is Print main save as file as the main class.

Explanation:

Program:-

public class Main{

public static void main(String args[]){

/* There are two for loops...

* First for loop runs from i=1 to i=9

* Second for loop runs from j=1 to j=i.

*

*/

for(int i=1;i<=9;i++){

for(int j=1;j<=i;j++){ // j loop runs from j=1 to j=i

/*Prints I and j next to each other*/

System.out.println(i+""+j);

}//for loop of j ends here

}// for loop of I ends here

}

}

6 0
3 years ago
Successful Web sites such as StumbleUpon ( www.stumbleupon) and Digg ( www.digg) use ____ by inviting their visitors to vote on
aliina [53]

Answer:

"Crowdsourcing" is the correct answer for the above question.

Explanation:

  • Crowdsourcing is a term from which any organization advertises the thinks or can get the ideas or solutions for any particular problem.
  • It is a term that refers to the problem to the number of solvers to achieve the result correct and frequent.
  • For example, If anyone wants to prepare the two websites. Then he assigns the works to the number of people and the works done faster with the help of this.
  • The above question states that some websites can be successful with the help of the type of work. They are successful with the help of crowdsourced work. Because it saves time. So the answer is Crowdsourcing.
3 0
3 years ago
Other questions:
  • What is the type of account and normal balance of allowance for uncollectible accounts?
    13·2 answers
  • What is the purpose of lookup tables in spreadsheet software
    13·2 answers
  • Write a program that prints the day number of the year, given the date in the form month-day-year. For example, if the input is
    9·1 answer
  • To prepare a data character for transmission, a ____ bit is added to the beginning of the character and informs the receiver tha
    11·1 answer
  • What formula would you enter to add the values in cells b4, b5, and b6?
    10·1 answer
  • If a user inserts a piece of clip art over some text but does not want the art to block the text, the user should select
    14·2 answers
  • In general, the farther you are from other road users, the A. lower your crash risk B.higher your crash risk C. slower they are
    6·1 answer
  • COMPUTER CODING
    5·1 answer
  • Write a method that returns a version of the given array where all the 10's have been removed. The remaining elements should shi
    9·1 answer
  • Today, scientists agree that good research is ethical in nature and is guided by basic respect for human dignity and safety. How
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!