Thursday, 12 January 2017

python Shortest seek time

                               Shortest Seek time

it is one of type of  disk shedular which allow programm to execute in first come first out 
it execute shortest progamm first 


python code for Shortest Seek time(sstf)

>>> data=[5,3,6,8]
>>> a=len(data)
>>> b=sorted(set(data))[-a]
>>> c=(-1)*a+1
>>> d=sorted(set(data))[c]
>>> e=(-1)*a+2
>>> f=sorted(set(data))[e]
>>> g=(-1)*a+3
>>> h=sorted(set(data))[g]
>>> i=print(b,d,f,h)

3 5 6 8



No comments:

Post a Comment