Sei sulla pagina 1di 20

WEEK–10

(DISKSCHEDULINGALGORITHMSANDSOCKETS)
Prerequisite:
● Completeideaonverysimplefilesystems.
● Briefideaondiskschedulingalgorithms
● ShouldhavethebasicideaonLinuxinodes{includednewly}

Pre-LabTask:

1.Writethecontentsofext2inode,inodeTable

2.Writefunctionprototypesforthefolowingsystemcals
1. accept():-
2. bind():-
3. connect():-
4. cntl():-
5. getpeername():-
6. getsockname():-
7. getsockopt():-
8. ioctl():-
9. listen():-
10.read():-
11.recv():-
12.select():-
13.send():-
14.shutdown():-
15.socketpair():-
16.write():-

1
3)Afilesystemisthemethodsanddatastructuresthatanoperatingsystemusestokeeptrackof
filesonadiskorpartition;thatis,thewaythefilesareorganizedonthedisk.Thewordisalsoused
torefertoapartitionordiskthatisusedtostorethefilesorthetypeofthefilesystem.Nowwritea
codeforverysimplefilesystem.

InLabTask:
StepsoftheProgram:
•OpentheTerminal.
•Then,youcanseetheloggedinuserwiththe$symbolnexttotheusername.
•$meansyouareloggedinasaregularuserandthe#meansyouarerootuser.

1.DemonstrateI/ODiskSchedulingAlgorithmsusingQueueDataStructureusingthealgorithms
● FCFS
● SSTF
● SCAN

● FIFOorFCFS
#include<stdio.h>
#include<stdlib.h>
intmain(){
intqueue[100],q_size,head,seek=0,diff;
floatavg;
printf("%s\n","***FCFSDiskSchedulingAlgorithm***");
printf("%s\n","Enterthesizeofthequeue");
scanf("%d",&q_size);
printf("%s\n","Enterqueueelements");
for(inti=1;i<=q_size;i++){
scanf("%d",&queue[i]);
}
printf("%s\n","Enterinitialheadposition");
scanf("%d",&head);
queue[0]=head;
for(intj=0;j<=q_size-1;j++){
diff=abs(queue[j]-queue[j+1]);
seek+=diff;
printf("Movefrom%dto%dwithSeek%d\n",queue[j],queue[j+1],diff);
}
printf("\nTotalseektimeis%d\t",seek);
avg=seek/(float)q_size;
printf("\nAverageseektimeis%f\t",avg);
return0;
}

Output:
cse@cse-ThinkCentre-M710t:~/girija$ccfcfs.c

2
cse@cse-ThinkCentre-M710t:~/girija$./a.out
***FCFSDiskSchedulingAlgorithm***
Enterthesizeofthequeue
5
Enterqueueelements
44
11
66
22
77
Enterinitialheadposition
33
Movefrom33to44withSeek11
Movefrom44to11withSeek33
Movefrom11to66withSeek55
Movefrom66to22withSeek44
Movefrom22to77withSeek55

Totalseektimeis198
Averageseektimeis39.599998

● SSTF
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
intmain(){
intqueue[100],queue2[100],q_size,head,seek=0,temp;
floatavg;
printf("%s\n","-SSTFDiskSchedulingAlgorithm -");
printf("%s\n","Enterthesizeofthequeue");
scanf("%d",&q_size);
printf("%s\n","Enterqueueelements");
for(inti=0;i<q_size;i++){
scanf("%d",&queue[i]);
}
printf("%s\n","Enterinitialheadposition");
scanf("%d",&head);
for(inti=0;i<q_size;i++){
queue2[i]=abs(head-queue[i]);
}
for(inti=0;i<q_size;i++){
for(intj=i+1;j<q_size;j++){

if(queue2[i]>queue2[j]){
temp=queue2[i];
queue2[i]=queue[j];
queue2[j]=temp;

3
temp=queue[i];
queue[i]=queue[j];
queue[j]=temp;
}
}
}
for(inti=1;i<q_size;i++){
seek=seek+abs(head-queue[i]);
head=queue[i];
}
printf("\nTotalseektimeis%d\t",seek);
avg=seek/(float)q_size;
printf("\nAverageseektimeis%f\t",avg);
return0;
}

