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
four quantum numbers that could represent the last electron added (using the Aufbau principle) to the Argon atom. A n = 2, l =0,
marshall27 [118]

Answer:

  • n = 3
  • l  = 1
  • m_l = 1
  • m_s=+1/2

Explanation:

Argon atom has atomic number 18. Then, it has 18 protons and 18 electrons.

To determine the quantum numbers you must do the electron configuration.

Aufbau's principle is a mnemonic rule to remember the rank of the orbitals in increasing order of energy.

The rank of energy is:

1s < 2s < 2p < 3s < 3p < 4s < 3d < 4p < 5s < 4d < 5p < 6s < 4f < 5d < 6p < 7s < 5f < 6d < 7d

You must fill the orbitals in order until you have 18 electrons:

  • 1s² 2s² 2p⁶ 3s² 3p⁶   : 2 + 2 + 6 + 2 + 6 = 18 electrons.

The last electron is in the 3p orbital.

The quantum numbers associated with the 3p orbitals are:

  • n = 3

  • l = 1 (orbitals s correspond to l = 0, orbitals p correspond to l  = 1, orbitals d, correspond to l  = 2 , and orbitals f correspond to  l = 3)

  • m_l can be -1, 0, or 1 (from - l  to + l )

  • the fourth quantum number, the spin can be +1/2 or -1/2

Thus, the six possibilities for the last six electrons are:

  • (3, 1, -1 +1/2)
  • (3, 1, -1, -1/2)
  • (3, 1, 0, +1/2)
  • (3, 1, 0, -1/2)
  • (3, 1, 1, +1/2)
  • (3, 1, 1, -1/2)

Hence, the correct choice is:

  • n = 3
  • l  = 1
  • m_l = 1
  • m_s=+1/2
5 0
3 years ago
PLEASE ASAP!!
Vera_Pavlovna [14]
The answers true hope this helped :)
8 0
2 years ago
Read 2 more answers
In the following cell, we've loaded the text of Pride and Prejudice by Jane Austen, split it into individual words, and stored t
Sever21 [200]

Answer:

Explanation:

Since the array is not provided, I created a Python function that takes in the array and loops through it counting all of the words that are longer than 5. Then it returns the variable longer_than_five. To test this function I created an array of words based on the synapse of Pride and Prejudice. The output can be seen in the attached picture below.

def countWords(p_and_p_words):

   longer_than_five = 0

   for word in p_and_p_words:

       if len(word) > 5:

           longer_than_five += 1

   return longer_than_five

7 0
2 years ago
Access-lists pose a logical problem which often has more than one solution. Can you think of a different set of rules or placeme
Maksim231197 [3]

Answer:

Question is incomplete. it needs a topology diagram and also it needs Router R1 table. I assume User has access to the topology and Routing table.

Below Configuration will help to fix ACL problem

Hosts from the 172.16.0.0/16 network should have full access to Server1, Server2 and Server3 but this is not currently the case, as L1 can’t communicate to Server2 or Server3.

Explanation:

Following Configuration on Cisco Router R1 will help to fix all the ACL problems.

enable

configure terminal

no ip access-list standard FROM_10

ip access-list standard FROM_10

deny host 10.0.0.2

permit any

exit

!

no ip access-list standard FROM_172

ip access-list standard FROM_172

permit host 172.16.0.2

exit

!

interface GigabitEthernet0/0

ip access-group FROM_192 out

end

write memory

!

7 0
3 years ago
The responsibilities of the IT department and the needs of the user departments may cause conflicts over A. the color of the use
monitta

I'd say B: the amount and type of security placed on an application.

This is a common problem that exists between IT and other user departments. The IT department is well known for closing up certain sites and applications needed by other departments all in the name of security. As a result, it might slow down operations within different department and may cause inefficiency.

4 0
3 years ago
Other questions:
  • Need answers for 11&amp;12. Due today. Thanks.
    14·1 answer
  • ______ is the software that blocks a user from being able to access your computer.
    9·1 answer
  • Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)int[] a = {1, 3, 7, 0, 0,
    6·1 answer
  • Category 6 is an example of a ________ used to connect wired network devices.
    9·1 answer
  • Windows server 2008 supports three versions of certificate templates. what version or versions of templates can be issued only f
    13·1 answer
  • Angela works for an identity protection company that maintains large amounts of sensitive customer information such as usernames
    14·1 answer
  • An administrator is helping a user connect a smartphone to a tablet via Bluetooth. What should the administrator do first?
    6·1 answer
  • Please help!! I attached an image with the questions.
    7·1 answer
  • Choices.
    11·1 answer
  • What is a case in programming​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!