View Single Post
  #13 (permalink)  
Old 10-08-2008, 11:50 AM
dietgal dietgal is offline
Member
 
Join Date: Oct 2008
Posts: 19
Rep Power: 0
dietgal is on a distinguished road
Default
Code:
if(command.equals("LOAD")){
    int item = stdIn.nextInt();
    int found = searchCache(item);
    currTime++;
    if(found==-1){
     System.out.println("cache miss");
     totalTime = totalTime +100;
     int x = LRU(currTime);
     cache[x]=item;
     timeStamp[x]=currTime;
    }
How come the above segment do not handle "LOAD"?
Reply With Quote