Output:
cse@cse-ThinkCentre-M710t:~/girija$ccsstf.c
cse@cse-ThinkCentre-M710t:~/girija$./a.out -
SSTFDiskSchedulingAlgorithm -
Enterthesizeofthequeue
5
Enterqueueelements
44
11
66
22
77
Enterinitialheadposition
33

Totalseektimeis88
Averageseektimeis17.600000

● SCAN
#include<stdio.h>
#include<stdlib.h>
#defineLOW0
#defineHIGH199
intmain(){
intqueue[20];
inthead,max,q_size,temp,sum;
intdloc;
printf("%s\t","Inputnoofdisklocations");
scanf("%d",&q_size);
printf("%s\t","Enterheadposition");
scanf("%d",&head);
4
printf("%s\n","Inputelementsintodiskqueue");
for(inti=0;i<q_size;i++){ scanf("%d",&queue[i]);

}
queue[q_size]=head;
q_size++;
for(inti=0;i<q_size;i++){
for(intj=i;j<q_size;j++){
if(queue[i]>queue[j]){
temp=queue[i];
queue[i]=queue[j];
queue[j]=temp;
}
}
}
max=queue[q_size-1];
for(inti=0;i<q_size;i++){
if(head==queue[i]){
dloc=i;
break;
}
}
if(abs(head-LOW)<=abs(head-HIGH)){
for(intj=dloc;j>=0;j-){
printf("%d->",queue[j]);
}
for(intj=dloc+1;j<q_size;j++){
printf("%d->",queue[j]);
}

}else{
for(intj=dloc+1;j<q_size;j++){
printf("%d->",queue[j]);
}
for(intj=dloc;j>=0;j-){
printf("%d->",queue[j]);
}

}
sum =head+max;
printf("\nmovementoftotalcylinders%d",sum);
return0;
}

Output:
cse@cse-ThinkCentre-M710t:~/girija$ccsscan.c
cse@cse-ThinkCentre-M710t:~/girija$./a.out
Inputnoofdisklocations 5 Enterheadposition33

5
Inputelementsintodiskqueue
44
11
66
22
77
33->22->11->44->66->77->
movementoftotalcylinders110

ORCombinely3(FCFS,SSTF,SCAN)together
#include<stdio.h>
#include<math.h>
voidfcfs(intnoq,intqu[10],intst)
{
inti,s=0;
for(i=0;i<noq;i++)
{
s=s+abs(st-qu[i]);
st=qu[i];
}
printf("\nTotalseektime:%d",s);
}

voidsstf(intnoq,intqu[10],intst,intvisit[10])
{
intmin,s=0,p,i;
while(1)
{
min=999;
for(i=0;i<noq;i++)
if(visit[i]==0)
{
if(min>abs(st-qu[i]))
{
min=abs(st-qu[i]);
p=i;
}
}
if(min==999)
break;
visit[p]=1;
6
s=s+min;
st=qu[p];
}
printf("\nTotalseektimeis:%d",s);
}

voidscan(intnoq,intqu[10],intst,intch)
{
inti,j,s=0;
for(i=0;i<noq;i++)
{
if(st<qu[i])
{
for(j=i-1;j>=0;j-)
{
s=s+abs(st-qu[j]);
st=qu[j];
}
if(ch==3)
{
s=s+abs(st-0);
st=0;
}
for(j=1;j<noq;j++)
{
s=s+abs(st-qu[j]);
st=qu[j];
}
break;
}
}
printf("\nTotalseektime:%d",s);
}

intmain()
{
intn,qu[20],st,i,j,t,noq,ch,visit[20];
printf("\nEnterthemaximumnumberofcylinders:");
scanf("%d",&n);
printf("enternumberofqueueelements");
scanf("%d",&noq);
printf("\nEntertheworkqueue");
7
for(i=0;i<noq;i++)
{
scanf("%d",&qu[i]);
visit[i]=0;
}
printf("\nEnterthediskheadstartingposision:\n");
scanf("%d",&st);
while(1)
{
printf("\n\n\t\tMENU\n");
printf("\n\n\t\t1.FCFS\n");
printf("\n\n\t\t2.SSTF\n");
printf("\n\n\t\t3.SCAN\n");
printf("\n\n\t\t4.EXIT\n");
printf("\nEnteryourchoice:");
scanf("%d",&ch);
if(ch>2)
{
for(i=0;i<noq;i++)
for(j=i+1;j<noq;j++)
if(qu[i]>qu[j])
{
t=qu[i];
qu[i]=qu[j];
qu[j]=t;
}
}
switch(ch)
{
case1:printf("\nFCFS\n");
printf("\n*****\n");
fcfs(noq,qu,st);
break;

case2:printf("\nSSTF\n");
printf("\n*****\n");
sstf(noq,qu,st,visit);
break;
case3:printf("\nSCAN\n");
printf("\n*****\n");
scan(noq,qu,st,ch);
break;
8
case4:exit(0);
}
}
}

Output:
Enterthemaximumnumberofcylinders:200
enternumberofqueueelements5
Entertheworkqueue
23 89 132 42 187
Enterthediskheadstartingposision:
100

MENU
1.FCFS
2.SSTF
3.SCAN
4.EXIT
Enteryourchoice:1
FCFS
*****
Totalseektime:421

MENU
1.FCFS
2.SSTF
3.SCAN
4.EXIT
Enteryourchoice:2
SSTF
*****
Totalseektimeis:273

MENU
1.FCFS
2.SSTF
3.SCAN
4.EXIT
Enteryourchoice:3
SCAN
*****
Totalseektime:287
MENU
1.FCFS
2.SSTF
3.SCAN
4.EXIT
Enteryourchoice:4

2.Writeaprogramtoprinttheatributesofafile.

9
1. whattimewasthisfilecreated?
2. timeoflastmodification
3. timeoflastaccess
#include<sys/types.h>
#include<sys/stat.h>
#include<unistd.h>
#include<stdio.h>
#include<stdlib.h>
#include<dirent.h>
#include<time.h>
intmain(intargc,char*argv[])
{
DIR*mydir;
structdirent*myfile;
structstatmystat;
mydir=opendir(argv[1]);
charbuf[512];
while(myfile=readdir(mydir))!=NULL)
{
structtm*time_stamp=localtime(&mystat.st_mtime);
sprintf(buf,"%s/%s",argv[1],myfile->d_name);
stat(buf,&mystat);
//stat(myfile->d_name,&mystat);
mode_tval;
val=(mystat.st_mode&~S_IFMT);
(val&S_IRUSR)?printf("r"):printf("-");
(val&S_IWUSR)?printf("w"):printf("-");
(val&S_IXUSR)?printf("x"):printf("-");
(val&S_IRGRP)?printf("r"):printf("-");
(val&S_IWGRP)?printf("w"):printf("-");
(val&S_IXGRP)?printf("x"):printf("-");
(val&S_IROTH)?printf("r"):printf("-");
(val&S_IWOTH)?printf("w"):printf("-");
(val&S_IXOTH)?printf("x"):printf("-");
printf("\t%d",mystat.st_nlink);
printf("\t%d",mystat.st_uid);
printf("\t%d",mystat.st_gid);
printf("\t%d",mystat.st_size);
charbuffer[80];
strftime(buffer,10,"%b",time_stamp);

printf("\t%4d%s%2d",time_stamp->tm_year+1900,buffer,time_stamp->tm_mday);
printf("%s\n",myfile->d_name);
}
closedir(mydir);
}

OUTPUT:$./a.outdirname
rwxr-xr-x3 1000 1000 4096 1970Jan 1 .
rwxr-xr-x3 1000 1000 4096 2019Oct23 .
rwxrwxrwx 1 1000 1000 30 2019Oct23 hi
rw-r-r- 1 1000 1000 0 2019Aug21 jk
rw-r-r- 1 1000 1000 9 2019Aug21 hi
rwxr-xr-x2 1000 1000 4096 2019Aug21 helo

10
SKILLEXERCISE10:
1.Writeasystem program todemonstratelink()–tocreateahardlinkbetween“File1.txt”and
“File2.txt”.Addsometextto“File1.txt”andprintthecontentinbothfiles.Demonstratetruncate()-
modifiesthesizeofthefileto“N”bytessystemcals

echo'Thisisatest'
stathi
lnhinew
ls-lihinew
cathi
catnew
truncate-s8hi
stathi

Output:savethefilewithfilename.sh
cse@cse-ThinkCentre-M710t:~/girija$geditlnk.sh
cse@cse-ThinkCentre-M710t:~/girija$shlnk.sh
Thisisatest
File:hi
Size:9 Blocks:8 IOBlock:4096 regularfile
399929-rw-r-r-2csecse9Aug2112:22hi
399929-rw-r-r-2csecse9Aug2112:22new
Hihelooshel
Hihelooshel
File:hi
Size:8 Blocks:8 IOBlock:4096 regularfile
2.DemonstrateI/ODiskSchedulingAlgorithmsusingQueueDataStructureusingthealgorithms
● CSCAN
● LOOK
● CLOOK

