reset password
Author Message
paher
Posts: 3
Posted 21:58 Jun 06, 2016 |

Hello Professor,

In FIFO if there is sequence like pin(b1),pin(b2),pin(b1)

So in this when we pin b1 for first time we write Pin time as 1 and when block b1 is again pinned then what should we write as pin time 

Should Pin time be 1 or 3.

In LRU if there is sequence like .....unpin(b1),unpin(b2),unpin(b1).

So when we unpin b1 for first time which is at number 6 then we write Unpin Time as 6 and when it again get unpinned at number 8 then what will be the Pin Time 6 or 8.

Thanks

 

ngosrani
Posts: 31
Posted 22:04 Jun 06, 2016 |

For FIFO pin(b1) will have pin count = 2 and pin time = 3 when you pin for second time

For LRU unpin(b1) will have pin count = 0 and unpin time = 8 when you unpin for the second time.

Hope you understand it correct and not get confused. 

paher
Posts: 3
Posted 22:07 Jun 06, 2016 |

Thanks Got it

cysun
Posts: 2935
Posted 23:35 Jun 06, 2016 |

NGOSRANI is right.