Exercise Memory

download Exercise Memory

of 3

description

Exercise Memory

Transcript of Exercise Memory

  • Bi tp:

    1. Vi 5 partitions ln lt vi kch thc 100KB, 500KB, 200KB, 300KB, v 600KB:

    a. Cp pht b nh theo gii php First Fit, Best Fit v Worst Fit cho cc processes n theo th t sau: 212 KB, 417 KB,

    112KB, v 426KB.

    b. Mt process mi n c kch thc 200KB, hy chn partition ph hp tng ng vi 3 gii php cu a.

    2. Segmentation table:

    Tm a ch vt l tng ng vi a ch lun l di y

    a. 0,430

    b. 1,10

    c. 2,500

    d. 3,400

    e. 4,112

    3. Gi s gt FIFO c s dng vi 8 trang nh v 4 frame. Vi chui tham chiu trang nh l 0 1 7 2 3 2 7 1 0 3 v 4 frame c khi to rng, c bao nhiu li trang (page fault) s xy ra? Nu s dng gt LRU, Clock th s c bao nhiu li trang?

  • 4. Cho chui tham kho trang nh sau: 1-2-3-4-5-3-2-3-7-4-5-6-8-4-6. Chn = 10, timer interrupt=5, v t1 l thi im ngay sau khi tham kho trang s 4 ln th 3. Gi s dng 2 bit history cho mi trang nh. Dng phng php xp x working set, hy xc nh working set ti thi im t1.

    1. Consider the following page reference string:

    1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.

    How many page faults would occur for the following replacement algorithms, assuming four frames?

    Remember all frames are initially empty, so your first unique pages will all cost one fault each.

    LRU replacement

    FIFO replacement

    Optimal replacement

    Clock

    2. For the following page reference string: 1-2-3-4-5-3-2-3-7-4-5-6-8-4-6. Choose = 10, timer interrupt = 5, and t1 is the time immediately after the 3rd reference page 4. Assuming history using 2 bits per memory page. Using the approximation working set

    method, determine the working set at time t1.