Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A disk has 200 tracks (numbered 0 through 199... Start Learning for Free
A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)
  • a)
    2 and 3
  • b)
    3 and 3
  • c)
    3 and 4
  • d)
    4 and 4
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
A disk has 200 tracks (numbered 0 through 199). At a given time, it wa...
According to Shortest Seek Time First: 90→ 120→ 115-→110→ 130→ 80→ 70→ 30→ 25→ 20 Change of direction(Total 3);  120→15; 110→130; 130→80 According to First Come First Serve: 90→ 120→ 30→ 70→ 115→ 130→ 110→ 80→ 20→ 25 Change of direction(Total 4);  120→30; 30→70; 130→110;20→25 Therefore,Answer is C
View all questions of this test
Most Upvoted Answer
A disk has 200 tracks (numbered 0 through 199). At a given time, it wa...
Explanation:

To find the number of times the head changes its direction for the disk scheduling policies SSTF (Shortest Seek Time First) and FCFS (First Come First Serve), we need to simulate the movement of the head across the disk tracks based on the given requests.

FCFS (First Come First Serve)
In FCFS, the head moves to the next requested track in the order of their arrival.

- Initially, the head is at track 120.
- The first request is for track 30, so the head moves from 120 to 30 (90 tracks).
- The next request is for track 70, so the head moves from 30 to 70 (40 tracks).
- The next request is for track 115, so the head moves from 70 to 115 (45 tracks).
- The next request is for track 130, so the head moves from 115 to 130 (15 tracks).
- The next request is for track 110, so the head moves from 130 to 110 (20 tracks).
- The next request is for track 80, so the head moves from 110 to 80 (30 tracks).
- The next request is for track 20, so the head moves from 80 to 20 (60 tracks).
- The last request is for track 25, so the head moves from 20 to 25 (5 tracks).

The head changes its direction whenever it reaches the end or beginning of the disk. It changes its direction a total of 3 times in FCFS.

SSTF (Shortest Seek Time First)
In SSTF, the head moves to the track with the shortest seek time from its current position.

- Initially, the head is at track 120.
- The shortest seek time from 120 is to track 115 (5 tracks).
- The next shortest seek time from 115 is to track 110 (5 tracks).
- The next shortest seek time from 110 is to track 80 (30 tracks).
- The next shortest seek time from 80 is to track 70 (10 tracks).
- The next shortest seek time from 70 is to track 30 (40 tracks).
- The next shortest seek time from 30 is to track 20 (10 tracks).
- The next shortest seek time from 20 is to track 25 (5 tracks).
- The last request is for track 130, so the head moves from 25 to 130 (105 tracks).

The head changes its direction whenever it reaches the end or beginning of the disk. It changes its direction a total of 3 times in SSTF.

Therefore, the correct answer is option C, 3 times for SSTF and 4 times for FCFS.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)a)2 and 3b)3 and 3c)3 and 4d)4 and 4Correct answer is option 'C'. Can you explain this answer?
Question Description
A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)a)2 and 3b)3 and 3c)3 and 4d)4 and 4Correct answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)a)2 and 3b)3 and 3c)3 and 4d)4 and 4Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)a)2 and 3b)3 and 3c)3 and 4d)4 and 4Correct answer is option 'C'. Can you explain this answer?.
Solutions for A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)a)2 and 3b)3 and 3c)3 and 4d)4 and 4Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)a)2 and 3b)3 and 3c)3 and 4d)4 and 4Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)a)2 and 3b)3 and 3c)3 and 4d)4 and 4Correct answer is option 'C'. Can you explain this answer?, a detailed solution for A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)a)2 and 3b)3 and 3c)3 and 4d)4 and 4Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)a)2 and 3b)3 and 3c)3 and 4d)4 and 4Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers. 30 70 115 130 110 80 20 25. How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come Fist Serve)a)2 and 3b)3 and 3c)3 and 4d)4 and 4Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev