diff --git a/assets/ostep_1680491762166_0.edn b/assets/ostep_1680491762166_0.edn index d4ba8f6..17168b3 100644 --- a/assets/ostep_1680491762166_0.edn +++ b/assets/ostep_1680491762166_0.edn @@ -1864,5 +1864,563 @@ :height 1555.2}), :page 138}, :content {:text "Linux Multiprocessor Schedulers"}, + :properties {:color "yellow"}} + {:id #uuid "642faf44-5876-46b3-acb4-b786f390716f", + :page 141, + :position {:bounding {:x1 151.36608123779297, + :y1 528.0178985595703, + :x2 312.84705352783203, + :y2 550.3036041259766, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 151.36608123779297, + :y1 528.0178985595703, + :x2 312.84705352783203, + :y2 550.3036041259766, + :width 806.3999999999999, + :height 1209.6}), + :page 141}, + :content {:text "super-linear speedup"}, + :properties {:color "yellow"}} + {:id #uuid "642fb2f2-b9a4-48f4-b847-2b30d632db32", + :page 142, + :position {:bounding {:x1 498.49041748046875, + :y1 861.4910888671875, + :x2 549.4505004882812, + :y2 878.0625305175781, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 498.49041748046875, + :y1 861.4910888671875, + :x2 549.4505004882812, + :y2 878.0625305175781, + :width 806.3999999999999, + :height 1209.6}), + :page 142}, + :content {:text "paranoid"}, + :properties {:color "green"}} + {:id #uuid "642fb3d2-e51f-4b9b-8a79-dea9d8e6a7b0", + :page 143, + :position {:bounding {:x1 641.2160110473633, + :y1 464.18752670288086, + :x2 665.7519607543945, + :y2 480.75893783569336, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 641.2160110473633, + :y1 464.18752670288086, + :x2 665.7519607543945, + :y2 480.75893783569336, + :width 806.3999999999999, + :height 1209.6}), + :page 143}, + :content {:text "rage"}, + :properties {:color "green"}} + {:id #uuid "642fb4c0-5c56-44e9-aac6-396212698309", + :page 144, + :position {:bounding {:x1 408.4881896972656, + :y1 858.1786193847656, + :x2 470.48919677734375, + :y2 874.7500610351562, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 408.4881896972656, + :y1 858.1786193847656, + :x2 470.48919677734375, + :y2 874.7500610351562, + :width 806.3999999999999, + :height 1209.6}), + :page 144}, + :content {:text "inundated "}, + :properties {:color "green"}} + {:id #uuid "642fb51d-f82c-40b4-82ad-878ee13a2264", + :page 145, + :position {:bounding {:x1 185.1488800048828, + :y1 464.1875228881836, + :x2 222.21925354003906, + :y2 480.7589340209961, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 185.1488800048828, + :y1 464.1875228881836, + :x2 222.21925354003906, + :y2 480.7589340209961, + :width 806.3999999999999, + :height 1209.6}), + :page 145}, + :content {:text "errant"}, + :properties {:color "green"}} + {:id #uuid "642fb54e-23c4-4667-955d-ad09fbbf6268", + :page 146, + :position {:bounding {:x1 467.1715717315674, + :y1 444.8214416503906, + :x2 508.98282051086426, + :y2 461.39288330078125, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 467.1715717315674, + :y1 444.8214416503906, + :x2 508.98282051086426, + :y2 461.39288330078125, + :width 806.3999999999999, + :height 1209.6}), + :page 146}, + :content {:text "darned"}, + :properties {:color "green"}} + {:id #uuid "642fb9df-d4c2-4b75-9341-e9ea53d42dcc", + :page 148, + :position {:bounding {:x1 406.32401275634766, + :y1 702.6160888671875, + :x2 457.8776626586914, + :y2 720.3303833007812, + :width 864, + :height 1296}, + :rects ({:x1 406.32401275634766, + :y1 702.6160888671875, + :x2 457.8776626586914, + :y2 720.3303833007812, + :width 864, + :height 1296}), + :page 148}, + :content {:text "pesky "}, + :properties {:color "green"}} + {:id #uuid "642fbad1-cda0-4ef4-97f7-38c3519042f4", + :page 148, + :position {:bounding {:x1 328.5535888671875, + :y1 740.8035888671875, + :x2 439.8475036621094, + :y2 764.232177734375, + :width 864, + :height 1296}, + :rects ({:x1 328.5535888671875, + :y1 740.8035888671875, + :x2 439.8475036621094, + :y2 764.232177734375, + :width 864, + :height 1296}), + :page 148}, + :content {:text "address space"}, + :properties {:color "yellow"}} + {:id #uuid "642fbb24-877c-4c90-9e13-4e613e2e23d3", + :page 149, + :position {:bounding {:x1 658.6038513183594, + :y1 977.8750610351562, + :x2 690.0156555175781, + :y2 995.58935546875, + :width 864, + :height 1296}, + :rects ({:x1 658.6038513183594, + :y1 977.8750610351562, + :x2 690.0156555175781, + :y2 995.58935546875, + :width 864, + :height 1296}), + :page 149}, + :content {:text "alas"}, + :properties {:color "green"}} + {:id #uuid "642fbb6e-9a9a-4ff6-92ea-b36903da1b88", + :page 150, + :position {:bounding {:x1 116.09821701049805, + :y1 440.86608123779297, + :x2 176.94826126098633, + :y2 458.58040618896484, + :width 864, + :height 1296}, + :rects ({:x1 116.09821701049805, + :y1 440.86608123779297, + :x2 176.94826126098633, + :y2 458.58040618896484, + :width 864, + :height 1296}), + :page 150}, + :content {:text "tandem "}, + :properties {:color "green"}} + {:id #uuid "642fbc3d-d70b-4adb-bb0b-6b7038480589", + :page 150, + :position {:bounding {:x1 295.0501594543457, + :y1 1102.3929138183594, + :x2 362.9385566711426, + :y2 1116.1072082519531, + :width 864, + :height 1296}, + :rects ({:x1 295.0501594543457, + :y1 1102.3929138183594, + :x2 362.9385566711426, + :y2 1116.1072082519531, + :width 864, + :height 1296}), + :page 150}, + :content {:text "stipulated "}, + :properties {:color "green"}} + {:id #uuid "642fbfcb-7327-44b8-9b25-308728264a81", + :page 159, + :position {:bounding {:x1 185.8641815185547, + :y1 987.4286193847656, + :x2 255.6378631591797, + :y2 1005.1429138183594, + :width 864, + :height 1296}, + :rects ({:x1 185.8641815185547, + :y1 987.4286193847656, + :x2 255.6378631591797, + :y2 1005.1429138183594, + :width 864, + :height 1296}), + :page 159}, + :content {:text "scribble "}, + :properties {:color "green"}} + {:id #uuid "642fc139-afc3-4ba4-ad01-4cc33d9e535c", + :page 155, + :position {:bounding {:x1 532.6004333496094, + :y1 346.8839416503906, + :x2 691.9529724121094, + :y2 384.5982360839844, + :width 864, + :height 1296}, + :rects ({:x1 532.6004333496094, + :y1 346.8839416503906, + :x2 691.9529724121094, + :y2 384.5982360839844, + :width 864, + :height 1296}), + :page 155}, + :content {:text "Memory API"}, + :properties {:color "yellow"}} + {:id #uuid "642fc48b-e5bf-4043-b042-218445c2b714", + :page 167, + :position {:bounding {:x1 171.89286041259766, + :y1 642.3482513427734, + :x2 300.2626724243164, + :y2 664.0625457763672, + :width 864, + :height 1296}, + :rects ({:x1 171.89286041259766, + :y1 642.3482513427734, + :x2 300.2626724243164, + :y2 664.0625457763672, + :width 864, + :height 1296}), + :page 167}, + :content {:text "Assumptions"}, + :properties {:color "yellow"}} + {:id #uuid "642fc65f-1147-459c-8906-5ffca38b1e66", + :page 170, + :position {:bounding {:x1 108.3486328125, + :y1 864.0803985595703, + :x2 460.24578857421875, + :y2 884.6518249511719, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 108.3486328125, + :y1 864.0803985595703, + :x2 460.24578857421875, + :y2 884.6518249511719, + :width 806.3999999999999, + :height 1209.6}), + :page 170}, + :content {:text "Dynamic (Hardware-based) Relocation"}, + :properties {:color "yellow"}} + {:id #uuid "642fc677-cbd4-47fd-bd90-3ed0cd56cc5b", + :page 171, + :position {:bounding {:x1 339.95838165283203, + :y1 182.0178680419922, + :x2 573.7257461547852, + :y2 198.5892791748047, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 339.95838165283203, + :y1 182.0178680419922, + :x2 573.7257461547852, + :y2 198.5892791748047, + :width 806.3999999999999, + :height 1209.6}), + :page 171}, + :content {:text "SOFTWARE-BASED RELOCATION"}, + :properties {:color "yellow"}} + {:id #uuid "642fced7-c809-4d1e-bddb-da6474e851b8", + :page 172, + :position {:bounding {:x1 0, + :y1 462.2857360839844, + :x2 645.8682518005371, + :y2 768.1161193847656, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 0, + :y1 462.2857360839844, + :x2 0, + :y2 481.71429443359375, + :width 806.3999999999999, + :height 1209.6} + {:x1 582.5714378356934, + :y1 727.2321472167969, + :x2 645.8682518005371, + :y2 749.5179138183594, + :width 806.3999999999999, + :height 1209.6} + {:x1 108.35714340209961, + :y1 745.8304138183594, + :x2 307.23522567749023, + :y2 768.1161193847656, + :width 806.3999999999999, + :height 1209.6} + {:x1 108.35714340209961, + :y1 748.6875305175781, + :x2 307.23522567749023, + :y2 765.4286193847656, + :width 806.3999999999999, + :height 1209.6}), + :page 172}, + :content {:text "memory management unit (MMU)"}, + :properties {:color "yellow"}} + {:id #uuid "642fcf85-6cfb-4eb9-aef2-ddcef7027b70", + :page 173, + :position {:bounding {:x1 594.1667251586914, + :y1 801.4464416503906, + :x2 631.7198867797852, + :y2 818.0178833007812, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 594.1667251586914, + :y1 801.4464416503906, + :x2 631.7198867797852, + :y2 818.0178833007812, + :width 806.3999999999999, + :height 1209.6}), + :page 173}, + :content {:text "havoc"}, + :properties {:color "green"}} + {:id #uuid "642fcf90-3133-4002-b986-4fd8157ab707", + :page 173, + :position {:bounding {:x1 263.87279510498047, + :y1 822.919677734375, + :x2 300.8291549682617, + :y2 839.4910888671875, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 263.87279510498047, + :y1 822.919677734375, + :x2 300.8291549682617, + :y2 839.4910888671875, + :width 806.3999999999999, + :height 1209.6}), + :page 173}, + :content {:text "wreak"}, + :properties {:color "green"}} + {:id #uuid "642fcfa9-c026-4885-9f50-029ca80ce148", + :page 174, + :position {:bounding {:x1 295.96537590026855, + :y1 470.6607437133789, + :x2 344.6133556365967, + :y2 487.2321548461914, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 295.96537590026855, + :y1 470.6607437133789, + :x2 344.6133556365967, + :y2 487.2321548461914, + :width 806.3999999999999, + :height 1209.6}), + :page 174}, + :content {:text "ghastly"}, + :properties {:color "green"}} + {:id #uuid "642fcff1-ae71-4756-9847-5ab85c41be06", + :page 174, + :position {:bounding {:x1 563.5171890258789, + :y1 819.3750610351562, + :x2 622.2142715454102, + :y2 835.9464874267578, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 563.5171890258789, + :y1 819.3750610351562, + :x2 622.2142715454102, + :y2 835.9464874267578, + :width 806.3999999999999, + :height 1209.6}), + :page 174}, + :content {:text "junctures"}, + :properties {:color "green"}} + {:id #uuid "642fd071-db9c-4f0e-886f-b6ba3e5e4f7d", + :page 175, + :position {:bounding {:x1 263.1218795776367, + :y1 857.2053833007812, + :x2 331.5805435180664, + :y2 873.7768249511719, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 263.1218795776367, + :y1 857.2053833007812, + :x2 331.5805435180664, + :y2 873.7768249511719, + :width 806.3999999999999, + :height 1209.6}), + :page 175}, + :content {:text "oblivious "}, + :properties {:color "green"}} + {:id #uuid "642fd1ed-22a9-4443-b02f-bc35fe42e50b", + :page 174, + :position {:bounding {:x1 245.77680206298828, + :y1 412.4821662902832, + :x2 599.3089981079102, + :y2 434.76787185668945, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 245.77680206298828, + :y1 412.4821662902832, + :x2 599.3089981079102, + :y2 434.76787185668945, + :width 806.3999999999999, + :height 1209.6}), + :page 174}, + :content {:text "Dynamic Relocation: Hardware Requirements"}, + :properties {:color "yellow"}} + {:id #uuid "642fd1f4-d573-4dbc-9e48-02adacc69e5e", + :page 175, + :position {:bounding {:x1 258.5803756713867, + :y1 304.2589302062988, + :x2 690.6892623901367, + :y2 326.5446662902832, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 258.5803756713867, + :y1 304.2589302062988, + :x2 690.6892623901367, + :y2 326.5446662902832, + :width 806.3999999999999, + :height 1209.6}), + :page 175}, + :content {:text "Dynamic Relocation: Operating System Responsibilities"}, + :properties {:color "yellow"}} + {:id #uuid "642fd2f3-e05f-453c-8286-15e7807e8e97", + :page 178, + :position {:bounding {:x1 0, + :y1 190.2857208251953, + :x2 645.8295669555664, + :y2 413.9375457763672, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 0, + :y1 190.2857208251953, + :x2 0, + :y2 209.7142791748047, + :width 806.3999999999999, + :height 1209.6} + {:x1 624.4375381469727, + :y1 373.05357360839844, + :x2 645.8295669555664, + :y2 395.3392791748047, + :width 806.3999999999999, + :height 1209.6} + {:x1 108.35714721679688, + :y1 391.6518096923828, + :x2 266.05450439453125, + :y2 413.9375457763672, + :width 806.3999999999999, + :height 1209.6} + {:x1 108.35714721679688, + :y1 394.5089569091797, + :x2 266.05450439453125, + :y2 411.2500457763672, + :width 806.3999999999999, + :height 1209.6}), + :page 178}, + :content {:text "internal fragmentation"}, + :properties {:color "yellow"}} + {:id #uuid "642fd36e-c0a7-4ead-a3a8-f085d6576229", + :page 167, + :position {:bounding {:x1 261.12808990478516, + :y1 205.67858013510704, + :x2 533.4398574829102, + :y2 227.96430096030235, + :width 806.3999999999999, + :height 1209.6}, + :rects ({:x1 261.4018020629883, + :y1 205.67858013510704, + :x2 533.4398574829102, + :y2 227.96430096030235, + :width 806.3999999999999, + :height 1209.6} + {:x1 261.12808990478516, + :y1 207.41965374350548, + :x2 533.4398574829102, + :y2 223.99108013510704, + :width 806.3999999999999, + :height 1209.6}), + :page 167}, + :content {:text "hardware-based address translation"}, + :properties {:color "yellow"}} + {:id #uuid "642fd5c3-30f9-4770-8ec5-09555d21c4ab", + :page 181, + :position {:bounding {:x1 116.09822082519531, + :y1 958.7767944335938, + :x2 514.5045623779297, + :y2 980.4910888671875, + :width 864, + :height 1296}, + :rects ({:x1 116.09822082519531, + :y1 958.7767944335938, + :x2 514.5045623779297, + :y2 980.4910888671875, + :width 864, + :height 1296}), + :page 181}, + :content {:text "Segmentation: Generalized Base/Bounds"}, + :properties {:color "yellow"}} + {:id #uuid "642fda54-4040-4d9b-ab00-13523aeb54c4", + :page 185, + :position {:bounding {:x1 378.80360412597656, + :y1 1097.276840209961, + :x2 524.0114593505859, + :y2 1120.7054138183594, + :width 864, + :height 1296}, + :rects ({:x1 378.80360412597656, + :y1 1097.276840209961, + :x2 448.84825134277344, + :y2 1120.7054138183594, + :width 864, + :height 1296} + {:x1 443.54466247558594, + :y1 1100.1339874267578, + :x2 524.0114593505859, + :y2 1118.0625610351562, + :width 864, + :height 1296}), + :page 185}, + :content {:text "implicit approach,"}, + :properties {:color "yellow"}} + {:id #uuid "642fdca4-df4b-4515-8e96-ef4b05a7bb62", + :page 186, + :position {:bounding {:x1 566.0081558227539, + :y1 391.0178680419922, + :x2 707.7133255004883, + :y2 408.73216247558594, + :width 864, + :height 1296}, + :rects ({:x1 566.0081558227539, + :y1 391.0178680419922, + :x2 707.7133255004883, + :y2 408.73216247558594, + :width 864, + :height 1296}), + :page 186}, + :content {:text "it grows backwards"}, + :properties {:color "yellow"}} + {:id #uuid "642fe0dc-7d4b-41af-a136-69164ee77ab4", + :page 187, + :position {:bounding {:x1 116.09822273254395, + :y1 179.01787185668945, + :x2 308.1895008087158, + :y2 200.73215103149414, + :width 864, + :height 1296}, + :rects ({:x1 116.09822273254395, + :y1 179.01787185668945, + :x2 308.1895008087158, + :y2 200.73215103149414, + :width 864, + :height 1296}), + :page 187}, + :content {:text "Support for Sharing"}, :properties {:color "yellow"}}], - :extra {:page 142}} + :extra {:page 192}} diff --git a/logseq/bak/pages/hls__ostep_1680491762166_0/2023-04-07T05_34_33.578Z.Desktop.md b/logseq/bak/pages/hls__ostep_1680491762166_0/2023-04-07T05_34_33.578Z.Desktop.md new file mode 100644 index 0000000..3ed65de --- /dev/null +++ b/logseq/bak/pages/hls__ostep_1680491762166_0/2023-04-07T05_34_33.578Z.Desktop.md @@ -0,0 +1,221 @@ +file-path:: ../assets/ostep_1680491762166_0.pdf + +- virtualization, concurrency, and persistence + ls-type:: annotation + hl-page:: 1 + hl-color:: yellow + id:: 642a452b-2dc9-4566-b8a8-95f0caa7b8e3 +- didactic 道德说教的;教诲的; + hl-page:: 2 + ls-type:: annotation + id:: 642a7c33-ca04-447a-a357-88236d0b9360 + hl-color:: green +- Cramming 填塞;填鸭式用功;考试前临时硬记 + hl-page:: 3 + ls-type:: annotation + id:: 642a80b7-43a1-40ba-ad01-815cb171572f + hl-color:: green +- fond 喜爱(尤指认识已久的人);喜爱(尤指长期喜爱的事物) + hl-page:: 4 + ls-type:: annotation + id:: 642a80ef-5f31-422a-8227-3842faa4eb8d + hl-color:: green +- the operating system as a virtual machine, standard library and resource manager + hl-page:: 25 + ls-type:: annotation + id:: 642bb88b-f481-4af6-afb6-7375d37654ce + hl-color:: yellow +- illusion 错觉,幻象 + hl-page:: 27 + ls-type:: annotation + id:: 642bb978-1efe-418e-8894-8493bfd4f6bb + hl-color:: green +- virtualizing the CPU: run many programs at the same time + hl-page:: 27 + ls-type:: annotation + id:: 642bb9c2-efb8-4960-a7bd-36afe1cc0b1d + hl-color:: yellow +- virtualizing memory: each process accesses its own private virtual address space + hl-page:: 29 + ls-type:: annotation + id:: 642bbaae-582b-4b1c-bc60-e709931085e7 + hl-color:: yellow +- intricate 错综复杂的 + ls-type:: annotation + hl-page:: 33 + hl-color:: green + id:: 642bbca9-67e2-45d3-a131-968df46c0cef +- heyday 全盛时期 + ls-type:: annotation + hl-page:: 39 + hl-color:: green + id:: 642bc0e8-ee33-46a6-bf83-407cc1e64737 +- incredulous 不肯相信的;不能相信的;表示怀疑的 + hl-page:: 45 + ls-type:: annotation + id:: 642bc1b3-459e-4e76-b36c-406daba96726 + hl-color:: green +- The definition of a process, informally, is quite simple: it is a running program + ls-type:: annotation + hl-page:: 47 + hl-color:: yellow + id:: 642bc39c-f56a-488f-a751-1532e413d474 +- To implement virtualization of the CPU, low-level machinery and some high-level intelligence. + hl-page:: 47 + ls-type:: annotation + id:: 642bc417-a3af-4132-b4b9-9fec9749fc9b + hl-color:: yellow + - mechanisms are low-level methods or protocols that implement a needed piece of functionality + hl-page:: 47 + ls-type:: annotation + id:: 642bc41d-8b68-46d9-908e-ab14b53a859b + hl-color:: yellow + - Policies are algorithms for making some kind of decision within the OS + ls-type:: annotation + hl-page:: 48 + hl-color:: yellow + id:: 642bc579-a1cc-4b67-a8c5-5a33f274c634 +- inventory 库存;财产清单; + hl-page:: 48 + ls-type:: annotation + id:: 642bc8a9-1a7d-4236-86ce-65b0498e9e01 + hl-color:: green +- three states of a process: Running Ready Blocked + hl-page:: 51 + ls-type:: annotation + id:: 642bd104-6b57-44f2-9f10-e5107a926079 + hl-color:: yellow +- nitty-gritty 本质;事实真相;实质问题 + hl-page:: 55 + ls-type:: annotation + id:: 642c279e-0187-4175-abfb-5fcf4e534ae8 + hl-color:: green +- KEY PROCESS TERMS + ls-type:: annotation + hl-page:: 56 + hl-color:: yellow + id:: 642c27e3-d7d6-41d8-9832-73674615a246 +- Interlude: Process API + hl-page:: 60 + ls-type:: annotation + id:: 642cc7d2-cd33-4dd6-879f-72f1070ed96d + hl-color:: yellow + Syscall-fork, wait, exec +- Get it right. Neither abstraction nor simplicity is a substitute for getting it right + ls-type:: annotation + hl-page:: 65 + hl-color:: yellow + id:: 642cc975-cf26-431c-8c38-617da01d89ee +- the separation of fork() and exec() is essential in shell, because it lets the shell run code after the call to fork() but before the call to exec(); this code can alter the environment of the about-to-be-run program + hl-page:: 65 + ls-type:: annotation + id:: 642ccc92-baa5-4b54-8525-9a664698c669 + hl-color:: yellow +- imperative 必要的,命令的;必要的事 + hl-page:: 67 + ls-type:: annotation + id:: 642ccf62-0b5a-41db-899e-3e99a69c2eac + hl-color:: green +- control processes through signal subsystem + hl-page:: 67 + ls-type:: annotation + id:: 642cd11a-eea5-48f8-b4d1-b225f37ccdb4 + hl-color:: yellow +- Limited Direct Execution: Direct execution is to simply run the program directly on the CPU. + hl-page:: 74 + ls-type:: annotation + id:: 642cd1eb-c058-484a-ac25-782e37082bc6 + hl-color:: yellow +- aspiring 有追求的,有抱负的 + hl-page:: 75 + ls-type:: annotation + id:: 642cd2f2-c565-4309-951a-1f809da9beff + hl-color:: green +- user mode and kernel mode + hl-page:: 76 + ls-type:: annotation + id:: 642cd3e3-3fa6-43a6-a37a-cae62c634654 + hl-color:: yellow + - In user mode, code is restricted in what it can do, otherwise the processor will raise an exception + - User code perform system call to do privileged operation. + - To execute a system call, use `trap` and `return-from-trap` instruction: jump to/from kernel and change the privilege level. + - +- Limited Direct Execution Protocol-interesting figure illustrating how system call is done + hl-page:: 78 + ls-type:: annotation + id:: 642cd6be-083b-4ecd-b220-aafef97a8b65 + hl-color:: yellow +- wary 谨慎的;考虑周到的 + hl-page:: 79 + ls-type:: annotation + id:: 642cd6e9-21fc-49c7-b0bb-0c9ba3b7a524 + hl-color:: green +- Switching Between Processes: how OS regain control of the CPU + hl-page:: 80 + ls-type:: annotation + id:: 642cd90e-ab6b-4d4d-8312-cd8c69efdac8 + hl-color:: yellow + - Cooperative Approach: wait for a system call. 1. The processes are expected to give up the CPU periodically through system call `yield`(which does nothing except to transfer control to the OS). 2. The process does something that causes a trap + - Non-Cooperative Approach: timer interrupt. + - Context switch: save a few register values for the currently-executing process. + Two types of register saves/restores: TI, hardware save state to kernel stack; context switch, OS save kernel registers and restore everything to return from trap +- malfeasance 渎职;不正当行为 + hl-page:: 81 + ls-type:: annotation + id:: 642cdc2e-329c-423e-a65a-0a53fb6eaa76 + hl-color:: green +- scoff + hl-page:: 83 + ls-type:: annotation + id:: 642ce319-8087-4252-b51d-42f749f7c283 + hl-color:: green +- enact + ls-type:: annotation + hl-page:: 83 + hl-color:: green + id:: 642ce357-9914-417b-8036-35ae44ac7283 +- whet + ls-type:: annotation + hl-page:: 84 + hl-color:: green + id:: 642cef47-0c2f-482f-8b61-9a715e5438e5 +- analogous + ls-type:: annotation + hl-page:: 86 + hl-color:: green + id:: 642cf0c1-59a2-410e-8f45-517f66ef47f9 +- workload assumptions: Each job, runs for the same amount of time, arrives at the same time, runs to completion, uses only CPU, and run-time is known + hl-page:: 90 + ls-type:: annotation + id:: 642cf292-4464-4c8f-8639-3a194484d4c0 + hl-color:: yellow + - Quite unrealistic, but modern preemptive scheduling somewhat mimics part of these assumptions +- scheduling metric: turnaround time, aka `completion - arrival` + hl-page:: 91 + ls-type:: annotation + id:: 642cf48d-b312-4af1-a2ff-d55cf9f32e48 + hl-color:: yellow +- conundrum + ls-type:: annotation + hl-page:: 91 + hl-color:: green + id:: 642cf4c4-d246-48f2-a6ef-f14c77684ad9 +- First In, First Out (FIFO/FCFS) algorithm + hl-page:: 91 + ls-type:: annotation + id:: 642cf4f9-4afd-4240-ac76-5522285fa1eb + hl-color:: yellow + - Bad average turnaround when long job runs first + - Convoy effect: a number of relatively-short potential consumers of a resource get queued behind a heavyweight resource consumer +- Shortest Job First(SJF) + hl-page:: 93 + ls-type:: annotation + id:: 642cf705-4a47-4daa-a542-43c4ae6f239e + hl-color:: yellow + - assuming that jobs all arriving at the same time, it could be proven that SJF is indeed an optimal scheduling algorithm + - Downgrade to the same problem of Convey Effect when jobs don't arrive at the same time. For example, short jobs arrive shortly after the long job. +- Shortest Time-to-Completion First (STCF) + ls-type:: annotation + hl-page:: 94 + hl-color:: yellow + id:: 642cfce4-67f5-4315-bf81-445922b8ae54 \ No newline at end of file diff --git a/pages/hls__ostep_1680491762166_0.md b/pages/hls__ostep_1680491762166_0.md index 6fce56b..15829ed 100644 --- a/pages/hls__ostep_1680491762166_0.md +++ b/pages/hls__ostep_1680491762166_0.md @@ -504,4 +504,175 @@ file-path:: ../assets/ostep_1680491762166_0.pdf ls-type:: annotation id:: 642f981d-af29-4cc1-a9da-b445cb964674 hl-color:: yellow -- \ No newline at end of file +- super-linear speedup: Sometimes a speedup of more than A when using A processors is observed in parallel computing. One possible reason for this is that, these CPUs offers larger cache size all together. If properly designed, memory access could even be eliminated, thus greatly improving performance. + hl-page:: 141 + ls-type:: annotation + id:: 642faf44-5876-46b3-acb4-b786f390716f + hl-color:: yellow +- paranoid + ls-type:: annotation + hl-page:: 142 + hl-color:: green + id:: 642fb2f2-b9a4-48f4-b847-2b30d632db32 +- rage + ls-type:: annotation + hl-page:: 143 + hl-color:: green + id:: 642fb3d2-e51f-4b9b-8a79-dea9d8e6a7b0 +- inundated + ls-type:: annotation + hl-page:: 144 + hl-color:: green + id:: 642fb4c0-5c56-44e9-aac6-396212698309 +- errant + ls-type:: annotation + hl-page:: 145 + hl-color:: green + id:: 642fb51d-f82c-40b4-82ad-878ee13a2264 +- darned + ls-type:: annotation + hl-page:: 146 + hl-color:: green + id:: 642fb54e-23c4-4667-955d-ad09fbbf6268 +- pesky + ls-type:: annotation + hl-page:: 148 + hl-color:: green + id:: 642fb9df-d4c2-4b75-9341-e9ea53d42dcc +- Address space: process's view of memory, the abstraction that the OS provides to the running program. When OS does this, we say it is **virtualizing memory**. + hl-page:: 148 + ls-type:: annotation + id:: 642fbad1-cda0-4ef4-97f7-38c3519042f4 + hl-color:: yellow + - Goal: transparency, efficiency and protection +- alas + ls-type:: annotation + hl-page:: 149 + hl-color:: green + id:: 642fbb24-877c-4c90-9e13-4e613e2e23d3 +- tandem + ls-type:: annotation + hl-page:: 150 + hl-color:: green + id:: 642fbb6e-9a9a-4ff6-92ea-b36903da1b88 +- stipulate + ls-type:: annotation + hl-page:: 150 + hl-color:: green + id:: 642fbc3d-d70b-4adb-bb0b-6b7038480589 +- scribble + ls-type:: annotation + hl-page:: 159 + hl-color:: green + id:: 642fbfcb-7327-44b8-9b25-308728264a81 +- Memory API: this interlude chapter talks about memory allocation interfaces like `malloc` and `free`. Quite trivial for proficient C programmers. + hl-page:: 155 + ls-type:: annotation + id:: 642fc139-afc3-4ba4-ad01-4cc33d9e535c + hl-color:: yellow +- hardware-based address translation + ls-type:: annotation + hl-page:: 167 + hl-color:: yellow + id:: 642fd36e-c0a7-4ead-a3a8-f085d6576229 +- Assumptions + ls-type:: annotation + hl-page:: 167 + hl-color:: yellow + id:: 642fc48b-e5bf-4043-b042-218445c2b714 + - Address space mapped to contiguous physical memory + - Address space can be totally held in physical memory(no too big) + - Each address space is the same size. +- Dynamic (Hardware-based) Relocation + ls-type:: annotation + hl-page:: 170 + hl-color:: yellow + id:: 642fc65f-1147-459c-8906-5ffca38b1e66 + - Software-based(static) relocation: program loader rewrites the to-be-loaded program's addresses according to its target offset in physical memory. The most important problem with this approach is that, protection can hardly be enforced. + hl-page:: 171 + ls-type:: annotation + id:: 642fc677-cbd4-47fd-bd90-3ed0cd56cc5b + hl-color:: yellow + - base-and-bounds: 2 registers for *each* CPU, used for determining the physical location of the address space. + - Before running, program is compiled as if it is loaded at address 0x00000000. + On startup, OS decide where to put the program and set `base` register. + When running, CPU translates process's memory reference(virtual address -> physical address) and issue request to RAM using physical address. `physcal address = virtual address + base` + - `bounds` register is there to help with protection, hardware checks whether the translated address exceeds the bound + - Dynamic Relocation: Hardware Requirements + ls-type:: annotation + hl-page:: 174 + hl-color:: yellow + id:: 642fd1ed-22a9-4443-b02f-bc35fe42e50b + - Dynamic Relocation: Operating System Responsibilities. In addition to the LDE introduced in CPU virtualization, a little more work needs to be done, like base/bounds register save/restore, memory allocation and deallocation. + hl-page:: 175 + ls-type:: annotation + id:: 642fd1f4-d573-4dbc-9e48-02adacc69e5e + hl-color:: yellow + - The stuff is not difficult to figure out on your own, so, why bother keeping notes on it? + - Problem: Internal fragmentation. Since the address space has fixed size in Dynamic Relocation, the used part of memory between stack and heap is wasted. + hl-page:: 178 + ls-type:: annotation + id:: 642fd2f3-e05f-453c-8286-15e7807e8e97 + hl-color:: yellow + - Programs may want larger address space(though not fully used) +- Memory Management Unit (MMU): the part of the processor that helps with address translation. + hl-page:: 172 + ls-type:: annotation + id:: 642fced7-c809-4d1e-bddb-da6474e851b8 + hl-color:: yellow +- havoc + ls-type:: annotation + hl-page:: 173 + hl-color:: green + id:: 642fcf85-6cfb-4eb9-aef2-ddcef7027b70 +- wreak + ls-type:: annotation + hl-page:: 173 + hl-color:: green + id:: 642fcf90-3133-4002-b986-4fd8157ab707 +- ghastly + ls-type:: annotation + hl-page:: 174 + hl-color:: green + id:: 642fcfa9-c026-4885-9f50-029ca80ce148 +- juncture + ls-type:: annotation + hl-page:: 174 + hl-color:: green + id:: 642fcff1-ae71-4756-9847-5ab85c41be06 +- oblivious + ls-type:: annotation + hl-page:: 175 + hl-color:: green + id:: 642fd071-db9c-4f0e-886f-b6ba3e5e4f7d +- Segmentation: Generalized Base/Bounds + ls-type:: annotation + hl-page:: 181 + hl-color:: yellow + id:: 642fd5c3-30f9-4770-8ec5-09555d21c4ab + - Divide the address space into contiguous segments, and **the address space as a whole is no more contiguous in physical memory**. + - A base and bounds pair per logical segment of the address space. Place each one of those segments in different parts of physical memory, and thus avoid filling physical memory with unused virtual address space. Conforming to this, MMU should add some registers. + - Selecting segment: which segment does a virtual address refer to? + - Explicit method: use the top few bits of the virtual address as segment selector, and the rest as in-segment offset. + - Problem 1: bit wasted, for example, we have only 3 segments, but we have to use 2-bits which provides 4. + - Problem2: limits the use of the virtual address space. Because the top bits is taken away to represent segments, the maximum of a segment is reduced. + - implicit approach, the hardware determines the segment by noticing how the address was formed. For example, PC -> code segment, SP -> stack segment + hl-page:: 185 + ls-type:: annotation + id:: 642fda54-4040-4d9b-ab00-13523aeb54c4 + hl-color:: yellow + - Stack segment support: stack grows backwards. First, add a field to hardware to indicate a segment grows positive or not. When proceeding a negative growing segment, the physical address is calculated as `PA = VA[offset] - MAX_SEG_SIZE + base`, signed operation + hl-page:: 186 + ls-type:: annotation + id:: 642fdca4-df4b-4515-8e96-ef4b05a7bb62 + hl-color:: yellow + - A real world example for this is the E(Expand-Down) bit in x86's segment descriptor. + - The reason why design such a weird mechanism is explained here: [osdev-expand_down](https://wiki.osdev.org/Expand_Down#Expand_Down). In short, programs may require the a segment to grow its size when the initially allocated segment is too small. + - Support for Sharing: protection bits. + hl-page:: 187 + ls-type:: annotation + id:: 642fe0dc-7d4b-41af-a136-69164ee77ab4 + hl-color:: yellow + - Attach several protection bits to Segment Register. For example, by setting code segment to read-only, you can safely share the segment across processes, thus saving the memory to hold a copy of code when a program creates many processes. + - Problem 1: variable-sized segments cause external fragments by chopping free memory into odd-sized pieces + - Problem 2: not flexible enough. What if we want a large enough but sparsely-allocated heap(the heap segment could be very large but wastefully used)? \ No newline at end of file