diff --git a/assets/ostep_1680491762166_0.edn b/assets/ostep_1680491762166_0.edn index 74ad6f8..48d2caa 100644 --- a/assets/ostep_1680491762166_0.edn +++ b/assets/ostep_1680491762166_0.edn @@ -3166,21 +3166,1218 @@ :page 258}, :content {:text "swap space is not the only on-disk location for swapping "}, :properties {:color "yellow"}} - {:id #uuid "64319857-9885-49e0-9e51-c974f0b6b038", + {:id #uuid "643221b9-c6ee-4cdd-bde9-6d31cd39f9f3", :page 259, - :position {:bounding {:x1 147.046875, - :y1 734.78125, - :x2 231.62075805664062, - :y2 757.78125, - :width 1094.3999999999999, - :height 1641.6}, - :rects ({:x1 147.046875, - :y1 734.78125, - :x2 231.62075805664062, - :y2 757.78125, - :width 1094.3999999999999, - :height 1641.6}), + :position {:bounding {:x1 217.11608123779297, + :y1 949.5625610351562, + :x2 301.30753326416016, + :y2 971.8482666015625, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 217.11608123779297, + :y1 949.5625610351562, + :x2 301.30753326416016, + :y2 971.8482666015625, + :width 806.3999999999999, + :height 1209.6}), :page 259}, - :content {:text "chinery "}, + :content {:text "present bit"}, + :properties {:color "yellow"}} + {:id #uuid "6432277e-131b-4651-a2e9-bd51e4e5b7e6", + :page 261, + :position {:bounding {:x1 0, + :y1 349.1428680419922, + :x2 645.84912109375, + :y2 632.4286041259766, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 0, + :y1 349.1428680419922, + :x2 0, + :y2 370.2857360839844, + :width 806.3999999999999, + :height 1209.6} + {:x1 584.4553833007812, + :y1 595.5357513427734, + :x2 645.84912109375, + :y2 617.8214569091797, + :width 806.3999999999999, + :height 1209.6} + {:x1 202.48924255371094, + :y1 597.2768096923828, + :x2 548.4899139404297, + :y2 613.8482513427734, + :width 806.3999999999999, + :height 1209.6} + {:x1 580.0178833007812, + :y1 597.2768096923828, + :x2 645.84912109375, + :y2 614.0178985595703, + :width 806.3999999999999, + :height 1209.6} + {:x1 108.35714721679688, + :y1 615.8571624755859, + :x2 144.226806640625, + :y2 632.4286041259766, + :width 806.3999999999999, + :height 1209.6}), + :page 261}, + :content {:text "hile the I/O is in flight, the process will be in the blocked state."}, + :properties {:color "yellow"}} + {:id #uuid "6432298b-31e8-419e-b84d-3ecf08616a25", + :page 263, + :position {:bounding {:x1 405.69117736816406, + :y1 577.2857513427734, + :x2 494.18971252441406, + :y2 595.0000457763672, + :width 864, + :height 1296}, + :rects ({:x1 405.69117736816406, + :y1 577.2857513427734, + :x2 494.18971252441406, + :y2 595.0000457763672, + :width 864, + :height 1296}), + :page 263}, + :content {:text "proactively"}, + :properties {:color "green"}} + {:id #uuid "643229bd-fc80-45a7-a326-ddb73c8df04f", + :page 263, + :position {:bounding {:x1 262.82444763183594, + :y1 293.2410888671875, + :x2 642.4800109863281, + :y2 316.66966247558594, + :width 864, + :height 1296}, + :rects ({:x1 262.8482360839844, + :y1 293.2410888671875, + :x2 642.4800109863281, + :y2 316.66966247558594, + :width 864, + :height 1296} + {:x1 262.82444763183594, + :y1 294.9018020629883, + :x2 262.82997131347656, + :y2 312.6160888671875, + :width 864, + :height 1296}), + :page 263}, + :content {:text "Page-Fault Control Flow Algorithm (Software)"}, + :properties {:color "yellow"}} + {:id #uuid "64322a2c-91e1-47b7-8c3a-174d1c718b9f", + :page 263, + :position {:bounding {:x1 0, + :y1 317.1428756713867, + :x2 691.8538999557495, + :y2 654.7768096923828, + :width 864, + :height 1296}, + :rects ({:x1 0, + :y1 317.1428756713867, + :x2 0, + :y2 338.2857360839844, + :width 864, + :height 1296} + {:x1 0, + :y1 333.14288330078125, + :x2 0, + :y2 354.2857360839844, + :width 864, + :height 1296} + {:x1 140.01787090301514, + :y1 597.2143096923828, + :x2 689.8552732467651, + :y2 614.9286041259766, + :width 864, + :height 1296} + {:x1 269.65181255340576, + :y1 615.4732513427734, + :x2 449.4006223678589, + :y2 638.9018096923828, + :width 864, + :height 1296} + {:x1 496.3661069869995, + :y1 615.4732513427734, + :x2 665.0258359909058, + :y2 638.9018096923828, + :width 864, + :height 1296} + {:x1 116.09821605682373, + :y1 617.1339569091797, + :x2 691.8538999557495, + :y2 635.0625457763672, + :width 864, + :height 1296} + {:x1 116.09821605682373, + :y1 637.0625457763672, + :x2 544.3230695724487, + :y2 654.7768096923828, + :width 864, + :height 1296}), + :page 263}, + :content {:text "To keep a small amount of memory free, most operating systems thus have some kind of high watermark (HW ) and low watermark (LW ) to help decide when to start evicting pages from memory."}, + :properties {:color "yellow"}} + {:id #uuid "64322b0d-6e56-44aa-a5ec-a23e43355053", + :page 263, + :position {:bounding {:x1 0, + :y1 365.1428871154785, + :x2 696.4196701049805, + :y2 757.482177734375, + :width 864, + :height 1296}, + :rects ({:x1 0, + :y1 365.1428871154785, + :x2 0, + :y2 386.2857437133789, + :width 864, + :height 1296} + {:x1 0, + :y1 381.1428871154785, + :x2 0, + :y2 402.2857437133789, + :width 864, + :height 1296} + {:x1 0, + :y1 397.1428871154785, + :x2 0, + :y2 418.28574562072754, + :width 864, + :height 1296} + {:x1 0, + :y1 413.14288806915283, + :x2 0, + :y2 434.2857446670532, + :width 864, + :height 1296} + {:x1 561.8125228881836, + :y1 655.3125457763672, + :x2 597.9432907104492, + :y2 678.7411193847656, + :width 864, + :height 1296} + {:x1 208.8085708618164, + :y1 656.9732513427734, + :x2 691.589714050293, + :y2 674.9018402099609, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 676.8929138183594, + :x2 689.7679557800293, + :y2 694.8214721679688, + :width 864, + :height 1296} + {:x1 432.8928756713867, + :y1 695.1607666015625, + :x2 475.52816009521484, + :y2 718.5893249511719, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 696.8214721679688, + :x2 691.110466003418, + :y2 714.7500305175781, + :width 864, + :height 1296} + {:x1 680.5000534057617, + :y1 716.8393249511719, + :x2 686.4821701049805, + :y2 728.8393249511719, + :width 864, + :height 1296} + {:x1 422.74108123779297, + :y1 718.1786193847656, + :x2 545.1677474975586, + :y2 741.607177734375, + :width 864, + :height 1296} + {:x1 568.9553756713867, + :y1 718.1786193847656, + :x2 680.5057907104492, + :y2 741.607177734375, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 719.8482666015625, + :x2 696.4196701049805, + :y2 737.7768249511719, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 739.7679138183594, + :x2 259.5134696960449, + :y2 757.482177734375, + :width 864, + :height 1296}), + :page 263}, + :content {:text "when the OS notices that there are fewer than LW pages available, a background thread that is responsible for freeing memory runs. The thread evicts pages until there are HW pages available. The background thread, sometimes called the swap daemon or page daemon1, then goes to sleep"}, + :properties {:color "yellow"}} + {:id #uuid "64324655-73cb-40a7-814b-1dd26b310e41", + :page 268, + :position {:bounding {:x1 451.27679443359375, + :y1 519.8392944335938, + :x2 597.7689819335938, + :y2 542.1250152587891, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 451.27679443359375, + :y1 519.8392944335938, + :x2 597.7689819335938, + :y2 542.1250152587891, + :width 806.3999999999999, + :height 1209.6} + {:x1 451.27679443359375, + :y1 522.6964416503906, + :x2 597.7689819335938, + :y2 539.4375152587891, + :width 806.3999999999999, + :height 1209.6}), + :page 268}, + :content {:text "replacement policy"}, + :properties {:color "yellow"}} + {:id #uuid "6432466b-0d2b-4dac-990f-168a82743a94", + :page 268, + :position {:bounding {:x1 524.2767944335938, + :y1 821.8482513427734, + :x2 566.1121826171875, + :y2 844.1339721679688, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 524.2767944335938, + :y1 821.8482513427734, + :x2 566.1121826171875, + :y2 844.1339721679688, + :width 806.3999999999999, + :height 1209.6}), + :page 268}, + :content {:text "cache"}, + :properties {:color "yellow"}} + {:id #uuid "6432471f-f8f1-4a2c-aa82-abd0ec24142e", + :page 268, + :position {:bounding {:x1 0, + :y1 445.14288330078125, + :x2 645.8362426757812, + :y2 975.1607666015625, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 0, + :y1 445.14288330078125, + :x2 0, + :y2 466.2857360839844, + :width 806.3999999999999, + :height 1209.6} + {:x1 622.5714721679688, + :y1 934.2768249511719, + :x2 645.8362426757812, + :y2 956.5625610351562, + :width 806.3999999999999, + :height 1209.6} + {:x1 622.5714721679688, + :y1 937.1339721679688, + :x2 645.8362426757812, + :y2 953.8750610351562, + :width 806.3999999999999, + :height 1209.6} + {:x1 108.35714721679688, + :y1 952.8750610351562, + :x2 376.1501159667969, + :y2 975.1607666015625, + :width 806.3999999999999, + :height 1209.6} + {:x1 108.35714721679688, + :y1 955.732177734375, + :x2 383.5149230957031, + :y2 972.4732666015625, + :width 806.3999999999999, + :height 1209.6}), + :page 268}, + :content {:text "average memory access time (AMAT)"}, + :properties {:color "yellow"}} + {:id #uuid "643248c0-69b7-4b23-a8be-94df2abb38e6", + :page 269, + :position {:bounding {:x1 214.2807388305664, + :y1 923.5268249511719, + :x2 489.8062210083008, + :y2 945.2410888671875, + :width 864, + :height 1296}, + :rects ({:x1 214.2807388305664, + :y1 923.5268249511719, + :x2 489.8062210083008, + :y2 945.2410888671875, + :width 864, + :height 1296}), + :page 269}, + :content {:text "Optimal Replacement Policy"}, + :properties {:color "yellow"}} + {:id #uuid "64324c4e-165b-4ba4-838a-afc002decd34", + :page 270, + :position {:bounding {:x1 0, + :y1 237.14286041259766, + :x2 689.7579727172852, + :y2 539.5178756713867, + :width 864, + :height 1296}, + :rects ({:x1 0, + :y1 237.14286041259766, + :x2 0, + :y2 258.28572845458984, + :width 864, + :height 1296} + {:x1 319.8937454223633, + :y1 501.8839340209961, + :x2 689.7579727172852, + :y2 519.5982284545898, + :width 864, + :height 1296} + {:x1 116.09822082519531, + :y1 521.803581237793, + :x2 571.4840545654297, + :y2 539.5178756713867, + :width 864, + :height 1296}), + :page 270}, + :content {:text "The reason this is true is simple: you will refer to the other pages before you refer to the one furthest out."}, + :properties {:color "yellow"}} + {:id #uuid "64324c6c-2057-46b3-aa2f-fa1e0748e1e8", + :page 271, + :position {:bounding {:x1 393.6139373779297, + :y1 195.0178680419922, + :x2 592.2262420654297, + :y2 212.94642639160156, + :width 864, + :height 1296}, + :rects ({:x1 393.6139373779297, + :y1 195.0178680419922, + :x2 592.2262420654297, + :y2 212.94642639160156, + :width 864, + :height 1296}), + :page 271}, + :content {:text "TYPES OF CACHE MISSES"}, + :properties {:color "yellow"}} + {:id #uuid "6432503c-9c30-4ae0-8aa0-e867554b1662", + :page 272, + :position {:bounding {:x1 434.92860412597656, + :y1 729.4732666015625, + :x2 520.9250030517578, + :y2 747.1875610351562, + :width 864, + :height 1296}, + :rects ({:x1 434.92860412597656, + :y1 729.4732666015625, + :x2 520.9250030517578, + :y2 747.1875610351562, + :width 864, + :height 1296}), + :page 272}, + :content {:text "ANOMALY"}, + :properties {:color "green"}} + {:id #uuid "64325410-09a2-472f-b67b-426df53d4c81", + :page 271, + :position {:bounding {:x1 346.3453063964844, + :y1 862.5804138183594, + :x2 387.40281677246094, + :y2 884.2946929931641, + :width 864, + :height 1296}, + :rects ({:x1 346.3453063964844, + :y1 862.5804138183594, + :x2 387.40281677246094, + :y2 884.2946929931641, + :width 864, + :height 1296}), + :page 271}, + :content {:text "FIFO"}, + :properties {:color "yellow"}} + {:id #uuid "64325422-d727-4104-9c85-6c18260a1b6e", + :page 273, + :position {:bounding {:x1 420.1046600341797, + :y1 485.43751525878906, + :x2 484.86940002441406, + :y2 507.1518096923828, + :width 864, + :height 1296}, + :rects ({:x1 420.1046600341797, + :y1 485.43751525878906, + :x2 484.86940002441406, + :y2 507.1518096923828, + :width 864, + :height 1296}), + :page 273}, + :content {:text "Random"}, + :properties {:color "yellow"}} + {:id #uuid "643256d9-6c65-4e29-adab-f5a6d112bccd", + :page 274, + :position {:bounding {:x1 266.6438980102539, + :y1 476.75001525878906, + :x2 309.66699981689453, + :y2 498.4643096923828, + :width 864, + :height 1296}, + :rects ({:x1 266.6438980102539, + :y1 476.75001525878906, + :x2 309.66699981689453, + :y2 498.4643096923828, + :width 864, + :height 1296}), + :page 274}, + :content {:text " LRU"}, + :properties {:color "yellow"}} + {:id #uuid "643258e8-576b-4e22-91da-8579517b82bc", + :page 275, + :position {:bounding {:x1 171.8928680419922, + :y1 827.4107360839844, + :x2 366.3024444580078, + :y2 849.1250305175781, + :width 864, + :height 1296}, + :rects ({:x1 171.8928680419922, + :y1 827.4107360839844, + :x2 366.3024444580078, + :y2 849.1250305175781, + :width 864, + :height 1296}), + :page 275}, + :content {:text "Workload Examples"}, + :properties {:color "yellow"}} + {:id #uuid "64325b27-c557-40ad-86ff-e46eb11dbf77", + :page 278, + :position {:bounding {:x1 116.0850715637207, + :y1 643.3750152587891, + :x2 469.7178535461426, + :y2 665.0892944335938, + :width 864, + :height 1296}, + :rects ({:x1 116.0850715637207, + :y1 643.3750152587891, + :x2 469.7178535461426, + :y2 665.0892944335938, + :width 864, + :height 1296}), + :page 278}, + :content {:text "Implementing Historical Algorithms"}, + :properties {:color "yellow"}} + {:id #uuid "6432650c-142d-46ba-a8b1-4f0c1af50635", + :page 279, + :position {:bounding {:x1 470.1607360839844, + :y1 756.4464721679688, + :x2 599.8568115234375, + :y2 779.8750305175781, + :width 864, + :height 1296}, + :rects ({:x1 470.1607360839844, + :y1 756.4464721679688, + :x2 599.8568115234375, + :y2 779.8750305175781, + :width 864, + :height 1296}), + :page 279}, + :content {:text "clock algorithm"}, + :properties {:color "yellow"}} + {:id #uuid "64326b23-8bc8-4b41-96ac-d4044db00dbd", + :page 279, + :position {:bounding {:x1 0, + :y1 573.1428527832031, + :x2 745.5445404052734, + :y2 1056.8928833007812, + :width 864, + :height 1296}, + :rects ({:x1 0, + :y1 573.1428527832031, + :x2 0, + :y2 594.2857131958008, + :width 864, + :height 1296} + {:x1 0, + :y1 589.1428527832031, + :x2 0, + :y2 610.2857131958008, + :width 864, + :height 1296} + {:x1 325.9997329711914, + :y1 999.3303833007812, + :x2 745.5432205200195, + :y2 1017.0446472167969, + :width 864, + :height 1296} + {:x1 171.8928680419922, + :y1 1019.2589416503906, + :x2 745.5445404052734, + :y2 1037.1875305175781, + :width 864, + :height 1296} + {:x1 171.8928680419922, + :y1 1039.1785888671875, + :x2 564.7962188720703, + :y2 1056.8928833007812, + :width 864, + :height 1296}), + :page 279}, + :content {:text "ndeed, any approach which periodically clears the use bits and then differentiates between which pages have use bits of 1 versus 0 to decide which to replace would be fine."}, + :properties {:color "yellow"}} + {:id #uuid "64339651-5357-49a3-b495-6f1db7826dcc", + :page 282, + :position {:bounding {:x1 245.98158264160156, + :y1 398.4553985595703, + :x2 335.2895202636719, + :y2 416.1696319580078, + :width 864, + :height 1296}, + :rects ({:x1 245.98158264160156, + :y1 398.4553985595703, + :x2 335.2895202636719, + :y2 416.1696319580078, + :width 864, + :height 1296}), + :page 282}, + :content {:text "discrepancy"}, + :properties {:color "green"}} + {:id #uuid "64339660-fb5e-46f9-94a1-bd70bc684fc5", + :page 282, + :position {:bounding {:x1 192.58148193359375, + :y1 438.30360412597656, + :x2 276.72755432128906, + :y2 456.0178985595703, + :width 864, + :height 1296}, + :rects ({:x1 192.58148193359375, + :y1 438.30360412597656, + :x2 276.72755432128906, + :y2 456.0178985595703, + :width 864, + :height 1296}), + :page 282}, + :content {:text "prohibitive"}, + :properties {:color "green"}} + {:id #uuid "64339700-b057-4150-bc27-1a3ee4cb536d", + :page 281, + :position {:bounding {:x1 171.89286041259766, + :y1 654.4821624755859, + :x2 237.72611236572266, + :y2 676.1964416503906, + :width 864, + :height 1296}, + :rects ({:x1 171.89286041259766, + :y1 654.4821624755859, + :x2 237.72611236572266, + :y2 676.1964416503906, + :width 864, + :height 1296}), + :page 281}, + :content {:text "Thrash"}, + :properties {:color "green"}} + {:id #uuid "64339732-f900-4f7b-8783-782c8cb73550", + :page 281, + :position {:bounding {:x1 280.84822845458984, + :y1 774.5714416503906, + :x2 359.57144927978516, + :y2 798.0000305175781, + :width 864, + :height 1296}, + :rects ({:x1 280.84822845458984, + :y1 774.5714416503906, + :x2 359.57144927978516, + :y2 798.0000305175781, + :width 864, + :height 1296}), + :page 281}, + :content {:text "thrashing"}, + :properties {:color "yellow"}} + {:id #uuid "643398d2-0574-49f6-9873-c3b725d3649f", + :page 281, + :position {:bounding {:x1 594.678596496582, + :y1 896.0714721679688, + :x2 743.2807388305664, + :y2 919.5000610351562, + :width 864, + :height 1296}, + :rects ({:x1 594.678596496582, + :y1 896.0714721679688, + :x2 743.2807388305664, + :y2 919.5000610351562, + :width 864, + :height 1296}), + :page 281}, + :content {:text "admission control"}, + :properties {:color "yellow"}} + {:id #uuid "64339ec6-877f-42eb-ba92-4211f543c0f3", + :page 286, + :position {:bounding {:x1 171.8928680419922, + :y1 179.0178680419922, + :x2 438.8873748779297, + :y2 200.7321548461914, + :width 864, + :height 1296}, + :rects ({:x1 171.8928680419922, + :y1 179.0178680419922, + :x2 438.8873748779297, + :y2 200.7321548461914, + :width 864, + :height 1296}), + :page 286}, + :content {:text "VAX/VMS Virtual Memory"}, + :properties {:color "yellow"}} + {:id #uuid "64339efd-a5cd-487b-9eb8-caf7e824de7a", + :page 286, + :position {:bounding {:x1 171.8928680419922, + :y1 684.2857513427734, + :x2 469.6575469970703, + :y2 710.5714721679688, + :width 864, + :height 1296}, + :rects ({:x1 171.8928680419922, + :y1 684.2857513427734, + :x2 469.6575469970703, + :y2 710.5714721679688, + :width 864, + :height 1296}), + :page 286}, + :content {:text "Memory Management Hardware"}, + :properties {:color "yellow"}} + {:id #uuid "6433a0cd-3e8b-4c0c-af4e-8cbf498b9231", + :page 287, + :position {:bounding {:x1 374.38104248046875, + :y1 822.3750686645508, + :x2 455.0979309082031, + :y2 840.0893020629883, + :width 864, + :height 1296}, + :rects ({:x1 374.38104248046875, + :y1 822.3750686645508, + :x2 455.0979309082031, + :y2 840.0893020629883, + :width 864, + :height 1296}), + :page 287}, + :content {:text "circumvent"}, + :properties {:color "green"}} + {:id #uuid "6433a2a0-7ba4-46cf-b1ec-fc02ce4c7916", + :page 289, + :position {:bounding {:x1 484.88109970092773, + :y1 959.2410888671875, + :x2 534.060848236084, + :y2 976.9553833007812, + :width 864, + :height 1296}, + :rects ({:x1 484.88109970092773, + :y1 959.2410888671875, + :x2 534.060848236084, + :y2 976.9553833007812, + :width 864, + :height 1296}), + :page 289}, + :content {:text "astute"}, + :properties {:color "green"}} + {:id #uuid "6433a3cc-c528-4c8d-bca2-9bdab780e27a", + :page 288, + :position {:bounding {:x1 379.5803909301758, + :y1 936.6160888671875, + :x2 631.736701965332, + :y2 960.044677734375, + :width 864, + :height 1296}, + :rects ({:x1 385.1428909301758, + :y1 936.6160888671875, + :x2 631.736701965332, + :y2 960.044677734375, + :width 864, + :height 1296} + {:x1 379.5803909301758, + :y1 938.2767944335938, + :x2 385.12467193603516, + :y2 955.9910888671875, + :width 864, + :height 1296}), + :page 288}, + :content {:text " The VAX/VMS Address Space"}, + :properties {:color "yellow"}} + {:id #uuid "6433a4e2-191f-4c49-8c5f-e9a78cb4c476", + :page 289, + :position {:bounding {:x1 116.09821701049805, + :y1 863.9554138183594, + :x2 282.63166427612305, + :y2 890.2411193847656, + :width 864, + :height 1296}, + :rects ({:x1 116.09821701049805, + :y1 863.9554138183594, + :x2 282.63166427612305, + :y2 890.2411193847656, + :width 864, + :height 1296}), + :page 289}, + :content {:text "Page Replacement"}, + :properties {:color "yellow"}} + {:id #uuid "6433a4fb-da6c-4741-a962-6c95c7fd9f0c", + :page 289, + :position {:bounding {:x1 564.4830932617188, + :y1 1017.5893249511719, + :x2 596.3931884765625, + :y2 1041.0179138183594, + :width 864, + :height 1296}, + :rects ({:x1 564.4830932617188, + :y1 1017.5893249511719, + :x2 596.3931884765625, + :y2 1041.0179138183594, + :width 864, + :height 1296}), + :page 289}, + :content {:text "hog"}, + :properties {:color "green"}} + {:id #uuid "6433a931-90cf-4e1f-8ea7-922bc81f354e", + :page 290, + :position {:bounding {:x1 409.6071472167969, + :y1 1077.357192993164, + :x2 491.3032531738281, + :y2 1100.7857666015625, + :width 864, + :height 1296}, + :rects ({:x1 409.6071472167969, + :y1 1077.357192993164, + :x2 491.3032531738281, + :y2 1100.7857666015625, + :width 864, + :height 1296}), + :page 290}, + :content {:text "clustering"}, + :properties {:color "yellow"}} + {:id #uuid "6433a96f-0414-4ec5-963b-72161ce23ef0", + :page 291, + :position {:bounding {:x1 279.99354553222656, + :y1 182.3839111328125, + :x2 320.96942138671875, + :y2 200.09820556640625, + :width 864, + :height 1296}, + :rects ({:x1 279.99354553222656, + :y1 182.3839111328125, + :x2 320.96942138671875, + :y2 200.09820556640625, + :width 864, + :height 1296}), + :page 291}, + :content {:text "swoop"}, + :properties {:color "green"}} + {:id #uuid "6433a9cd-4ecd-4a8e-b778-8c0c36af929a", + :page 291, + :position {:bounding {:x1 361.61609649658203, + :y1 340.1250228881836, + :x2 508.79788970947266, + :y2 363.55358123779297, + :width 864, + :height 1296}, + :rects ({:x1 361.61609649658203, + :y1 340.1250228881836, + :x2 400.80359649658203, + :y2 363.55358123779297, + :width 864, + :height 1296} + {:x1 395.49109649658203, + :y1 342.98217010498047, + :x2 508.79788970947266, + :y2 360.91072845458984, + :width 864, + :height 1296}), + :page 291}, + :content {:text "lazy optimizations"}, + :properties {:color "yellow"}} + {:id #uuid "6433aa48-cb30-4a01-9670-64ac357bc2ab", + :page 291, + :position {:bounding {:x1 424.9018020629883, + :y1 360.05359649658203, + :x2 558.297981262207, + :y2 383.4821548461914, + :width 864, + :height 1296}, + :rects ({:x1 424.9018020629883, + :y1 360.05359649658203, + :x2 558.297981262207, + :y2 383.4821548461914, + :width 864, + :height 1296}), + :page 291}, + :content {:text "demand zeroing"}, + :properties {:color "yellow"}} + {:id #uuid "6433aa4c-e737-43aa-bcc9-34609d86fe42", + :page 291, + :position {:bounding {:x1 237.26787567138672, + :y1 738.6339797973633, + :x2 351.87162017822266, + :y2 762.0625076293945, + :width 864, + :height 1296}, + :rects ({:x1 237.26787567138672, + :y1 738.6339797973633, + :x2 351.87162017822266, + :y2 762.0625076293945, + :width 864, + :height 1296}), + :page 291}, + :content {:text "copy-on-write"}, + :properties {:color "yellow"}} + {:id #uuid "6433abf7-a59b-42ae-af0b-05706abee681", + :page 292, + :position {:bounding {:x1 171.90179443359375, + :y1 656.5357246398926, + :x2 506.87579345703125, + :y2 678.2500152587891, + :width 864, + :height 1296}, + :rects ({:x1 171.90179443359375, + :y1 656.5357246398926, + :x2 506.87579345703125, + :y2 678.2500152587891, + :width 864, + :height 1296}), + :page 292}, + :content {:text "The Linux Virtual Memory System"}, + :properties {:color "yellow"}} + {:id #uuid "6433ac19-794e-4bcb-abf9-d406d1a148d3", + :page 293, + :position {:bounding {:x1 348.2946548461914, + :y1 565.107177734375, + :x2 556.9909133911133, + :y2 588.5357360839844, + :width 864, + :height 1296}, + :rects ({:x1 348.2946548461914, + :y1 565.107177734375, + :x2 556.9909133911133, + :y2 588.5357360839844, + :width 864, + :height 1296}), + :page 293}, + :content {:text "The Linux Address Space"}, + :properties {:color "yellow"}} + {:id #uuid "6433b05c-6a5a-4ae5-8664-03fa83483598", + :page 294, + :position {:bounding {:x1 500.5506362915039, + :y1 382.1964416503906, + :x2 683.1516494750977, + :y2 405.6250305175781, + :width 864, + :height 1296}, + :rects ({:x1 500.57144927978516, + :y1 382.1964416503906, + :x2 683.1516494750977, + :y2 405.6250305175781, + :width 864, + :height 1296} + {:x1 500.5506362915039, + :y1 383.8571472167969, + :x2 683.1516494750977, + :y2 401.5714416503906, + :width 864, + :height 1296}), + :page 294}, + :content {:text "kernel virtual address"}, + :properties {:color "yellow"}} + {:id #uuid "6433b26b-111b-4fa3-930b-232d23287999", + :page 295, + :position {:bounding {:x1 116.09822082519531, + :y1 685.0357360839844, + :x2 294.3108367919922, + :y2 711.3214416503906, + :width 864, + :height 1296}, + :rects ({:x1 116.09822082519531, + :y1 685.0357360839844, + :x2 294.3108367919922, + :y2 711.3214416503906, + :width 864, + :height 1296}), + :page 295}, + :content {:text "Large Page Support"}, + :properties {:color "yellow"}} + {:id #uuid "6433b29c-817e-44f0-a02e-8ab14f6fe764", + :page 295, + :position {:bounding {:x1 514.8954162597656, + :y1 1039.1785888671875, + :x2 556.5503540039062, + :y2 1056.8928833007812, + :width 864, + :height 1296}, + :rects ({:x1 514.8954162597656, + :y1 1039.1785888671875, + :x2 556.5503540039062, + :y2 1056.8928833007812, + :width 864, + :height 1296}), + :page 295}, + :content {:text "tract"}, + :properties {:color "green"}} + {:id #uuid "6433b321-04d6-4118-9d04-80758598654e", + :page 296, + :position {:bounding {:x1 296.86692810058594, + :y1 294.65179443359375, + :x2 328.1221160888672, + :y2 312.3660888671875, + :width 864, + :height 1296}, + :rects ({:x1 296.86692810058594, + :y1 294.65179443359375, + :x2 328.1221160888672, + :y2 312.3660888671875, + :width 864, + :height 1296}), + :page 296}, + :content {:text "yell"}, + :properties {:color "green"}} + {:id #uuid "6433b345-d17f-48ea-b0d4-ec3eba091be4", + :page 296, + :position {:bounding {:x1 434.13519287109375, + :y1 482.6250305175781, + :x2 491.50811767578125, + :y2 500.33929443359375, + :width 864, + :height 1296}, + :rects ({:x1 434.13519287109375, + :y1 482.6250305175781, + :x2 491.50811767578125, + :y2 500.33929443359375, + :width 864, + :height 1296}), + :page 296}, + :content {:text "scorned"}, + :properties {:color "green"}} + {:id #uuid "6433b5fa-2c4f-434c-9ab8-5142eb2cec45", + :page 302, + :position {:bounding {:x1 645.7665557861328, + :y1 381.64288330078125, + :x2 721.3532867431641, + :y2 399.357177734375, + :width 864, + :height 1296}, + :rects ({:x1 645.7665557861328, + :y1 381.64288330078125, + :x2 721.3532867431641, + :y2 399.357177734375, + :width 864, + :height 1296}), + :page 302}, + :content {:text "multitude"}, + :properties {:color "green"}} + {:id #uuid "6433b625-8749-4211-8d7a-3770dcd86ec2", + :page 301, + :position {:bounding {:x1 402.8839416503906, + :y1 240.49996948242188, + :x2 494.86724853515625, + :y2 263.9285583496094, + :width 864, + :height 1296}, + :rects ({:x1 402.8839416503906, + :y1 240.49996948242188, + :x2 494.86724853515625, + :y2 263.9285583496094, + :width 864, + :height 1296}), + :page 301}, + :content {:text "speculative"}, + :properties {:color "green"}} + {:id #uuid "6433b63d-6815-4c33-a5fb-c7c20c06fcab", + :page 297, + :position {:bounding {:x1 116.09822463989258, + :y1 178.55357360839844, + :x2 259.98523330688477, + :y2 204.8392791748047, + :width 864, + :height 1296}, + :rects ({:x1 116.09822463989258, + :y1 178.55357360839844, + :x2 259.98523330688477, + :y2 204.8392791748047, + :width 864, + :height 1296}), + :page 297}, + :content {:text "The Page Cache"}, + :properties {:color "yellow"}} + {:id #uuid "6433b6c0-0673-41c5-93a5-8280f5a6ab4b", + :page 297, + :position {:bounding {:x1 174.29305267333984, + :y1 669.607177734375, + :x2 257.4332275390625, + :y2 687.3214721679688, + :width 864, + :height 1296}, + :rects ({:x1 174.29305267333984, + :y1 669.607177734375, + :x2 257.4332275390625, + :y2 687.3214721679688, + :width 864, + :height 1296}), + :page 297}, + :content {:text "subverted "}, + :properties {:color "green"}} + {:id #uuid "6433b6dc-b1d4-4c88-bd92-8c9359bece02", + :page 297, + :position {:bounding {:x1 345.1690216064453, + :y1 772.8750305175781, + :x2 558.5497894287109, + :y2 790.5893249511719, + :width 864, + :height 1296}, + :rects ({:x1 345.1690216064453, + :y1 772.8750305175781, + :x2 558.5497894287109, + :y2 790.5893249511719, + :width 864, + :height 1296}), + :page 297}, + :content {:text "2Q replacement algorithm s"}, + :properties {:color "yellow"}} + {:id #uuid "6433b736-af15-4e56-b2ba-3bec294483ce", + :page 297, + :position {:bounding {:x1 0, + :y1 93.14286422729492, + :x2 691.9608764648438, + :y2 441.3750305175781, + :width 864, + :height 1296}, + :rects ({:x1 0, + :y1 93.14286422729492, + :x2 0, + :y2 114.28572273254395, + :width 864, + :height 1296} + {:x1 0, + :y1 109.14286518096924, + :x2 0, + :y2 130.28572368621826, + :width 864, + :height 1296} + {:x1 0, + :y1 125.14286613464355, + :x2 0, + :y2 146.28572463989258, + :width 864, + :height 1296} + {:x1 0, + :y1 141.14286613464355, + :x2 0, + :y2 162.28572463989258, + :width 864, + :height 1296} + {:x1 0, + :y1 157.1428680419922, + :x2 0, + :y2 178.28572463989258, + :width 864, + :height 1296} + {:x1 0, + :y1 173.1428680419922, + :x2 0, + :y2 194.28572845458984, + :width 864, + :height 1296} + {:x1 225.17857360839844, + :y1 298.3839416503906, + :x2 318.3839416503906, + :y2 321.81251525878906, + :width 864, + :height 1296} + {:x1 148.9743194580078, + :y1 300.04466247558594, + :x2 690.5357666015625, + :y2 317.9732360839844, + :width 864, + :height 1296} + {:x1 254.58929443359375, + :y1 318.31251525878906, + :x2 433.3707275390625, + :y2 341.7410888671875, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 319.9732360839844, + :x2 690.9696655273438, + :y2 337.9018096923828, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 339.9018096923828, + :x2 691.5281372070312, + :y2 357.83038330078125, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 359.8214416503906, + :x2 689.7545280456543, + :y2 377.7500305175781, + :width 864, + :height 1296} + {:x1 166.80357360839844, + :y1 378.08929443359375, + :x2 334.03582763671875, + :y2 401.51788330078125, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 379.7500305175781, + :x2 690.58251953125, + :y2 397.6786193847656, + :width 864, + :height 1296} + {:x1 557.9017944335938, + :y1 398.01788330078125, + :x2 691.9608764648438, + :y2 421.4464416503906, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 399.6785888671875, + :x2 691.9608764648438, + :y2 417.607177734375, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 417.9464416503906, + :x2 156.94700622558594, + :y2 441.3750305175781, + :width 864, + :height 1296} + {:x1 116.09821701049805, + :y1 420.8035888671875, + :x2 580.4628982543945, + :y2 438.732177734375, + :width 864, + :height 1296}), + :page 297}, + :content {:text "he Linux page cache is unified, keeping pages in memory from three primary sources: memory-mapped files, file data and metadata from devices (usually accessed by directing read() and write() calls to the file system), and heap and stack pages that comprise each process (sometimes called anonymous memory, because there is no named file underneath of it, but rather swap space). These entities are kept in a page cache hash table, allowing for quick lookup when said data is needed."}, + :properties {:color "yellow"}} + {:id #uuid "6433bb38-56f9-47b1-b4d1-617c8693eb50", + :page 305, + :position {:bounding {:x1 216.5846710205078, + :y1 610.785758972168, + :x2 276.1960220336914, + :y2 628.5000534057617, + :width 864, + :height 1296}, + :rects ({:x1 216.5846710205078, + :y1 610.785758972168, + :x2 276.1960220336914, + :y2 628.5000534057617, + :width 864, + :height 1296}), + :page 305}, + :content {:text "shudder "}, + :properties {:color "green"}} + {:id #uuid "6433bce5-e05b-4fd3-8af1-30bdd091ab00", + :page 306, + :position {:bounding {:x1 116.09821701049805, + :y1 417.64288330078125, + :x2 189.00162887573242, + :y2 435.357177734375, + :width 864, + :height 1296}, + :rects ({:x1 116.09821701049805, + :y1 417.64288330078125, + :x2 189.00162887573242, + :y2 435.357177734375, + :width 864, + :height 1296}), + :page 306}, + :content {:text "cheapskate"}, :properties {:color "green"}}], - :extra {:page 260}} + :extra {:page 309}} diff --git a/pages/hls__ostep_1680491762166_0.md b/pages/hls__ostep_1680491762166_0.md index bd76f3b..2bdce4f 100644 --- a/pages/hls__ostep_1680491762166_0.md +++ b/pages/hls__ostep_1680491762166_0.md @@ -1014,16 +1014,330 @@ file-path:: ../assets/ostep_1680491762166_0.pdf ls-type:: annotation id:: 64319715-78ae-4efe-bab1-def007ee8e78 hl-color:: yellow - - Reserve some space on disk for moving pages back and forth, and the OS needs to remember the disk address of a given page. + - Reserve some space on disk for moving pages back and forth, and the OS needs to remember the *disk address* of a given page. - swap space is not the only on-disk location for swapping, e.g. program binary loading, not necessarily load the whole code segment at first hl-page:: 258 ls-type:: annotation id:: 64319809-1dbe-48dc-a4e4-7e14062d42c5 hl-color:: yellow - - -- -- chinery + - Present bit and Page fault + hl-page:: 259 + ls-type:: annotation + id:: 643221b9-c6ee-4cdd-bde9-6d31cd39f9f3 + hl-color:: yellow + - PTE has a present bit which indicates whether the page is in memory. When accessing a page with present bit clear (of course, assume valid), hardware raises a page fault exception. + - One way to keep the *disk address* is to reuse the original PFN field(after all, when a page is on disk, PFN is invalid) + - while the I/O is in flight, the process will be in the blocked state + hl-page:: 261 + ls-type:: annotation + id:: 6432277e-131b-4651-a2e9-bd51e4e5b7e6 + hl-color:: yellow + - Page-Fault Control Flow Algorithm (Software) + ls-type:: annotation + hl-page:: 263 + hl-color:: yellow + id:: 643229bd-fc80-45a7-a326-ddb73c8df04f + - What if the memory if full? + - *page out* one or more pages to make room for the new page(s) + - In practice, OS always wants to keep a small amount of memory free. Most OSs have some kind of high watermark (HW ) and low watermark (LW ) to help decide when to start evicting pages from memory. + hl-page:: 263 + ls-type:: annotation + id:: 64322a2c-91e1-47b7-8c3a-174d1c718b9f + hl-color:: yellow + - When the OS notices that there are fewer than LW pages available, a background thread that is responsible for freeing memory runs. + hl-page:: 263 + ls-type:: annotation + id:: 64322b0d-6e56-44aa-a5ec-a23e43355053 + hl-color:: yellow + The thread evicts pages until there are HW pages available. + The background thread then goes to sleep. + - Possible optimization: cluster or group a number of pages and write them out at once for better disk efficiency +- proactive 积极主动的;主动出击的;先发制人的 + hl-page:: 263 ls-type:: annotation - hl-page:: 259 + id:: 6432298b-31e8-419e-b84d-3ecf08616a25 hl-color:: green - id:: 64319857-9885-49e0-9e51-c974f0b6b038 \ No newline at end of file +- Replacement Policy + hl-page:: 268 + ls-type:: annotation + id:: 64324655-73cb-40a7-814b-1dd26b310e41 + hl-color:: yellow + - cache: RAM can be regarded as the *cache* for all the pages in the system. And the goal of our replacement policy is to minimize cache misses. + hl-page:: 268 + ls-type:: annotation + id:: 6432466b-0d2b-4dac-990f-168a82743a94 + hl-color:: yellow + - Average Memory Access Time (AMAT): $AMAT = T_M + P_{Miss} \cdot T_D$, where $T_M$ is the cost of memory access and $T_D$ is the cost of disk access. The cost of disk access is so high that *miss rate* is crucial to the overall AMAT. + hl-page:: 268 + ls-type:: annotation + id:: 6432471f-f8f1-4a2c-aa82-abd0ec24142e + hl-color:: yellow + - Optimal Replacement Policy + ls-type:: annotation + hl-page:: 269 + hl-color:: yellow + id:: 643248c0-69b7-4b23-a8be-94df2abb38e6 + - Replace the page that will *be accessed furthest in the future*. + - The reason this is true is simple: you will refer to the other pages before you refer to the one furthest out. + ls-type:: annotation + hl-page:: 270 + hl-color:: yellow + id:: 64324c4e-165b-4ba4-838a-afc002decd34 + - FIFO: evict the earliest page, cannot determine the importance of blocks + ls-type:: annotation + hl-page:: 271 + hl-color:: yellow + id:: 64325410-09a2-472f-b67b-426df53d4c81 + - Random: randomly choose one page to evict, depend on the luck + hl-page:: 273 + ls-type:: annotation + id:: 64325422-d727-4104-9c85-6c18260a1b6e + hl-color:: yellow + - LRU + ls-type:: annotation + hl-page:: 274 + hl-color:: yellow + id:: 643256d9-6c65-4e29-adab-f5a6d112bccd + - Historical information: frequency and recency of access. Thus there is Least-Frequently-Used (LFU) policy and Least-Recently-Used (LRU) policy + - LRU Implement + hl-page:: 278 + ls-type:: annotation + id:: 64325b27-c557-40ad-86ff-e46eb11dbf77 + hl-color:: yellow + - Precise LRU: On every memory reference, some data structure need to be updated to maintain the LRU property, which is slow even with some hardware support. + - Approximating LRU: + - Hardware support: *use bit* in PTE. Whenever a page is referenced, the *use bit* is set to 1 and the hardware never clears it. + - clock algorithm: All pages are stored in a circular structure, and a *clock hand* points to one of the pages. On eviction demand, check the *used bit* of the current page. If set, clear it and go to the next page, until a page with *used bit* is 0 (it guarantees to converge, the worst case is to search through all pages and clear them all). + hl-page:: 279 + ls-type:: annotation + id:: 6432650c-142d-46ba-a8b1-4f0c1af50635 + hl-color:: yellow + - Indeed, any approach which periodically clears the *use bits* and then differentiates between which pages have *use bits* of 1 versus 0 to decide which to replace would be fine + hl-page:: 279 + ls-type:: annotation + id:: 64326b23-8bc8-4b41-96ac-d4044db00dbd + hl-color:: yellow + - Workload Examples + ls-type:: annotation + hl-page:: 275 + hl-color:: yellow + id:: 643258e8-576b-4e22-91da-8579517b82bc + - **No-locality workload**: each reference is to a random page within the set of accessed pages. Optimal do better, and the others are almost the same. + - **80-20 workload**: 80% of the references are made to 20% of the pages. + - **Looping-sequential workload**: worst case for FIFO and LRU, because they keep evicting older pages which will be accessed sooner than cached pages. + Random does better, one of its nice properties is not having weird corner-case behaviors. + *scan resistance* is added to LRU to try to avoid this worst case for LRU. + - **Dirty Bit**: Dirty pages may be more costly to evict, because they need to be written to disk instead of simply discarded. Therefore, some systems prefer to evict clean pages over dirty pages. + - **thrashing** + hl-page:: 281 + ls-type:: annotation + id:: 64339732-f900-4f7b-8783-782c8cb73550 + hl-color:: yellow + - The system will constantly be paging, when the running process requires more memory than the available physical memory. + - **admission control**: not to run some subset of the processes when they require too much memory + hl-page:: 281 + ls-type:: annotation + id:: 643398d2-0574-49f6-9873-c3b725d3649f + hl-color:: yellow +- TYPES OF CACHE MISSES: + hl-page:: 271 + ls-type:: annotation + id:: 64324c6c-2057-46b3-aa2f-fa1e0748e1e8 + hl-color:: yellow + - compulsory miss: cold-start miss + - capacity miss + - conflict miss: set-associativity, limits on where an item can be placed +- anomaly 异常事物;反常现象 + hl-page:: 272 + ls-type:: annotation + id:: 6432503c-9c30-4ae0-8aa0-e867554b1662 + hl-color:: green +- discrepancy 差异;不符合;不一致 + ls-type:: annotation + hl-page:: 282 + hl-color:: green + id:: 64339651-5357-49a3-b495-6f1db7826dcc +- prohibitive 费用或价格)高得令人望而却步的;限制性的,禁止的; + ls-type:: annotation + hl-page:: 282 + hl-color:: green + id:: 64339660-fb5e-46f9-94a1-bd70bc684fc5 +- thrash 翻来覆去;抽打;一举战胜 (不是 trash 垃圾) + hl-page:: 281 + ls-type:: annotation + id:: 64339700-b057-4150-bc27-1a3ee4cb536d + hl-color:: green +- VAX/VMS Virtual Memory + ls-type:: annotation + hl-page:: 286 + hl-color:: yellow + id:: 64339ec6-877f-42eb-ba92-4211f543c0f3 + - Memory Management Hardware + ls-type:: annotation + hl-page:: 286 + hl-color:: yellow + id:: 64339efd-a5cd-487b-9eb8-caf7e824de7a + - 32 bit VA and 512B page -> 2 bit segment, 21 bit VPN, 9 bit offset + - 4 segments: P0, P1, S0, S1 + - Process Space: lower half of the AS, unique for each process. Divided into `P0` and `P1`, `P0` includes Code and Heap, while `P1` is Stack. + - System Space: upper half of AS, though only half of this is used by the VMS OS. + - Problem: 512-Byte page is so small that page table could occupy too much memory. + - Per-segment page table, VAX-11 provides each segment with a pair of base-and-bounds register + - The page tables are allocated in OS memory(System Space), though this complicates the translation process. + - The VAX/VMS Address Space + ls-type:: annotation + hl-page:: 288 + hl-color:: yellow + id:: 6433a3cc-c528-4c8d-bca2-9bdab780e27a + - Invalid Page 0: help debug null-pointers + - base and bounds registers for S0 (OS) stay the same and the kernel is mapped into each process's AS + - Page Replacement + ls-type:: annotation + hl-page:: 289 + hl-color:: yellow + id:: 6433a4e2-191f-4c49-8c5f-e9a78cb4c476 + - No reference bit: VAX-11 doesn't have this. Fortunately, just what we does in COW, this can be emulated by page fault. + - Memory hogging: LRU is not a fair share policy. + - Segmented FIFO: + - Resident Set Size(RSS): each process has a maximum number of pages it can keep in memory + - FIFO list: when a process exceeds its RSS, the first page is evicted + - Second-chance lists: a *global* clean-page list and a *global* dirty-page list. When evicted, page is removed from per-process FIFO and added to these 2 lists. If another process needs a free page, give a clean page from this list. Or, if the original process raises a page fault, it reclaims a page. + - **clustering**: VMS groups large batches of pages together from the global dirty list, and writes them to disk in one fell swoop. + hl-page:: 290 + ls-type:: annotation + id:: 6433a931-90cf-4e1f-8ea7-922bc81f354e + hl-color:: yellow + - Lazy optimizations: use protection and trap to save some laborious work + hl-page:: 291 + ls-type:: annotation + id:: 6433a9cd-4ecd-4a8e-b778-8c0c36af929a + hl-color:: yellow + - **demand zeroing**: The OS is responsible to zero a page when allocating it to a process for security and isolation. This can be deferred to when the process actually uses this page in case the process never uses it. + hl-page:: 291 + ls-type:: annotation + id:: 6433aa48-cb30-4a01-9670-64ac357bc2ab + hl-color:: yellow + - **copy-on-write**: When the OS needs to copy a page from one address space to another, instead of copying it, it can map it into the target address space and mark it read-only in both address spaces. + hl-page:: 291 + ls-type:: annotation + id:: 6433aa4c-e737-43aa-bcc9-34609d86fe42 + hl-color:: yellow +- circumvent 规避;设法回避;绕过;绕行 + ls-type:: annotation + hl-page:: 287 + hl-color:: green + id:: 6433a0cd-3e8b-4c0c-af4e-8cbf498b9231 +- astute 精明的;狡猾的 + ls-type:: annotation + hl-page:: 289 + hl-color:: green + id:: 6433a2a0-7ba4-46cf-b1ec-fc02ce4c7916 +- hog + ls-type:: annotation + hl-page:: 289 + hl-color:: green + id:: 6433a4fb-da6c-4741-a962-6c95c7fd9f0c +- swoop 俯冲;突然袭击;突击搜查;突然行动 + ls-type:: annotation + hl-page:: 291 + hl-color:: green + id:: 6433a96f-0414-4ec5-963b-72161ce23ef0 +- The Linux Virtual Memory System + ls-type:: annotation + hl-page:: 292 + hl-color:: yellow + id:: 6433abf7-a59b-42ae-af0b-05706abee681 + - The Linux Address Space + ls-type:: annotation + hl-page:: 293 + hl-color:: yellow + id:: 6433ac19-794e-4bcb-abf9-d406d1a148d3 + - **kernel logical addresses** + - allocated by `kmalloc` + - most kernel data structures live here like page tables and per-process kernel stacks + - cannot be swapped to disk + - linear mapped to physical memory, `PA = VA - 0xC000_0000`, which simplifies translation and its *contiguity* for DMA + - kernel virtual address + ls-type:: annotation + hl-page:: 294 + hl-color:: yellow + id:: 6433b05c-6a5a-4ae5-8664-03fa83483598 + - allocated by `vmalloc` + - no physical contiguity guarantee + - easier to map and able to allocate larger size + - Page Table + - 64-bit page table structure: 48 bit VA, including 36 bit 4 level VPN and 12 bit offset for 4KB page size + - Large Page Support + ls-type:: annotation + hl-page:: 295 + hl-color:: yellow + id:: 6433b26b-111b-4fa3-930b-232d23287999 + - Intel x86 allows for use of multiple page sizes + - Advantages: less memory consumption from page table, fewer TLB miss, shorter TLB miss path + - Disadvantages: internal fragmentation, more cost in swapping + - Explicit interface: applications explicitly request memory allocated with large pages through calls like `mmap` or `shmget` + - Transparent huge page support: When this feature is enabled, the operating system automatically looks for opportunities to allocate huge pages without requiring application modification. + - The Page Cache + ls-type:: annotation + hl-page:: 297 + hl-color:: yellow + id:: 6433b63d-6815-4c33-a5fb-c7c20c06fcab + - To reduce costs of accessing persistent storage + - unified, keeping pages in memory from 3 primary sources: 1. memory-mapped files; 2. file data and metadata from devices; 3. heap and stack pages that comprise each process. + hl-page:: 297 + ls-type:: annotation + id:: 6433b736-af15-4e56-b2ba-3bec294483ce + hl-color:: yellow + - Dirty data is periodically written to the backing store by background threads + - 2Q replacement algorithm + hl-page:: 297 + ls-type:: annotation + id:: 6433b6dc-b1d4-4c88-bd92-8c9359bece02 + hl-color:: yellow + - Solved problem: cyclic access to a large file will kick out other pages + - Divide the pages into 2 lists: *inactive* list and *active* list + - accessed for the first time, a page is placed on the *inactive* list + re-referenced, the page is promoted to the *active* list + periodically move bottom of the *active* list to *inactive* list + within the 2 lists, manage pages in LRU order + - When replacing, the candidate is taken from the *inactive* list. +- tract + ls-type:: annotation + hl-page:: 295 + hl-color:: green + id:: 6433b29c-817e-44f0-a02e-8ab14f6fe764 +- yell + ls-type:: annotation + hl-page:: 296 + hl-color:: green + id:: 6433b321-04d6-4118-9d04-80758598654e +- scorn + ls-type:: annotation + hl-page:: 296 + hl-color:: green + id:: 6433b345-d17f-48ea-b0d4-ec3eba091be4 +- subverted + ls-type:: annotation + hl-page:: 297 + hl-color:: green + id:: 6433b6c0-0673-41c5-93a5-8280f5a6ab4b +- speculative + ls-type:: annotation + hl-page:: 301 + hl-color:: green + id:: 6433b625-8749-4211-8d7a-3770dcd86ec2 +- multitude + ls-type:: annotation + hl-page:: 302 + hl-color:: green + id:: 6433b5fa-2c4f-434c-9ab8-5142eb2cec45 +- shudder + ls-type:: annotation + hl-page:: 305 + hl-color:: green + id:: 6433bb38-56f9-47b1-b4d1-617c8693eb50 +- cheapskate + ls-type:: annotation + hl-page:: 306 + hl-color:: green + id:: 6433bce5-e05b-4fd3-8af1-30bdd091ab00 \ No newline at end of file