CSCAN
#include<stdlib.h>
#include<stdio.h>
#defineHIGH199
#defineLOW0
intmain(){
intqueue[20],q_size,head,i,j,seek=0,diff,max,temp,
queue1[20],queue2[20],temp1=0,temp2=0;
floatavg;
printf("%s\t","Inputnoofdisklocations");
11
scanf("%d",&q_size);
printf("%s\t","Enterinitialheadposition");
scanf("%d",&head);
printf("%s\n","Enterdiskpositionstoberead");
for(i=0;i<q_size;i++){
scanf("%d",&temp);
if(temp>=head){
queue1[temp1]=temp;
temp1++;
}else{
queue2[temp2]=temp;
temp2++;
}
}
for(i=0;i<temp1-1;i++){
for(j=i+1;j<temp1;j++){
if(queue1[i]>queue1[j]){
temp=queue1[i];
queue1[i]=queue1[j];
queue1[j]=temp;
}
}
}
for(i=0;i<temp2-1;i++){
for(j=i+1;j<temp2;j++){
if(queue2[i]>queue2[j]){
temp=queue2[i];
queue2[i]=queue2[j];
queue2[j]=temp;
}
}
}
if(abs(head-LOW)>=abs(head-HIGH)){

for(i=1,j=0;j<temp1;i++,j++){
queue[i]=queue1[j];
}
queue[i]=HIGH;
queue[i+1]=0;
for(i=temp1+3,j=0;j<temp2;i++,j++){
queue[i]=queue2[j];
}
}else{

12
for(i=1,j=temp2-1;j>=0;i++,j-){
queue[i]=queue2[j];
}
queue[i]=LOW;
queue[i+1]=HIGH;
for(i=temp2+3,j=temp1-1;j>=0;i++,j-){
queue[i]=queue1[j];
}
}
queue[0]=head;
for(j=0;j<=q_size+1;j++){
diff=abs(queue[j+1]-queue[j]);
seek+=diff;
printf("Diskheadmovesfrom%dto%dwithseek
%d\n",queue[j],queue[j+1],diff);
}
printf("Totalseektimeis%d\n",seek);
avg=seek/(float)q_size;
printf("Averageseektimeis%f\n",avg);
return0;
}
Output:
cse@cse-ThinkCentre-M710t:~/girija$cccscan.c
cse@cse-ThinkCentre-M710t:~/girija$./a.out
Inputnoofdisklocations 5
Enterinitialheadposition 33
Enterdiskpositionstoberead
44
11
66
22
77
Diskheadmovesfrom33to22withseek11
Diskheadmovesfrom22to11withseek11
Diskheadmovesfrom11to0withseek11
Diskheadmovesfrom0to199withseek199
Diskheadmovesfrom199to77withseek122
Diskheadmovesfrom77to66withseek11
Diskheadmovesfrom66to44withseek22
Totalseektimeis387
Averageseektimeis77.400002

13
LOOK
#include<stdio.h>
#include<stdlib.h>
#defineLOW0
#defineHIGH199
intmain(){
intqueue[20],head,q_size,i,j,seek=0,diff,max,temp,
queue1[20],queue2[20],temp1=0,temp2=0;
floatavg;
printf("%s\t","Inputthenumberofdisklocations");
scanf("%d",&q_size);
printf("%s\t","Enterinitialheadposition");
scanf("%d",&head);
printf("%s\n","Enterdiskpositionstoread");
for(i=0;i<q_size;i++){
scanf("%d",&temp);
if(temp>=head){
queue1[temp1]=temp;
temp1++;
}else{
queue2[temp2]=temp;
temp2++;
}
}
for(i=0;i<temp1-1;i++){
for(j=i+1;j<temp1;j++){
if(queue1[i]>queue1[j]){
temp=queue1[i];
queue1[i]=queue1[j];
queue1[j]=temp;
}
}
}
for(i=0;i<temp2-1;i++){
for(j=i+1;j<temp2;j++){
if(queue2[i]<queue2[j]){
temp=queue2[i];
queue2[i]=queue2[j];
queue2[j]=temp;
}
}
}
if(abs(head-LOW)>=abs(head-HIGH)){
14
for(i=1,j=0;j<temp1;i++,j++){
queue[i]=queue1[j];
}
for(i=temp1+1,j=0;j<temp2;i++,j++){
queue[i]=queue2[j];
}
}else{
for(i=1,j=0;j<temp2;i++,j++){
queue[i]=queue2[j];
}
for(i=temp2+1,j=0;j<temp1;i++,j++){
queue[i]=queue1[j];
}
}
queue[0]=head;
for(j=0;j<q_size;j++){
diff=abs(queue[j+1]-queue[j]);
seek+=diff;
printf("Diskheadmovesfrom%dto%dwithseek%d\",queue[j],queue[j+1],diff);
}
printf("Totalseektimeis%d\n",seek);
avg=seek/(float)q_size;
printf("Averageseektimeis%f\n",avg);
return0;
}
Output:
cse@cse-ThinkCentre-M710t:~/girija$cclook.c
cse@cse-ThinkCentre-M710t:~/girija$./a.out
Inputthenumberofdisklocations5
Enterinitialheadposition 33
Enterdiskpositionstoread
44
11
66
22
77
Diskheadmovesfrom33to22withseek11
Diskheadmovesfrom22to11withseek11
Diskheadmovesfrom11to44withseek33
Diskheadmovesfrom44to66withseek22
Diskheadmovesfrom66to77withseek11
Totalseektimeis88
Averageseektimeis17.600000

15
CLOOK
#include<stdio.h>
#include<stdlib.h>
#defineLOW0
#defineHIGH199
intmain(){
intqueue[20],head,q_size,i,j,seek=0,diff,max,min,range,
temp,queue1[20],queue2[20],temp1=0,temp2=0;
floatavg;
printf("%s\t","Inputthenumberofdisklocations");
scanf("%d",&q_size);
printf("%s\t","Enterinitialheadposition");
scanf("%d",&head);
printf("%s\n","Enterdiskpositionstoread");
for(i=0;i<q_size;i++){
scanf("%d",&temp);
if(temp>=head){
queue1[temp1]=temp;
temp1++;
}else{
queue2[temp2]=temp;
temp2++;
}
}
for(i=0;i<temp1-1;i++){
for(j=i+1;j<temp1;j++){
if(queue1[i]>queue1[j]){
temp=queue1[i];
queue1[i]=queue1[j];
queue1[j]=temp;
}
}
}
for(i=0;i<temp2-1;i++){
for(j=i+1;j<temp2;j++){
if(queue2[i]>queue2[j]){
temp=queue2[i];
queue2[i]=queue2[j];
queue2[j]=temp;
}
}
}

if(abs(head-LOW)<=abs(head-HIGH)){
16
for(i=1,j=temp2-1;j>=0;i++,j-){
queue[i]=queue2[j];
}
queue[i]=LOW;
queue[i+1]=HIGH;

for(i=temp2+3,j=temp1-1;j>=0;i++,j-){
queue[i]=queue1[j];
}

}else{
for(i=1,j=0;j<temp1;i++,j++){
queue[i]=queue1[j];
}
queue[i]=HIGH;
queue[i+1]=LOW;

for(i=temp1+3,j=0;j<temp2;i++,j++){
queue[i]=queue2[j];
}
}
queue[0]=head;

for(j=0;j<q_size;j++){
diff=abs(queue[j+1]-queue[j]);
seek+=diff;
printf("Diskheadmovesfrom%dto%dwithseek
%d\n",queue[j],queue[j+1],diff);
}
printf("Totalseektimeis%d\n",seek);
avg=seek/(float)q_size;
printf("Averageseektimeis%f\n",avg);
return0;
}

Output:
cse@cse-ThinkCentre-M710t:~/girija$ccclook.c
cse@cse-ThinkCentre-M710t:~/girija$./a.out
Inputthenumberofdisklocations5
Enterinitialheadposition 33
Enterdiskpositionstoread
44
11
17
66
22
77
Diskheadmovesfrom33to22withseek11
Diskheadmovesfrom22to11withseek11
Diskheadmovesfrom11to0withseek11
Diskheadmovesfrom0to199withseek199
Diskheadmovesfrom199to77withseek122
Totalseektimeis354
Averageseektimeis70.800003

TYPESOFDISKSCHEDULINGALGORITHMS
Althoughthereareotheralgorithmsthatreducetheseektimeofalrequests,Iwilonlyconcentrateon
thefolowingdiskschedulingalgorithms:
1.FirstCome-FirstServe(FCFS)
2.ShortestSeekTimeFirst(SSTF)
3.Elevator(SCAN)
4.CircularSCAN(C-SCAN)
5.LOOK
6.C-LOOK
Thesealgorithmsarenothardtounderstand,buttheycanconfusesomeonebecausetheyaresosimilar.
WhatwearestrivingforbyusingthesealgorithmsiskeepingHeadMovements(#tracks)totheleast
amountaspossible.Thelesstheheadhastomovethefastertheseektimewilbe.Iwilshowyouand
explaintoyouwhyC-LOOKisthebestalgorithmtouseintryingtoestablishlessseektime.

Giventhefolowingqueue-95,180,34,119,11,123,62,64withtheRead-writeheadinitialyatthetrack
50andthetailtrackbeingat199letusnowdiscussthedifferentalgorithms.

1.FirstCome-FirstServe(FCFS) Alincomingrequests
areplacedattheendofthequeue.Whatevernumberthatisnextinthequeuewilbethenextnumber
served.Usingthisalgorithmdoesn'tprovidethebestresults.Todeterminethenumberofhead
movementsyouwouldsimplyfindthenumberoftracksittooktomovefromonerequesttothenext.For
thiscaseitwentfrom50to95to180andsoon.From50to95itmoved45tracks.Ifyoutalyupthe
totalnumberoftracksyouwilfindhowmanytracksithadtogothroughbeforefinishingtheentire

18
request.Inthisexample,ithadatotalheadmovementof640tracks.Thedisadvantageofthisalgorithm
isnotedbytheoscilationfromtrack50totrack180andthenbacktotrack11to123thento64.Asyou
wilsoonsee,thisistheworsealgorithmthatonecanuse.

2.ShortestSeekTimeFirst(SSTF)
Inthiscaserequestisservicedaccordingtonextshortestdistance.Startingat50,thenextshortest
distancewouldbe62insteadof34sinceitisonly12tracksawayfrom62and16tracksawayfrom34.
Theprocesswouldcontinueuntilaltheprocessaretakencareof.Forexamplethenextcasewouldbeto
movefrom62to64insteadof34sincethereareonly2tracksbetweenthemandnot18ifitweretogo
theotherway.Althoughthisseemstobeabeterservicebeingthatitmovedatotalof236tracks,thisis
notanoptimalone.Thereisagreatchancethatstarvationwouldtakeplace.Thereasonforthisisif
therewerealotofrequestsclosetoeachothertheotherrequestswilneverbehandledsincethe
distancewilalwaysbegreater.

3.Elevator(SCAN)
Thisapproachworkslikeanelevatordoes.Itscansdowntowardsthenearestendandthenwhenithits
thebotomitscansupservicingtherequeststhatitdidn'tgetgoingdown.Ifarequestcomesinafterit
hasbeenscanneditwilnotbeserviceduntiltheprocesscomesbackdownormovesbackup.This
processmovedatotalof230tracks.Onceagainthisismoreoptimalthanthepreviousalgorithm,butitis
notthebest.

19
4.CircularScan(C-SCAN)
Circularscanningworksjustliketheelevatortosomeextent.Itbeginsitsscantowardthenearestend
andworksitwayalthewaytotheendofthesystem.Onceithitsthebotomortopitjumpstotheother
endandmovesinthesamedirection.Keepinmindthatthehugejumpdoesn'tcountasahead
movement.Thetotalheadmovementforthisalgorithmisonly187track,butstilthisisn'tthemose
sufficient.

5.C-LOOK
ThisisjustanenhancedversionofC-SCAN.Inthisthescanningdoesn'tgopastthelastrequestinthe
directionthatitismoving.Ittoojumpstotheotherendbutnotalthewaytotheend.Justtothefurthest request.C-
SCANhadatotalmovementof187butthisscan(C-LOOK)reduceditdownto157tracks.

Fromthisyouwereabletoseeascanchangefrom644totalheadmovementstojust157.Youshould
nowhaveanunderstandingastowhyyouroperatingsystemtrulyreliesonthetypeofalgorithmitneeds
whenitisdealingwithmultipleprocesses.

20

Potrebbero piacerti anche