Wednesday, June 19, 2019
Minix 2 operating system Essay Example | Topics and Well Written Essays - 1000 words
Minix 2 operating system - Essay Exampleso after line no. 21021, declare these counters. Now transmit hit_counter as I lose said in the previous doc. And the time should be incremented each time any function in cache.c is called. So you moldiness add variable time at 21070 & 21035 after having written the statute ++hit_counter & Time_requiredtofree_block++. Remember, you have to add printf statements wherever you make an increment to these counters. Initialize hit_counter & time to zero in (this is important).Well, I had written two C files named fil1.c and fil2.c, which added and subtracted two numbers. When I ran this statement on bochs, I got the output of the printf statements. The tests of accomplishment was a two step process. In the offset part, dont make any changes to the Block_size and the Hash table, but include the variables hit_counter and time. Run the command and see the results. Then increase the BLOCK_SIZE & the Hash table size and then stripe the same command again. You depart definitely find a change in the results.The answer to this lies in question 3. The first set of observes was obtained for the variables hit_counter and Time_requiredtofree_block, when the value of BLOCK_SIZE and size of the hash table was 1024. The flake values were obtained when the size of BLOCK_SIZE & hashTable was increased.I have found out a few more points which you can use... The second values were obtained when the size of BLOCK_SIZE & hashTable was increased. 5) fifth it says initialize the variables how and where Initialize hit_counter & time to zero at line no. 21021, where you declare them.FEW MORE FINDINGSI have found out a few more points which you can use for your presentation. This is regarding the Lru chain, which can be completely discarded. Instead we can use a circularly linked double linked list.FRONT PIVOTREAR The figure is a bit crude, but I think it can deliver the idea. Frst, the pin is connected to the hash table entry. The FRONT is th e end which contains those blocks that are least needed and the REAR contains those blocks that are expected in the near future (same as LRU). Now, this linked list has the added advantage at the time of reading the next block from this chain unlike reading from the disk thru I/o. in this, the code can be written such that the REAR is used as fast as the FRONT will be accessed. This will ensure that the performance of the cache is enhanced further over the LRU scheme. The reason being that chthonic LRU, for accessing a REAR, it has to traverse to the end, while here, we could use sioimple logic (like a gladiolus where if flag=1 go along front i.e. clockwise from pivot or if flag=0, go along rear from pivot i.e. anti-clockwise). Believe me, this will upper up the cache. It is extremely useful, when under our modified code, contiguous blocks will be accessed from the disk. So the OS will perceive that the next necessary block will be the contiguous one and it will place it at the R EAR. Then accessing under theis scheme will be much faster than the one under the LRU.Pls feel
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.