StartRead thru the file, counting the number of valid entries.Should the size of the file change?nobiggerextend the file, setting the newentries to "empty".smallernew file and set all entries to "empty".Set the resolveList to NIL.Go to the beginning of the file.Is there another record?No.Yes.is it empty?Yes.No.Is it deleted?YesNo.Must be valid. Does ithave the right hash for this slot?No.in the file.Yes.Set the entryin the Empty Set the dupList to NIL.Start at the beginning of the resolveList.Is there another entry in the resolve list?Yes.No.Yes.Move our entryfrom the resolveListto the dupList.Start at the beginning of the resolveList.Is there another entry in the resolve list?No.Yes.Yes.Write our page there.Data structures:Write an empty recordMake an entry in the resolve list.Is the desired slot in the EmptyRemove our entry fromthe resolveList.vvvvvvvvvvvvvvvvvvnnnnnnvvvvnnwe expect this to be very rare, so just startat what will be the new eof and chuck valid entries over our shoulder into empty slots,in the order in which we find the empty slots.Exch the two disk pagesand update the otherentry in the dupListor resolveList.vvStart at the beginning of the dupList.and update the otherExch the two disk pagesnnvRemove our entry fromWrite our page there.Yes.No.vDone.the dupList.entry in the dupList.No, valid or dibbies.Set that slot todibbiesEmpty ordibbiesBadHash.page = dibbiesEmpty?Set slot to valid.No, dibbiesBadHash.nvnIs there another entry in the dupList?Yes.nIs it valid?vNo.vIs the desired slot= empty?Set slot to valid.Yes.nNo.nCalc the next best desired slot.page's curPageNo in itspage's curPageNo in itsDoes the slot in Empty for the desiredTURN ALL DELETED RECORDS INTOEMPTY RECORDS.SET UP EMPTY ARRAY WITH THESEE IF THE SLOTS THE PAGES ONTHE RESOLVE LIST WANT AREANYTHING BUT VALID GETS DIBBIES ON THAT SLOT. LOSERS GO ON DUPLIST.AVAILABLE. FIRST PAGE TO REQUEST A SLOT THAT IS CURRENTLYALL PAGES IN THE WRONG SLOTS GETNOTED ON THE RESOLVE LIST.WRITE EVERYBODY ON THE RESOLVELIST TO THE DISK.OVERWRITE EMPTY PAGES,EXCH WRONG HASH PAGES.FOR EACH ENTRY ON THETHEN SEARCH FORWARD (MAYWRAP TO BEGIN OF FILE) UNTILFIND AN AVAILABLE SLOT.DUPLIST, CALC THE DESIRED SLOT,resolveList, dupList: LIST OF [currentPageNo, VALUES EMPTY, VALID, BADHASH ASAPPROPRIATE.desiredPageNo.];File: [Ivy]AccessControlReorganize.silReorganizeEmpty: SEQUENCE slot: [0..n) OF {empty, valid,badHash, dibbiesEmpty, dibbiesBadHash};Build a sequence Empty the size of theseq to valid.Set the entry in the Empty seq to badHash.seq = empty or badHash?thsf$e9sb$Ub#s\$_(a$+`(] (\a $ V`g|$:R(:QS|$OQ HE%H*:I4 S|$.E$91sH-E*D42C.@-$-Am*?4*>".:$.;<B> B< :L)$K>^$$M_+$s533*.+--:+DX+;t)e$7(l7'O7&3:!*se$9V+V/6tH$B?O<U$Jt$9$L$$ H$f$2h.W$ W$ W_$0WI{$ID$V;t>^$IX>^$5WI$2D{9$DD{$9D*::4".7$s3$s3e$7/!+/^ @$K/^$]F)$r+%$DX$r??xW< IIIJ$-W<W<I/ :5CC:)Et%::$.D.?0$9)H8C4;IXA=HDXJt>;!V/:.7/Et*: e$2,s$ +$>Lt^Q-]5,\+Z. :J$9!VLB$.7s$s0$+K%$ 9F%^$$F%^$;t$e$;t$A$L$e$L$e$r0W0W0Wk0WOxIL7$:M-$#I{$J$Us+$!0$!1)$s+$ "st&0WN0WkLxU> +$ H$C?tN $Ly$ ]<U$?8 V s$xUt?2 0W7+B(B'B&4;?23xs :r6t/:Vt 2 s+$"s y$# $x 'st  /: y$*:+$*:x (t k)x*: $9&Wt2(?/:$22>x*:$*:$+WtN/:xGy$%t 2 *:$ V$7 $5 y$DX$0W20W4;&9C9A9>9/9.9+3 9*$9-l9,P 9@ 9?939999 9 k9 O929 4;c.9=9