Write C++ code that calculate the total distance (in cylinders) that the disk arm moves for the following disk-scheduling algorithms? Method 2 7 8. 10 12 13 Total FCPS 2150 2069 1212 2296 2800 544 1618 356 1523 4965 3681 13011 SSTP 2150 2069 2296 2800 3681 4965 1618 1523 1212 544 356 7586 SCAN 2150 2296 2800 3681 4965 4999 2069 1618 1523 1212 544 356 7492 C-SCAN 2150 2296 2800 3681 4965 4999 356 544 1212 1523 1618 2069 9917 LOOK 2150 2296 2800 3681 4965 2069 1618 1523 1212 544 356 7424 CLOOK 2150 2296 2800 4965 356 1523 1618 2069 3681 1212 9137 Notes • Follow the programming pattern that we used in the CPU scheduling coding, The requests and current head position must be generated randomly between 0 and 4,999. List all assumptions you made to implement the disk-scheduling algorithms.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Write C+ code that calculate the total distance (in cylinders) that the disk arm moves for
the following disk-scheduling algorithms?
Method
2
3
4
5
6.
8
9
10
12
13
Total
FCFS
2150
2069
1212
2296
2800
544
1618
356
1523
4965
3681
13011
SSTF
2150
2069
2296
2800
3681
4965
1618
1523
1212
544
356
7586
SCAN
2150
2296
2800
3681
4965
4999
2069
1618
1523
1212
544
356
7492
C-SCAN
2150
2296
2800
3681
4965
4999
356
544
1212
1523
1618
2069
9917
LOOK
2150
2296
2800
3681
4965
2069
1618
1523
1212
544
356
7424
C-LOOK
2150
2296
2800
3681
4965
356
544
1212
1523
1618
2069
9137
Notes
• Follow the programming pattern that we used in the CPU scheduling coding,
The requests and current head position must be generated randomly between 0
and 4,999.
List all assumptions you made to implement the disk-scheduling algorithms.
Transcribed Image Text:Write C+ code that calculate the total distance (in cylinders) that the disk arm moves for the following disk-scheduling algorithms? Method 2 3 4 5 6. 8 9 10 12 13 Total FCFS 2150 2069 1212 2296 2800 544 1618 356 1523 4965 3681 13011 SSTF 2150 2069 2296 2800 3681 4965 1618 1523 1212 544 356 7586 SCAN 2150 2296 2800 3681 4965 4999 2069 1618 1523 1212 544 356 7492 C-SCAN 2150 2296 2800 3681 4965 4999 356 544 1212 1523 1618 2069 9917 LOOK 2150 2296 2800 3681 4965 2069 1618 1523 1212 544 356 7424 C-LOOK 2150 2296 2800 3681 4965 356 544 1212 1523 1618 2069 9137 Notes • Follow the programming pattern that we used in the CPU scheduling coding, The requests and current head position must be generated randomly between 0 and 4,999. List all assumptions you made to implement the disk-scheduling algorithms.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY