Skip to content

Instantly share code, notes, and snippets.

@codeAshu
Created October 8, 2013 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeAshu/6884217 to your computer and use it in GitHub Desktop.
Save codeAshu/6884217 to your computer and use it in GitHub Desktop.
Anusha Start working on following functions. In every function we are taking trackInput as string containing trackno separated by comma. First write a utility function to convert them to an integer array then calculate the seek time. or any other way you are comfertable with. return seekTime of each algorithm.
//utility method to return an array from comma separated string
//it will convert all trackInput into arrays.
private int seekLOOK(String trackInput, int startPoint) {
// TODO Auto-generated method stub
return 0;
}
private int seekC_SCAN(String trackInput, int startPoint) {
// TODO Auto-generated method stub
return 0;
}
private int seekSCAN(String trackInput, int startPoint) {
// TODO Auto-generated method stub
return 0;
}
private int seekSSTF(String trackInput, int startPoint) {
// TODO Auto-generated method stub
return 0;
}
private int seekCLOOK(String trackInput, int startPoint) {
// TODO Auto-generated method stub
return 0;
}
public int seekFCFS(String trackInput, int startPoint) {
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment