in Operating System edited by
16,864 views
56 votes
56 votes

Consider an operating system capable of loading and executing a single sequential user process at a time. The disk head scheduling algorithm used is First Come First Served (FCFS). If FCFS is replaced by Shortest Seek Time First (SSTF), claimed by the vendor to give $50 \%$ better benchmark results, what is the expected improvement in the I/O performance of user programs?

  1. $50 \%$
  2. $40\%$
  3. $25\%$
  4. $0\%$
in Operating System edited by
16.9k views

3 Comments

Please help me to understand the question
1
1
@arjun sir if they mention in question multi user process at a time then what is answer how it improves the Io performances of user pgm
6
6
what is benchmark result?
1
1

4 Answers

92 votes
92 votes
Best answer
Question says "single sequential user process". So, all the requests to disk scheduler will be in sequence and each one will be blocking the execution and hence there is no use of any disk scheduling algorithm. Any disk scheduling algorithm gives the same input sequence and hence the improvement will be $0\%$ for SSTF over FCFS.

Correct Answer: $D$
edited by
by

19 Comments

Had it not been mentioned "single sequential user process" then what would have been the answer ? Please help me understanding the concept
8
8
@Arjun sir is "single sequential user processes" same as "single processor system"?
8
8

@Akhil Then we can believe the vendor and chose answer as A. (Of course then this would not have been asked in exam)

@Srestha No, they are not the same. Because "single processor system" can also be multi threaded. That is even if only a single process is executing different part of the same process might be run in parallel. So, some of these threads can generate disk requests paralelly. But if the process is also sequential, then only one request will be live at any time. (the request should be blocking) and hence there is no need of a scheduling algorithm.

89
89
Since sequentially one-by-one user processes will come to the disk scheduler so they will be scheduled in FCFS order even if the scheduler uses SSTF algo. Thus 0% improvement.

Is my understanding correct?
15
15
If the disk scheduler had known all the disk requests priori then it could have scheduled the order of servicing the requests. That is, for FCFS it would service in the same order as the requests came. For SSTF the disk header services the request which is closest to the current one(in other words where the header movement will take the shortest time to reach).

In this current scenario, the disk scheduler doesn't know what is the next request(as they come one by one after each request gets served) so it can't manipulate the movement of the header and therefore has to move as per the order of incoming requests.

This was my understanding. Correct me if I am wrong.
51
51
@tuhin seems right :)

so sequential is the catch here ?

what if it was just single user process?
1
1

@arjunsir please check my procedure, correct or not ..??

one is for FCFS and another is for SSTF ..!

5
5

  according to you all the algorithm will work same. Am i correct?

0
0

@flash12 Yes..don't you think so..?

0
0

@MiNiPanda sir

here I/O performance =io access time?

so vendor claims SSTF better for particular instance whereas user program may or may not agree with such request of pattern so performance can not be measured with the argument.

am i right? 

1
1

@MiNiPanda

Even if the disk scheduler knows the requests in advance, if they are sequential like 2,3,5,6,7,10,14....

both FCFS and SSTF will choose same requests each time.

Isn't?

0
0

@sushmita Yes if the header is positioned before cylinder 2.

@Abhisek Tiwari 4 Yes i think you are right :)

1
1
If we remove the term single sequential  user process and there is ordering of process given then what will answer,I mean what will be approach in this case????
0
0

@Arjun Sir,can we consider OS having "single sequential user process" capability same as that of Batch OS?

0
0

So, there will no effect of Scheduling Algorithm, the performance will be same irrespective of what algorithm we use, because we will not be able to schedule future IO requests.

Have I understood correct?

 

Thank you!

1
1

@ , No. In the question, it's clearly mentioned that by replacing the FCFS with SSTF GIVEN  50% better benchmark results. So don't you think before making such a claim he(Vendor) must have done many experiments? So yes sometimes user program won't generate a pattern which justifies the claim, but most of the time genereted pattern would favour SSTF. Still, if I'm missing something then please enlighten me. 

0
0

can anyone explain why they have mentioned “claimed by the vendor to give 50% better benchmark results”, when it is mentioned that there is 50% improvement then why are we not considering it

0
0
@Abhineet

Because benchmark and real world performance is different. In the real world we have single sequential user process system. The vendor might have some different benchmark.
0
0
reshown by
A benchmark is a single program, so it can be assumed that the test has several random memory accesses. Also, “sequential user process” does not imply “sequential memory access” – a process can make random requests. Considering an equal number of CPU bound and IO bound processes in the real world by the user, it can be said that IO bound processes make several random reads, similar to the benchmark, and therefore see a 50% improvement, while CPU bound processes don’t see any improvement. So wouldn’t the overall improvement in IO be the average, i.e., 25%.
0
0
1 vote
1 vote
D) 0%

In a single-user environment, the I/O queue usually is empty. Requests generally arrive from a single process for one block or for a sequence of consecutive blocks. In these cases, FCFS is an economical method of disk scheduling since OS can execute a single sequential user process at a time, the disk is accessed in FCFS manner always. The OS never has a choice to pick an IO from multiple IOs as there is always one IO at a time.
1 vote
1 vote

 

  • From the statement  “capable of loading and executing a single sequential user process at a time”, its clear that only one request can be at the disk device queue. 
  • If there is just a single request at the device queue, then it doesn’t matter which disk scheduling we use (FCFS or SSTF). 
  • There is just a single request, and data transfer time is not dependent on FCFS or SSTF once we reach the right sector for reading a sector. The seek time and rotational time should be same for FCFS or SSTF for that single request, from the previous postion of the read/write head.



So, in this scenario, using SSTF algorithm, which gives 50% better results, will not improve any performance over FCFS algorithm.

Thus, option [D] is right.


Note that, whether FCFS or SSTF algorithm is to be used is OS design choice (as OS schedules the submitted requests to be served in some order as per the underlying disk scheduling algorithm), and time to read/write a sector is a hardware property (as it is based on rotation speed of disk device which can’t be changed)

0 votes
0 votes
The scheduling algorithms like FCFS,SSTF doesn't affect the I/O performance. Rather these are CPU scheduling algorithms hence affects the CPU performance and not the I/O performance.So the correct option would be (d)0%
edited by
Answer:

Related questions