📄 a dynamic lookup scheme for bursty access patterns_infocom2001.ps
字号:
y(I)r(I)r(I)r(.)22 b(B)r Fq(I)r(A)r(S)r(E)r(D)14 b Fp(S)rFq(K)r(I)r(P)f Fp(L)r Fq(I)r(S)r(T)h Fp(\()r(B)r(S)r(L)r(\))999761 y Fi(Some)h(characteristics.)58 b Fp(W)n(ith)15 b(re)o(gular)g(Skip)g(Lists,)i(since)999 810 y(searches)d(start)d(at)h(the)g(top)f(le)o(v)o(el,)i(it)e(takes)h(less)h(time)f(to)f(search)999860 y(for)17 b(ke)o(ys)g(appearing)g(on)g(higher)f(le)o(v)o(els)i(than)e(those)h(appear)o(-)999 909 y(ing)c(only)g(on)g(lo)o(wer)h(le)o(v)o(els.)24 b(Since)14 b(the)f(locations)g(of)h(ke)o(ys)g(in)999958 y(the)h(structure)g(are)g(determined)g(completely)g(randomly)m(,)h(with)999 1008 y(non-uniform)10 b(access)k(pattern,)e(some)h(of)f(the)g(most)f(frequently)999 1057 y(searched)17 b(ke)o(ys)g(may)f(end)g(up)g(at)g(lo)o(w)f(le)o(v)o(els)h(and)g(ha)o(v)o(e)h(long)9991107 y(search)d(times,)g(making)e(the)g(throughput)e(unnecessarily)j(poor)n(.)999 1156 y(Our)f(data)g(structure,)h(BSL,)f(maintains)g(the)g(good)f(characteris-)999 1205 y(tics)k(of)g(the)f(Skip)h(Lists)f(while)h(remedying)f(the)h(abo)o(v)o(e)h(short-)999 1255 y(coming)21b(by)f(making)h(sure)g(that)f(ke)o(ys)h(with)f(smaller)h(ranks)9991304 y(\(those)16 b(frequently)e(accessed\))k(are)f(located)f(close)g(to)f(the)h(top)999 1354 y(of)10 b(the)g(data)h(structure,)f(and)g(thus)g(can)h(be)f(quickly)f(accessed.)999 1412 y Fi(The)k(Data)g(Structur)o(e.)43 b Fp(There)14 b(are)g Fj(n)f Fp(ke)o(ys,)h(each)g(of)f(which)999 1461 y(are)e(assigned)f(distinct)e(ranks)iFo([1)d Fj(:)g(:)g(:)e(n)p Fo(])k Fp(depending)g(on)h(ho)o(w)g(of-)9991511 y(ten)g(or)g(ho)o(w)g(recently)g(the)o(y)h(ha)o(v)o(e)g(been)g(accessed.)k(The)c(rank)f(of)999 1560 y(a)j(ke)o(y)gFj(i)g Fp(is)f(denoted)h(by)f Fj(r)q Fo(\()p Fj(i)p Fo(\))pFp(.)20 b(The)14 b(ke)o(ys)e(are)i(partitioned)c(into)9991610 y(classes)k Fj(C)1157 1616 y Fk(1)1176 1610 y Fj(;)7b(C)1225 1616 y Fk(2)1249 1610 y Fj(:)g(:)g(:)f(;)h(C)13541616 y Fk(log)t Fh(n)1424 1610 y Fp(.)20 b(If)13 b(ke)o(ys)fFj(x)h Fp(and)g Fj(y)h Fp(are)g(in)e(classes)999 1659y Fj(C)1029 1665 y Fh(k)1058 1659 y Fp(and)c Fj(C)11561665 y Fh(k)q Fk(+1)1227 1659 y Fp(respecti)o(v)o(ely)m(,)i(then)eFj(r)q Fo(\()p Fj(x)p Fo(\))j Fj(<)h(r)q Fo(\()p Fj(y)qFo(\))p Fp(,)e(and)f(the)f(ke)o(ys)999 1708 y(in)i Fj(C)10721714 y Fh(k)1102 1708 y Fp(are)h(more)g(\252hot\272.)10411767 y(BSL)i(has)g(multiple)e(le)o(v)o(els;)j(since)f(searches)h(start)f(from)f(the)999 1816 y(top)i(le)o(v)o(els,)j(ke)o(ys)f(located)f(higher)f(than)g(others)h(are)h(accessed)999 1866 y(faster)n(.)23b(Since)14 b(we)g(would)f(like)f(the)i(ke)o(ys)g(with)e(smaller)i(ranks)999 1915 y(\(those)g(in)g(classes)j(with)c(small)i(inde)o(x\))f(to)g(be)h(quickly)e(acces-)999 1964 y(sible,)18 b(we)e(place)h(these)g(ke)o(ys)f(higher)f(in)h(our)f(data)h(structure.)9992014 y(T)m(o)c(ensure)g(this,)f(the)g(bottom)g(le)o(v)o(el)g(contains)g(all)h(ke)o(ys.)17 b(As)12 b(we)999 2063 y(go)f(up)g(to)g(the)g(higher)g(le)o(v)o(els,)h(some)g(of)f(the)h(ke)o(ys)f(belonging)f(to)9992113 y(higher)o(-numbered)j(classes)j(are)e(gradually)f(left)h(out)f(\(not)g(pro-)999 2162 y(moted)h(to)g(the)g(ne)o(xt)h(le)o(v)o(el\).)25b(The)15 b(intuition)d(is)i(that)g(as)h(we)f(go)999 2211y(higher)7 b(and)i(higher)n(,)f(the)g(remaining)f(ke)o(ys)h(tend)g(more)h(and)f(more)999 2261 y(to)13 b(be)g(from)g(the)f(more)i(popular)d(classes,)16 b(with)c(the)g(result)h(that)999 2310 y(those)8b(ke)o(ys)g(can)g(be)g(searched)i(faster)n(.)i(A)c(schematic)g(e)o(xample)h(of)999 2360 y(ho)o(w)j(classes)i(containing)d(ke)o(ys)h(of)h(small)f(rank)g(preserv)o(e)i(their)999 2409 y(initial)f(size)i(and)f(ho)o(w)g(those)g(containing)f(ke)o(ys)h(of)h(lar)o(ge)f(rank)9992458 y(get)c(smaller)h(in)f(the)g(upper)g(le)o(v)o(els)g(is)g(illustrated)f(in)g(Figure)h(3.)1041 2517 y(W)m(e)i(\256rst)f(describe)h(the)g(data)g(structure)f(when)g(the)h(ranks)f(are)9992566 y(static.)999 2625 y Fi(Construction.)24 b Fp(In)13b(addition)f(to)h(the)g(main)h(randomized)g(data)9992674 y(structure)i(described)i(belo)o(w)m(,)g(BSL)g(maintains)e(a)i(master)f(list)p eop%%Page: 4 44 3 bop 1935 -100 a Fx(4)25 343 y @beginspecial 0 @llx0 @lly 573 @urx 235 @ury 2160 @rwi @setspecial%%BeginDocument: Figures/schematic.eps/MyAppDict 100 dict dup begin def/$F2psDict 200 dict def$F2psDict begin$F2psDict /mtrx matrix put/col-1 {0 setgray} bind def/col0 {0.000 0.000 0.000 srgb} bind def/col1 {0.000 0.000 1.000 srgb} bind def/col2 {0.000 1.000 0.000 srgb} bind def/col3 {0.000 1.000 1.000 srgb} bind def/col4 {1.000 0.000 0.000 srgb} bind def/col5 {1.000 0.000 1.000 srgb} bind def/col6 {1.000 1.000 0.000 srgb} bind def/col7 {1.000 1.000 1.000 srgb} bind def/col8 {0.000 0.000 0.560 srgb} bind def/col9 {0.000 0.000 0.690 srgb} bind def/col10 {0.000 0.000 0.820 srgb} bind def/col11 {0.530 0.810 1.000 srgb} bind def/col12 {0.000 0.560 0.000 srgb} bind def/col13 {0.000 0.690 0.000 srgb} bind def/col14 {0.000 0.820 0.000 srgb} bind def/col15 {0.000 0.560 0.560 srgb} bind def/col16 {0.000 0.690 0.690 srgb} bind def/col17 {0.000 0.820 0.820 srgb} bind def/col18 {0.560 0.000 0.000 srgb} bind def/col19 {0.690 0.000 0.000 srgb} bind def/col20 {0.820 0.000 0.000 srgb} bind def/col21 {0.560 0.000 0.560 srgb} bind def/col22 {0.690 0.000 0.690 srgb} bind def/col23 {0.820 0.000 0.820 srgb} bind def/col24 {0.500 0.190 0.000 srgb} bind def/col25 {0.630 0.250 0.000 srgb} bind def/col26 {0.750 0.380 0.000 srgb} bind def/col27 {1.000 0.500 0.500 srgb} bind def/col28 {1.000 0.630 0.630 srgb} bind def/col29 {1.000 0.750 0.750 srgb} bind def/col30 {1.000 0.880 0.880 srgb} bind def/col31 {1.000 0.840 0.000 srgb} bind defendsave-71.0 486.0 translate1 -1 scale.9 .9 scale % to make patterns same scale as in xfig% This junk string is used by the show operators/PATsstr 1 string def/PATawidthshow { % cx cy cchar rx ry string % Loop over each character in the string { % cx cy cchar rx ry char % Show the character dup % cx cy cchar rx ry char char PATsstr dup 0 4 -1 roll put % cx cy cchar rx ry char (char) false charpath % cx cy cchar rx ry char /clip load PATdraw % Move past the character (charpath modified the % current point) currentpoint % cx cy cchar rx ry char x y newpath moveto % cx cy cchar rx ry char % Reposition by cx,cy if the character in the string is cchar 3 index eq { % cx cy cchar rx ry 4 index 4 index rmoveto } if % Reposition all characters by rx ry 2 copy rmoveto % cx cy cchar rx ry } forall pop pop pop pop pop % - currentpoint newpath moveto} bind def/PATcg { 7 dict dup begin /lw currentlinewidth def /lc currentlinecap def /lj currentlinejoin def /ml currentmiterlimit def /ds [ currentdash ] def /cc [ currentrgbcolor ] def /cm matrix currentmatrix def end} bind def% PATdraw - calculates the boundaries of the object and% fills it with the current pattern/PATdraw { % proc save exch PATpcalc % proc nw nh px py 5 -1 roll exec % nw nh px py newpath PATfill % - restore} bind def% PATfill - performs the tiling for the shape/PATfill { % nw nh px py PATfill - PATDict /CurrentPattern get dup begin setfont % Set the coordinate system to Pattern Space PatternGState PATsg % Set the color for uncolored pattezns PaintType 2 eq { PATDict /PColor get PATsc } if % Create the string for showing 3 index string % nw nh px py str % Loop for each of the pattern sources 0 1 Multi 1 sub { % nw nh px py str source % Move to the starting location 3 index 3 index % nw nh px py str source px py moveto % nw nh px py str source % For multiple sources, set the appropriate color Multi 1 ne { dup PC exch get PATsc } if % Set the appropriate string for the source 0 1 7 index 1 sub { 2 index exch 2 index put } for pop % Loop over the number of vertical cells 3 index % nw nh px py str nh { % nw nh px py str currentpoint % nw nh px py str cx cy 2 index show % nw nh px py str cx cy YStep add moveto % nw nh px py str } repeat % nw nh px py str } for 5 { pop } repeat end} bind def% PATkshow - kshow with the current pattezn/PATkshow { % proc string exch bind % string proc 1 index 0 get % string proc char % Loop over all but the last character in the string 0 1 4 index length 2 sub { % string proc char idx % Find the n+1th character in the string 3 index exch 1 add get % string proe char char+1 exch 2 copy % strinq proc char+1 char char+1 char % Now show the nth character PATsstr dup 0 4 -1 roll put % string proc chr+1 chr chr+1 (chr) false charpath % string proc char+1 char char+1 /clip load PATdraw % Move past the character (charpath modified the current point) currentpoint newpath moveto % Execute the user proc (should consume char and char+1) mark 3 1 roll % string proc char+1 mark char char+1 4 index exec % string proc char+1 mark... cleartomark % string proc char+1 } for % Now display the last character PATsstr dup 0 4 -1 roll put % string proc (char+1) false charpath % string proc /clip load PATdraw neewath pop pop % -} bind def% PATmp - the makepattern equivalent/PATmp { % patdict patmtx PATmp patinstance exch dup length 7 add % We will add 6 new entries plus 1 FID dict copy % Create a new dictionary begin % Matrix to install when painting the pattern TilingType PATtcalc /PatternGState PATcg def PatternGState /cm 3 -1 roll put % Check for multi pattern sources (Level 1 fast color patterns) currentdict /Multi known not { /Multi 1 def } if % Font dictionary definitions /FontType 3 def % Create a dummy encoding vector /Encoding 256 array def 3 string 0 1 255 { Encoding exch dup 3 index cvs cvn put } for pop /FontMatrix matrix def /FontBBox BBox def /BuildChar { mark 3 1 roll % mark dict char exch begin Multi 1 ne {PaintData exch get}{pop} ifelse % mark [paintdata] PaintType 2 eq Multi 1 ne or { XStep 0 FontBBox aload pop setcachedevice } { XStep 0 setcharwidth } ifelse currentdict % mark [paintdata] dict /PaintProc load % mark [paintdata] dict paintproc end gsave false PATredef exec true PATredef grestore cleartomark % - } bind def
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -