diff --git a/assets/ostep_1681115599584_0.edn b/assets/ostep_1681115599584_0.edn index b98c557..1935f66 100644 --- a/assets/ostep_1681115599584_0.edn +++ b/assets/ostep_1681115599584_0.edn @@ -4289,5 +4289,1316 @@ :height 1209.6}), :page 508}, :content {:text "Figure 39.3: Processes Sharing An Open File Table Entry"}, + :properties {:color "yellow"}} + {:id #uuid "643a7463-39e5-4645-8b43-b8be7b8ea7bc", + :page 509, + :position {:bounding {:x1 183.359375, + :y1 190.953125, + :x2 397.9424133300781, + :y2 213.953125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.359375, + :y1 190.953125, + :x2 397.9424133300781, + :y2 213.953125, + :width 921.6, + :height 1382.4}), + :page 509}, + :content {:text "Writing Immediately"}, + :properties {:color "yellow"}} + {:id #uuid "643a754d-3efb-4440-8f9a-009a88463df8", + :page 509, + :position {:bounding {:x1 0, + :y1 253, + :x2 797.6187744140625, + :y2 592.796875, + :width 921.6, + :height 1382.4}, + :rects ({:x1 0, + :y1 253, + :x2 0, + :y2 275, + :width 921.6, + :height 1382.4} + {:x1 0, + :y1 269, + :x2 0, + :y2 291, + :width 921.6, + :height 1382.4} + {:x1 717.25, + :y1 531.28125, + :x2 797.6187744140625, + :y2 550.28125, + :width 921.6, + :height 1382.4} + {:x1 755.078125, + :y1 550.8125, + :x2 797.6136474609375, + :y2 575.8125, + :width 921.6, + :height 1382.4} + {:x1 183.359375, + :y1 552.546875, + :x2 797.6136474609375, + :y2 571.671875, + :width 921.6, + :height 1382.4} + {:x1 183.359375, + :y1 573.796875, + :x2 463.2677307128906, + :y2 592.796875, + :width 921.6, + :height 1382.4}), + :page 509}, + :content {:text "fsync() for a particular file descriptor, the file system responds by forcing all dirty(i.e., not yet written) data to disk"}, + :properties {:color "yellow"}} + {:id #uuid "643a782a-b874-4f34-9968-50b69a04b849", + :page 509, + :position {:bounding {:x1 183.359375, + :y1 1086.921875, + :x2 342.37335205078125, + :y2 1109.921875, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.359375, + :y1 1086.921875, + :x2 342.37335205078125, + :y2 1109.921875, + :width 921.6, + :height 1382.4}), + :page 509}, + :content {:text "Renaming Files"}, + :properties {:color "yellow"}} + {:id #uuid "643a789e-6346-4845-9d38-95d26927a32b", + :page 510, + :position {:bounding {:x1 123.828125, + :y1 875.890625, + :x2 455.27972412109375, + :y2 898.890625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.828125, + :y1 875.890625, + :x2 455.27972412109375, + :y2 898.890625, + :width 921.6, + :height 1382.4}), + :page 510}, + :content {:text "Getting Information About Files"}, + :properties {:color "yellow"}} + {:id #uuid "643a79be-d297-4f8d-8825-83c9f830af0e", + :page 511, + :position {:bounding {:x1 183.359375, + :y1 1004.734375, + :x2 343.0458068847656, + :y2 1027.734375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.359375, + :y1 1004.734375, + :x2 343.0458068847656, + :y2 1027.734375, + :width 921.6, + :height 1382.4}), + :page 511}, + :content {:text "Removing Files"}, + :properties {:color "yellow"}} + {:id #uuid "643a7a52-0c85-435c-8250-3f4198a09fc0", + :page 512, + :position {:bounding {:x1 123.828125, + :y1 529.453125, + :x2 321.84381103515625, + :y2 552.453125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.828125, + :y1 529.453125, + :x2 321.84381103515625, + :y2 552.453125, + :width 921.6, + :height 1382.4}), + :page 512}, + :content {:text "Making Directories"}, + :properties {:color "yellow"}} + {:id #uuid "643a7a83-66d0-4bbc-8b17-bd7604a0ed5f", + :page 512, + :position {:bounding {:x1 123.828125, + :y1 742.28125, + :x2 223.7018280029297, + :y2 761.28125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.828125, + :y1 742.28125, + :x2 223.7018280029297, + :y2 761.28125, + :width 921.6, + :height 1382.4}), + :page 512}, + :content {:text "eponymous"}, + :properties {:color "green"}} + {:id #uuid "643a7c32-0be4-4a2e-9532-31869f4e725a", + :page 513, + :position {:bounding {:x1 183.331298828125, + :y1 670.578125, + :x2 387.33258056640625, + :y2 693.578125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.331298828125, + :y1 670.578125, + :x2 387.33258056640625, + :y2 693.578125, + :width 921.6, + :height 1382.4}), + :page 513}, + :content {:text "Reading Directories"}, + :properties {:color "yellow"}} + {:id #uuid "643a7d55-768c-4881-b78d-f721c8d7929d", + :page 514, + :position {:bounding {:x1 123.828125, + :y1 613.578125, + :x2 329.9228515625, + :y2 636.578125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.828125, + :y1 613.578125, + :x2 329.9228515625, + :y2 636.578125, + :width 921.6, + :height 1382.4}), + :page 514}, + :content {:text "Deleting Directories"}, + :properties {:color "yellow"}} + {:id #uuid "643a7d87-b945-4068-94dd-2b2d203eae67", + :page 514, + :position {:bounding {:x1 123.828125, + :y1 828.28125, + :x2 240.995361328125, + :y2 851.28125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.828125, + :y1 828.28125, + :x2 240.995361328125, + :y2 851.28125, + :width 921.6, + :height 1382.4}), + :page 514}, + :content {:text "Hard Links"}, + :properties {:color "yellow"}} + {:id #uuid "643a7dda-5c26-4ed5-8e06-c03e5a0e9fb7", + :page 515, + :position {:bounding {:x1 582.0946655273438, + :y1 1157.890625, + :x2 636.3905029296875, + :y2 1172.890625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 582.0946655273438, + :y1 1157.890625, + :x2 636.3905029296875, + :y2 1172.890625, + :width 921.6, + :height 1382.4}), + :page 515}, + :content {:text "hamster "}, + :properties {:color "green"}} + {:id #uuid "643a8017-1499-4cd3-a015-0f1e8d143e93", + :page 516, + :position {:bounding {:x1 123.81216430664062, + :y1 826.234375, + :x2 282.1700134277344, + :y2 849.234375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.81216430664062, + :y1 826.234375, + :x2 282.1700134277344, + :y2 849.234375, + :width 921.6, + :height 1382.4}), + :page 516}, + :content {:text "Symbolic Links"}, + :properties {:color "yellow"}} + {:id #uuid "643a84cb-102e-4beb-a138-e8690f68356f", + :page 518, + :position {:bounding {:x1 123.828125, + :y1 290.03125, + :x2 283.0047302246094, + :y2 313.03125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.828125, + :y1 290.03125, + :x2 283.0047302246094, + :y2 313.03125, + :width 921.6, + :height 1382.4}), + :page 518}, + :content {:text "Permission Bits"}, + :properties {:color "yellow"}} + {:id #uuid "643a88bf-206b-4b6d-9d92-95516bcbe270", + :page 526, + :position {:bounding {:x1 360.484375, + :y1 367.953125, + :x2 738.0448608398438, + :y2 407.953125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 360.484375, + :y1 367.953125, + :x2 738.0448608398438, + :y2 407.953125, + :width 921.6, + :height 1382.4}), + :page 526}, + :content {:text "File System Implementation"}, + :properties {:color "yellow"}} + {:id #uuid "643a8c8e-b3ae-4de8-9280-75201b02d6db", + :page 526, + :position {:bounding {:x1 123.828125, + :y1 1001.859375, + :x2 311.8470764160156, + :y2 1024.859375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.828125, + :y1 1001.859375, + :x2 311.8470764160156, + :y2 1024.859375, + :width 921.6, + :height 1382.4}), + :page 526}, + :content {:text "The Way To Think"}, + :properties {:color "yellow"}} + {:id #uuid "643a8ce0-15b0-4d37-987d-6e649a59b616", + :page 527, + :position {:bounding {:x1 265.9375, + :y1 832.6875, + :x2 323.32318115234375, + :y2 857.6875, + :width 921.6, + :height 1382.4}, + :rects ({:x1 265.9375, + :y1 832.6875, + :x2 323.32318115234375, + :y2 857.6875, + :width 921.6, + :height 1382.4}), + :page 527}, + :content {:text "blocks"}, + :properties {:color "yellow"}} + {:id #uuid "643a8d89-facb-40cd-96d8-dd142c42da36", + :page 529, + :position {:bounding {:x1 483.5835266113281, + :y1 432.328125, + :x2 554.2378540039062, + :y2 451.328125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 483.5835266113281, + :y1 432.328125, + :x2 554.2378540039062, + :y2 451.328125, + :width 921.6, + :height 1382.4}), + :page 529}, + :content {:text "overkill "}, + :properties {:color "green"}} + {:id #uuid "643a8ef8-7d3f-4794-9f00-4973a3be9bb7", + :page 527, + :position {:bounding {:x1 652.65625, + :y1 1170.484375, + :x2 750.930908203125, + :y2 1195.484375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 652.65625, + :y1 1170.484375, + :x2 750.930908203125, + :y2 1195.484375, + :width 921.6, + :height 1382.4}), + :page 527}, + :content {:text "data region"}, + :properties {:color "yellow"}} + {:id #uuid "643a8f4b-ac22-4cb8-b68d-e7f3078709c1", + :page 528, + :position {:bounding {:x1 578.015625, + :y1 575.359375, + :x2 676.2728271484375, + :y2 600.359375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 578.015625, + :y1 575.359375, + :x2 676.2728271484375, + :y2 600.359375, + :width 921.6, + :height 1382.4}), + :page 528}, + :content {:text "inode table"}, + :properties {:color "yellow"}} + {:id #uuid "643a8fa4-9783-4e86-8b04-2fad1f3a5c66", + :page 528, + :position {:bounding {:x1 400.796875, + :y1 1042.890625, + :x2 576.8242797851562, + :y2 1067.890625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 400.796875, + :y1 1042.890625, + :x2 576.8242797851562, + :y2 1067.890625, + :width 921.6, + :height 1382.4}), + :page 528}, + :content {:text "allocation structures"}, + :properties {:color "yellow"}} + {:id #uuid "643a9022-da94-4092-8a64-e22cd2364365", + :page 529, + :position {:bounding {:x1 592.65625, + :y1 559.203125, + :x2 690.4248657226562, + :y2 584.203125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 592.65625, + :y1 559.203125, + :x2 690.4248657226562, + :y2 584.203125, + :width 921.6, + :height 1382.4}), + :page 529}, + :content {:text "superblock"}, + :properties {:color "yellow"}} + {:id #uuid "643a92a1-90df-4342-a183-85c55242b8af", + :page 529, + :position {:bounding {:x1 416.36773681640625, + :y1 1022.078125, + :x2 479.9180603027344, + :y2 1045.078125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 416.36773681640625, + :y1 1022.078125, + :x2 479.9180603027344, + :y2 1045.078125, + :width 921.6, + :height 1382.4}), + :page 529}, + :content {:text " Inode"}, + :properties {:color "yellow"}} + {:id #uuid "643a93f0-e122-4ea5-a228-48607f93e404", + :page 531, + :position {:bounding {:x1 183.359375, + :y1 908.28125, + :x2 402.9515380859375, + :y2 936.28125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.359375, + :y1 908.28125, + :x2 402.9515380859375, + :y2 936.28125, + :width 921.6, + :height 1382.4}), + :page 531}, + :content {:text "The Multi-Level Index"}, + :properties {:color "yellow"}} + {:id #uuid "643a950d-c2c2-419b-8206-0b957b7de178", + :page 531, + :position {:bounding {:x1 0, + :y1 589, + :x2 797.5996704101562, + :y2 1110.25, + :width 921.6, + :height 1382.4}, + :rects ({:x1 0, + :y1 589, + :x2 0, + :y2 611, + :width 921.6, + :height 1382.4} + {:x1 0, + :y1 605, + :x2 0, + :y2 627, + :width 921.6, + :height 1382.4} + {:x1 0, + :y1 621, + :x2 0, + :y2 643, + :width 921.6, + :height 1382.4} + {:x1 420.269775390625, + :y1 1027.484375, + :x2 797.5996704101562, + :y2 1046.484375, + :width 921.6, + :height 1382.4} + {:x1 183.359375, + :y1 1048.75, + :x2 797.5984497070312, + :y2 1067.875, + :width 921.6, + :height 1382.4} + {:x1 183.359375, + :y1 1070, + :x2 797.582763671875, + :y2 1089.125, + :width 921.6, + :height 1382.4} + {:x1 183.359375, + :y1 1091.25, + :x2 797.5953369140625, + :y2 1110.25, + :width 921.6, + :height 1382.4}), + :page 531}, + :content {:text ". Thus, an inode may have some fixed number of direct pointers (e.g., 12), and a single indirect pointer. If a file grows large enough, an indirect block is allocated (from the data-block region of the disk), and the inode’s slot for an indirect pointer is set to point to it."}, + :properties {:color "yellow"}} + {:id #uuid "643a96a0-f55d-4a84-bf93-4732a282b124", + :page 532, + :position {:bounding {:x1 571.3375854492188, + :y1 998.0625, + :x2 615.238037109375, + :y2 1017.0625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 571.3375854492188, + :y1 998.0625, + :x2 615.238037109375, + :y2 1017.0625, + :width 921.6, + :height 1382.4}), + :page 532}, + :content {:text "akin "}, + :properties {:color "green"}} + {:id #uuid "643a96cb-bb7d-44c7-ac86-1e55a7ea3249", + :page 533, + :position {:bounding {:x1 413.6831359863281, + :y1 544.78125, + :x2 481.9478759765625, + :y2 563.78125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 413.6831359863281, + :y1 544.78125, + :x2 481.9478759765625, + :y2 563.78125, + :width 921.6, + :height 1382.4}), + :page 533}, + :content {:text "readily "}, + :properties {:color "green"}} + {:id #uuid "643a96d1-5114-40f7-9dad-4291462344ff", + :page 533, + :position {:bounding {:x1 280.546875, + :y1 376.59375, + :x2 700.4242553710938, + :y2 401.59375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 384.265625, + :y1 376.59375, + :x2 700.4242553710938, + :y2 401.59375, + :width 921.6, + :height 1382.4} + {:x1 280.546875, + :y1 378.3125, + :x2 387.875, + :y2 397.4375, + :width 921.6, + :height 1382.4}), + :page 533}, + :content {:text "Figure 40.2: File System Measurement Summary"}, + :properties {:color "yellow"}} + {:id #uuid "643a975d-f0a2-47e7-bf85-63a300a2c504", + :page 532, + :position {:bounding {:x1 373.015625, + :y1 208.015625, + :x2 624.874267578125, + :y2 227.140625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 373.015625, + :y1 208.015625, + :x2 624.874267578125, + :y2 227.140625, + :width 921.6, + :height 1382.4}), + :page 532}, + :content {:text "EXTENT-BASED APPROACHES"}, + :properties {:color "yellow"}} + {:id #uuid "643a990d-2b82-4bed-a49d-46746821b5a4", + :page 533, + :position {:bounding {:x1 183.33059692382812, + :y1 607.515625, + :x2 422.4984130859375, + :y2 630.515625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.33059692382812, + :y1 607.515625, + :x2 422.4984130859375, + :y2 630.515625, + :width 921.6, + :height 1382.4}), + :page 533}, + :content {:text "Directory Organization"}, + :properties {:color "yellow"}} + {:id #uuid "643a9be6-58e7-47a5-9ef2-bfff1f4c88a7", + :page 534, + :position {:bounding {:x1 680.6773681640625, + :y1 706.0625, + :x2 738.0621948242188, + :y2 725.0625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 680.6773681640625, + :y1 706.0625, + :x2 738.0621948242188, + :y2 725.0625, + :width 921.6, + :height 1382.4}), + :page 534}, + :content {:text "per se,"}, + :properties {:color "green"}} + {:id #uuid "643a9c2b-a519-4800-9188-253b13e9c2e5", + :page 534, + :position {:bounding {:x1 333.991455078125, + :y1 208.015625, + :x2 589.796142578125, + :y2 227.140625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 333.991455078125, + :y1 208.015625, + :x2 589.796142578125, + :y2 227.140625, + :width 921.6, + :height 1382.4}), + :page 534}, + :content {:text " LINKED-BASED APPROACHES"}, + :properties {:color "yellow"}} + {:id #uuid "643a9d3c-3847-4a2e-b50e-f8423b089b39", + :page 535, + :position {:bounding {:x1 183.33059692382812, + :y1 492.90625, + :x2 434.0701599121094, + :y2 515.90625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.33059692382812, + :y1 492.90625, + :x2 434.0701599121094, + :y2 515.90625, + :width 921.6, + :height 1382.4}), + :page 535}, + :content {:text "Free Space Management"}, + :properties {:color "yellow"}} + {:id #uuid "643a9d6e-eab7-475c-9822-9b2efa21e6f0", + :page 535, + :position {:bounding {:x1 596.453125, + :y1 889.734375, + :x2 717.6112670898438, + :y2 914.734375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 596.453125, + :y1 889.734375, + :x2 717.6112670898438, + :y2 914.734375, + :width 921.6, + :height 1382.4}), + :page 535}, + :content {:text "pre-allocation"}, + :properties {:color "yellow"}} + {:id #uuid "643a9e6c-c2bd-48b9-80b8-b98340f91f7a", + :page 536, + :position {:bounding {:x1 123.828125, + :y1 589.125, + :x2 377.6831359863281, + :y2 617.125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.828125, + :y1 589.125, + :x2 377.6831359863281, + :y2 617.125, + :width 921.6, + :height 1382.4}), + :page 536}, + :content {:text "Reading A File From Disk"}, + :properties {:color "yellow"}} + {:id #uuid "643a9e8a-5f34-4dc9-817b-30466e84ffe2", + :page 536, + :position {:bounding {:x1 0, + :y1 429, + :x2 738.087890625, + :y2 821.296875, + :width 921.6, + :height 1382.4}, + :rects ({:x1 0, + :y1 429, + :x2 0, + :y2 451, + :width 921.6, + :height 1382.4} + {:x1 467.359375, + :y1 779.3125, + :x2 541.5746459960938, + :y2 804.3125, + :width 921.6, + :height 1382.4} + {:x1 462.234375, + :y1 781.046875, + :x2 738.087890625, + :y2 800.171875, + :width 921.6, + :height 1382.4} + {:x1 123.828125, + :y1 802.296875, + :x2 329.5362854003906, + :y2 821.296875, + :width 921.6, + :height 1382.4}), + :page 536}, + :content {:text " traverse the pathname and thus locate the desired inode."}, + :properties {:color "yellow"}} + {:id #uuid "643ab82b-d15c-4298-b52b-30c27da1deb0", + :page 537, + :position {:bounding {:x1 0, + :y1 477, + :x2 797.6093139648438, + :y2 895.796875, + :width 921.6, + :height 1382.4}, + :rects ({:x1 0, + :y1 477, + :x2 0, + :y2 499, + :width 921.6, + :height 1382.4} + {:x1 371.88311767578125, + :y1 855.53125, + :x2 797.6093139648438, + :y2 874.53125, + :width 921.6, + :height 1382.4} + {:x1 183.359375, + :y1 876.796875, + :x2 490.4876403808594, + :y2 895.796875, + :width 921.6, + :height 1382.4}), + :page 537}, + :content {:text " amount of I/O generated by the open is proportional to the length of the pathname."}, + :properties {:color "yellow"}} + {:id #uuid "643ab83e-d2fe-4f02-b467-b969ab2482cc", + :page 537, + :position {:bounding {:x1 183.359375, + :y1 1033.859375, + :x2 402.55523681640625, + :y2 1061.859375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.359375, + :y1 1033.859375, + :x2 402.55523681640625, + :y2 1061.859375, + :width 921.6, + :height 1382.4}), + :page 537}, + :content {:text "Writing A File To Disk"}, + :properties {:color "yellow"}} + {:id #uuid "643abbf4-1d1a-4b32-9d91-345983406ce5", + :page 541, + :position {:bounding {:x1 412.848876953125, + :y1 1156.125, + :x2 487.0954895019531, + :y2 1171.125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 412.848876953125, + :y1 1156.125, + :x2 487.0954895019531, + :y2 1171.125, + :width 921.6, + :height 1382.4}), + :page 541}, + :content {:text "o bad mouth"}, + :properties {:color "green"}} + {:id #uuid "643abc13-2fdb-4a66-932a-eea1eafa449a", + :page 539, + :position {:bounding {:x1 183.359375, + :y1 618.015625, + :x2 416.6278076171875, + :y2 641.015625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.359375, + :y1 618.015625, + :x2 416.6278076171875, + :y2 641.015625, + :width 921.6, + :height 1382.4}), + :page 539}, + :content {:text "Caching and Buffering"}, + :properties {:color "yellow"}} + {:id #uuid "643abc3c-040a-4f2f-89e4-ca14c9c0c230", + :page 540, + :position {:bounding {:x1 123.828125, + :y1 807.25, + :x2 262.8486633300781, + :y2 832.25, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.828125, + :y1 807.25, + :x2 262.8486633300781, + :y2 832.25, + :width 921.6, + :height 1382.4}), + :page 540}, + :content {:text "write buffering "}, + :properties {:color "yellow"}} + {:id #uuid "643abc6f-93a1-44e8-bb62-e56b2a9f2541", + :page 539, + :position {:bounding {:x1 252.21875, + :y1 957.515625, + :x2 409.9726867675781, + :y2 982.515625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 252.21875, + :y1 957.515625, + :x2 409.9726867675781, + :y2 982.515625, + :width 921.6, + :height 1382.4}), + :page 539}, + :content {:text "static partitioning"}, + :properties {:color "yellow"}} + {:id #uuid "643abc73-d5b4-4627-9ab9-ef8863bc8f3d", + :page 539, + :position {:bounding {:x1 534.234375, + :y1 1042.734375, + :x2 718.5639038085938, + :y2 1067.734375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 534.234375, + :y1 1042.734375, + :x2 718.5639038085938, + :y2 1067.734375, + :width 921.6, + :height 1382.4}), + :page 539}, + :content {:text "dynamic partitioning"}, + :properties {:color "yellow"}} + {:id #uuid "643abf69-04dc-428c-996d-b139cba0fa1f", + :page 544, + :position {:bounding {:x1 515.3082885742188, + :y1 372.5, + :x2 738.0563354492188, + :y2 402.5, + :width 921.6, + :height 1382.4}, + :rects ({:x1 515.3082885742188, + :y1 372.5, + :x2 738.0563354492188, + :y2 402.5, + :width 921.6, + :height 1382.4}), + :page 544}, + :content {:text "Fast File System"}, + :properties {:color "yellow"}} + {:id #uuid "643ac12f-817c-459b-b9ba-bbb1745519fb", + :page 546, + :position {:bounding {:x1 123.81153106689453, + :y1 498.796875, + :x2 343.5225830078125, + :y2 521.796875, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.81153106689453, + :y1 498.796875, + :x2 343.5225830078125, + :y2 521.796875, + :width 921.6, + :height 1382.4}), + :page 546}, + :content {:text "Organizing Structure"}, + :properties {:color "yellow"}} + {:id #uuid "643ac141-3bff-4b00-9c18-57ad7c108fe5", + :page 546, + :position {:bounding {:x1 529.84375, + :y1 561.265625, + :x2 602.1054077148438, + :y2 586.265625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 529.84375, + :y1 561.265625, + :x2 602.1054077148438, + :y2 586.265625, + :width 921.6, + :height 1382.4}), + :page 546}, + :content {:text "cylinder"}, + :properties {:color "yellow"}} + {:id #uuid "643ac144-24f3-46ca-9354-47c9d2f4ffe0", + :page 546, + :position {:bounding {:x1 308.28125, + :y1 561.265625, + :x2 445.497802734375, + :y2 586.265625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 308.28125, + :y1 561.265625, + :x2 445.497802734375, + :y2 586.265625, + :width 921.6, + :height 1382.4}), + :page 546}, + :content {:text "cylinder groups"}, + :properties {:color "yellow"}} + {:id #uuid "643ac1ec-08d9-4584-b6ed-4332f8f791a0", + :page 547, + :position {:bounding {:x1 220.60842895507812, + :y1 214.0625, + :x2 333.9940185546875, + :y2 239.0625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 220.625, + :y1 214.0625, + :x2 333.9940185546875, + :y2 239.0625, + :width 921.6, + :height 1382.4} + {:x1 220.60842895507812, + :y1 215.796875, + :x2 333.9940185546875, + :y2 234.796875, + :width 921.6, + :height 1382.4}), + :page 547}, + :content {:text "block groups"}, + :properties {:color "yellow"}} + {:id #uuid "643ac2c5-a62f-473b-b0e5-32807c7b2e6a", + :page 547, + :position {:bounding {:x1 626.9721069335938, + :y1 923.953125, + :x2 686.7061157226562, + :y2 942.953125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 626.9721069335938, + :y1 923.953125, + :x2 686.7061157226562, + :y2 942.953125, + :width 921.6, + :height 1382.4}), + :page 547}, + :content {:text "replica"}, + :properties {:color "green"}} + {:id #uuid "643ac2f1-4d07-4107-a46d-4d2d8eea6fc6", + :page 548, + :position {:bounding {:x1 270.5033264160156, + :y1 739.765625, + :x2 330.91644287109375, + :y2 758.765625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 270.5033264160156, + :y1 739.765625, + :x2 330.91644287109375, + :y2 758.765625, + :width 921.6, + :height 1382.4}), + :page 548}, + :content {:text "mantra "}, + :properties {:color "green"}} + {:id #uuid "643ac41b-c2e0-4351-b0e3-012e792cf426", + :page 548, + :position {:bounding {:x1 0, + :y1 365, + :x2 738.0799560546875, + :y2 780.015625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 0, + :y1 365, + :x2 0, + :y2 387, + :width 921.6, + :height 1382.4} + {:x1 691.775390625, + :y1 739.765625, + :x2 738.0799560546875, + :y2 758.765625, + :width 921.6, + :height 1382.4} + {:x1 123.828125, + :y1 761.015625, + :x2 159.8196258544922, + :y2 780.015625, + :width 921.6, + :height 1382.4}), + :page 548}, + :content {:text "corollary,"}, + :properties {:color "green"}} + {:id #uuid "643ac42c-edf9-4b68-8890-b04d724c2ac2", + :page 548, + :position {:bounding {:x1 123.81153106689453, + :y1 652.609375, + :x2 605.0134887695312, + :y2 675.609375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.81153106689453, + :y1 652.609375, + :x2 605.0134887695312, + :y2 675.609375, + :width 921.6, + :height 1382.4}), + :page 548}, + :content {:text "Policies: How To Allocate Files and Directories"}, + :properties {:color "yellow"}} + {:id #uuid "643ac4ec-df99-430a-9e2e-78101c74b14e", + :page 549, + :position {:bounding {:x1 575.7300415039062, + :y1 1007.109375, + :x2 661.0611572265625, + :y2 1026.109375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 575.7300415039062, + :y1 1007.109375, + :x2 661.0611572265625, + :y2 1026.109375, + :width 921.6, + :height 1382.4}), + :page 549}, + :content {:text "extensive "}, + :properties {:color "green"}} + {:id #uuid "643ac4f0-6809-4acd-b141-2a96174f5395", + :page 549, + :position {:bounding {:x1 515.3639526367188, + :y1 1028.359375, + :x2 573.4813842773438, + :y2 1047.359375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 515.3639526367188, + :y1 1028.359375, + :x2 573.4813842773438, + :y2 1047.359375, + :width 921.6, + :height 1382.4}), + :page 549}, + :content {:text "nuanced"}, + :properties {:color "green"}} + {:id #uuid "643ac55f-b4a2-4bfc-ad0b-23c785c4871e", + :page 548, + :position {:bounding {:x1 0, + :y1 477, + :x2 738.09033203125, + :y2 974.984375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 0, + :y1 477, + :x2 0, + :y2 499, + :width 921.6, + :height 1382.4} + {:x1 0, + :y1 493, + :x2 0, + :y2 515, + :width 921.6, + :height 1382.4} + {:x1 0, + :y1 509, + :x2 0, + :y2 531, + :width 921.6, + :height 1382.4} + {:x1 195.0341033935547, + :y1 892.234375, + :x2 738.0705413818359, + :y2 911.234375, + :width 921.6, + :height 1382.4} + {:x1 123.828125, + :y1 913.484375, + :x2 738.085693359375, + :y2 932.609375, + :width 921.6, + :height 1382.4} + {:x1 123.828125, + :y1 934.734375, + :x2 738.09033203125, + :y2 953.859375, + :width 921.6, + :height 1382.4} + {:x1 123.828125, + :y1 955.984375, + :x2 460.4035339355469, + :y2 974.984375, + :width 921.6, + :height 1382.4}), + :page 548}, + :content {:text "find the cylinder group with a low number of allocated directories (to balance directories across groups) and a high number of free inodes (to subsequently be able to allocate a bunch of files), and put the directory data and inode in that group. "}, + :properties {:color "yellow"}} + {:id #uuid "643ac616-ab90-40d5-94b2-7b8c294c4360", + :page 548, + :position {:bounding {:x1 0, + :y1 573, + :x2 738.0941162109375, + :y2 1104.34375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 0, + :y1 573, + :x2 0, + :y2 595, + :width 921.6, + :height 1382.4} + {:x1 0, + :y1 589, + :x2 0, + :y2 611, + :width 921.6, + :height 1382.4} + {:x1 0, + :y1 605, + :x2 0, + :y2 627, + :width 921.6, + :height 1382.4} + {:x1 248.3310546875, + :y1 1021.59375, + :x2 738.0941162109375, + :y2 1040.59375, + :width 921.6, + :height 1382.4} + {:x1 123.828125, + :y1 1042.84375, + :x2 738.066162109375, + :y2 1061.96875, + :width 921.6, + :height 1382.4} + {:x1 123.828125, + :y1 1064.09375, + :x2 738.0770263671875, + :y2 1083.21875, + :width 921.6, + :height 1382.4} + {:x1 123.828125, + :y1 1085.34375, + :x2 414.9846496582031, + :y2 1104.34375, + :width 921.6, + :height 1382.4}), + :page 548}, + :content {:text " data blocks of a file in the same group as its inode, thus preventing long seeks between inode and data (as in the old file system). Second, it places all files that are in the same directory in the cylinder group of the directory they are in. T"}, + :properties {:color "yellow"}} + {:id #uuid "643ac769-6511-4954-a43a-957f3b561c56", + :page 550, + :position {:bounding {:x1 123.828125, + :y1 708.671875, + :x2 367.2305908203125, + :y2 731.671875, + :width 921.6, + :height 1382.4}, + :rects ({:x1 123.828125, + :y1 708.671875, + :x2 367.2305908203125, + :y2 731.671875, + :width 921.6, + :height 1382.4}), + :page 550}, + :content {:text "Measuring File Locality"}, + :properties {:color "yellow"}} + {:id #uuid "643ac8cc-7164-4066-9730-231063c6c7c0", + :page 551, + :position {:bounding {:x1 183.359375, + :y1 658.34375, + :x2 440.3702392578125, + :y2 681.34375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.359375, + :y1 658.34375, + :x2 440.3702392578125, + :y2 681.34375, + :width 921.6, + :height 1382.4}), + :page 551}, + :content {:text "The Large-File Exception"}, + :properties {:color "yellow"}} + {:id #uuid "643ac9e7-1479-4be9-81fe-acb750f363b4", + :page 551, + :position {:bounding {:x1 0, + :y1 445, + :x2 808.6233520507812, + :y2 937.84375, + :width 921.6, + :height 1382.4}, + :rects ({:x1 0, + :y1 445, + :x2 0, + :y2 467, + :width 921.6, + :height 1382.4} + {:x1 0, + :y1 461, + :x2 0, + :y2 483, + :width 921.6, + :height 1382.4} + {:x1 0, + :y1 477, + :x2 0, + :y2 499, + :width 921.6, + :height 1382.4} + {:x1 0, + :y1 493, + :x2 0, + :y2 515, + :width 921.6, + :height 1382.4} + {:x1 604.9961547851562, + :y1 833.828125, + :x2 797.5694580078125, + :y2 852.828125, + :width 921.6, + :height 1382.4} + {:x1 183.34375, + :y1 855.078125, + :x2 797.590087890625, + :y2 874.203125, + :width 921.6, + :height 1382.4} + {:x1 183.34375, + :y1 876.328125, + :x2 808.6233520507812, + :y2 895.453125, + :width 921.6, + :height 1382.4} + {:x1 183.34375, + :y1 897.578125, + :x2 797.5711059570312, + :y2 916.703125, + :width 921.6, + :height 1382.4} + {:x1 183.34375, + :y1 918.84375, + :x2 673.0679321289062, + :y2 937.84375, + :width 921.6, + :height 1382.4}), + :page 551}, + :content {:text "After some number of blocks are allocated into the first block group (e.g., 12 blocks, or the number of direct pointers available within an inode), FFS places the next “large” chunk of the file (e.g., those pointed to by the first indirect block) in another block group (perhaps chosen for its low utilization)."}, + :properties {:color "yellow"}} + {:id #uuid "643acbfe-afa1-4031-82ce-1a765d6ee445", + :page 553, + :position {:bounding {:x1 762.4848022460938, + :y1 753.90625, + :x2 797.5928955078125, + :y2 772.90625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 762.4848022460938, + :y1 753.90625, + :x2 797.5928955078125, + :y2 772.90625, + :width 921.6, + :height 1382.4}), + :page 553}, + :content {:text "lone"}, + :properties {:color "green"}} + {:id #uuid "643acd1b-5a18-4b14-acdc-006c2f97c0e8", + :page 555, + :position {:bounding {:x1 476.45806884765625, + :y1 932.90625, + :x2 565.6673583984375, + :y2 951.90625, + :width 921.6, + :height 1382.4}, + :rects ({:x1 476.45806884765625, + :y1 932.90625, + :x2 565.6673583984375, + :y2 951.90625, + :width 921.6, + :height 1382.4}), + :page 555}, + :content {:text "watershed "}, + :properties {:color "green"}} + {:id #uuid "643ace75-cb8c-4421-a1b6-292547f28333", + :page 554, + :position {:bounding {:x1 468.140625, + :y1 1039.953125, + :x2 616.9420166015625, + :y2 1064.953125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 468.140625, + :y1 1039.953125, + :x2 616.9420166015625, + :y2 1064.953125, + :width 921.6, + :height 1382.4}), + :page 554}, + :content {:text "parameterization"}, + :properties {:color "yellow"}} + {:id #uuid "643acef0-5592-4bad-8557-878567dc18a1", + :page 553, + :position {:bounding {:x1 183.359375, + :y1 978.421875, + :x2 508.1578063964844, + :y2 1001.421875, + :width 921.6, + :height 1382.4}, + :rects ({:x1 183.359375, + :y1 978.421875, + :x2 508.1578063964844, + :y2 1001.421875, + :width 921.6, + :height 1382.4}), + :page 553}, + :content {:text "A Few Other Things About FFS"}, + :properties {:color "yellow"}} + {:id #uuid "643acfc2-eef7-4c7f-a8a5-1740c8788159", + :page 558, + :position {:bounding {:x1 170.890625, + :y1 370.8125, + :x2 424.6278991699219, + :y2 400.8125, + :width 921.6, + :height 1382.4}, + :rects ({:x1 170.890625, + :y1 370.8125, + :x2 424.6278991699219, + :y2 400.8125, + :width 921.6, + :height 1382.4}), + :page 558}, + :content {:text "Crash Consistency"}, :properties {:color "yellow"}}], - :extra {:page 507}} + :extra {:page 558}} diff --git a/journals/2023_04_14.md b/journals/2023_04_14.md new file mode 100644 index 0000000..877f270 --- /dev/null +++ b/journals/2023_04_14.md @@ -0,0 +1 @@ +- 终于把排名开下来了。 \ No newline at end of file diff --git a/journals/2023_04_15.md b/journals/2023_04_15.md new file mode 100644 index 0000000..3d79c0d --- /dev/null +++ b/journals/2023_04_15.md @@ -0,0 +1 @@ +- 英文版简历绝赞制作中 \ No newline at end of file diff --git a/logseq/bak/logseq/config/2023-04-13T15_47_53.912Z.Desktop.edn b/logseq/bak/logseq/config/2023-04-15T15_41_51.461Z.Desktop.edn similarity index 99% rename from logseq/bak/logseq/config/2023-04-13T15_47_53.912Z.Desktop.edn rename to logseq/bak/logseq/config/2023-04-15T15_41_51.461Z.Desktop.edn index dec5a7c..10c46a7 100644 --- a/logseq/bak/logseq/config/2023-04-13T15_47_53.912Z.Desktop.edn +++ b/logseq/bak/logseq/config/2023-04-15T15_41_51.461Z.Desktop.edn @@ -343,6 +343,7 @@ ;; ;use Percent-encoding for other invalid characters :file/name-format :triple-lowbar :ui/show-brackets? false + :feature/enable-timetracking? false ;; specify the format of the filename for journal files ;; :journal/file-name-format "yyyy_MM_dd" diff --git a/logseq/bak/logseq/config/2023-04-13T11_23_48.892Z.Desktop.edn b/logseq/bak/logseq/config/2023-04-15T15_42_07.581Z.Desktop.edn similarity index 99% rename from logseq/bak/logseq/config/2023-04-13T11_23_48.892Z.Desktop.edn rename to logseq/bak/logseq/config/2023-04-15T15_42_07.581Z.Desktop.edn index f69d742..657d2d7 100644 --- a/logseq/bak/logseq/config/2023-04-13T11_23_48.892Z.Desktop.edn +++ b/logseq/bak/logseq/config/2023-04-15T15_42_07.581Z.Desktop.edn @@ -343,6 +343,7 @@ ;; ;use Percent-encoding for other invalid characters :file/name-format :triple-lowbar :ui/show-brackets? true + :feature/enable-timetracking? false ;; specify the format of the filename for journal files ;; :journal/file-name-format "yyyy_MM_dd" diff --git a/pages/hls__ostep_1681115599584_0.md b/pages/hls__ostep_1681115599584_0.md index 184ae20..25a1189 100644 --- a/pages/hls__ostep_1681115599584_0.md +++ b/pages/hls__ostep_1681115599584_0.md @@ -1165,44 +1165,387 @@ file-path:: ../assets/ostep_1681115599584_0.pdf ls-type:: annotation id:: 64382ab8-ad41-4c20-be74-3ce7446f20d6 hl-color:: green -- Files And Directories +- ## Files And Directories ls-type:: annotation hl-page:: 498 hl-color:: yellow id:: 6438d8bf-19fd-4a4a-b491-3887c425aebf + collapsed:: true - File Directory - File: a linear array of bytes, each of which can be read or written - Directory: a list of *(user-readable name, low-level name)* pairs - directory tree, root directory, separator, sub-directories, absolute pathname - inode number: low-level name of a file or directory - - Creating Files: system call `open` with `O_CREAT` flag - hl-page:: 500 - ls-type:: annotation - id:: 6438dd4b-55ba-4649-90fd-7de69ed9c2ba - hl-color:: yellow - - file descriptor: an integer, ==private per process==, used to access files - hl-page:: 501 + - File operations + - Creating Files: system call `open` with `O_CREAT` flag + hl-page:: 500 ls-type:: annotation - id:: 6438dd78-68fe-47c6-8ca6-b2de3206f4f1 + id:: 6438dd4b-55ba-4649-90fd-7de69ed9c2ba hl-color:: yellow - - can be seen as a handle for file operations, or a pointer to an object of type file - - Reading And Writing Files: system call `read` and `write` - hl-page:: 502 - ls-type:: annotation - id:: 6438e073-2636-4ec8-807d-3ecf83a5c0c0 - hl-color:: yellow - - Non-sequential access: system call `lseek(fd, offset, whence)` - - explicit and implicit update to file offset - - open file table: represent all currently opened files in the system - - Shared File Table Entries - ls-type:: annotation - hl-page:: 506 - hl-color:: yellow - id:: 6438e88b-e3e6-44a4-9f79-411c1f27ae71 - - On every `open` call, the OS creates a new entry in the *open file table* even for the same file (same inode). Thus, they have independent offsets. - - Through `fork` or `dup`, we can make 2 file descriptors point to the same entry. In this case, reference count is needed to track when to release the entry. - - Figure 39.3: Processes Sharing An Open File Table Entry + - file descriptor: an integer, ==private per process==, used to access files + hl-page:: 501 ls-type:: annotation - hl-page:: 508 + id:: 6438dd78-68fe-47c6-8ca6-b2de3206f4f1 hl-color:: yellow - id:: 6438e98b-b46f-4038-a984-eb172a628cc7 \ No newline at end of file + - can be seen as a handle for file operations, or a pointer to an object of type file + - Reading And Writing Files: system call `read` and `write` + hl-page:: 502 + ls-type:: annotation + id:: 6438e073-2636-4ec8-807d-3ecf83a5c0c0 + hl-color:: yellow + - Non-sequential access: system call `lseek(fd, offset, whence)` + - explicit and implicit update to file offset + - open file table: represent all currently opened files in the system + - Shared File Table Entries + ls-type:: annotation + hl-page:: 506 + hl-color:: yellow + id:: 6438e88b-e3e6-44a4-9f79-411c1f27ae71 + - On every `open` call, the OS creates a new entry in the *open file table* even for the same file (same inode). Thus, they have ==independent offsets==. + - Through `fork` or `dup`, we can make 2 file descriptors point to the ==same entry==. In this case, ==reference count== is needed to track when to release the entry. + - Figure 39.3: Processes Sharing An Open File Table Entry + ls-type:: annotation + hl-page:: 508 + hl-color:: yellow + id:: 6438e98b-b46f-4038-a984-eb172a628cc7 + - Writing Immediately + ls-type:: annotation + hl-page:: 509 + hl-color:: yellow + id:: 643a7463-39e5-4645-8b43-b8be7b8ea7bc + - `write` system call is generally buffered, so the change may be applied to the disk some time later + - In rare cases, this could lead to data loss which is unacceptable for software like DB.j + - `fsync()` a particular file descriptor, and then the FS will force all dirty data to disk. + - In some cases, `fsync` the directory containing the target file is also necessary. + id:: 643a7594-e799-4dec-a9f6-fa94fada363f + - Renaming File: A special system call `rename(char*, char*)` for this, which is usually implemented to be atomic. + hl-page:: 509 + ls-type:: annotation + id:: 643a782a-b874-4f34-9968-50b69a04b849 + hl-color:: yellow + - File Information: `stat` or `fstat` system call which fetches information store in the file's *inode* + hl-page:: 510 + ls-type:: annotation + id:: 643a789e-6346-4845-9d38-95d26927a32b + hl-color:: yellow + - Removing Files: `unlink` + hl-page:: 511 + ls-type:: annotation + id:: 643a79be-d297-4f8d-8825-83c9f830af0e + hl-color:: yellow + - Directory Operations + - Making Directories: `mkdir`. Even an empty (newly created) directory has 2 entries: `.` and `..` + hl-page:: 512 + ls-type:: annotation + id:: 643a7a52-0c85-435c-8250-3f4198a09fc0 + hl-color:: yellow + - Reading Directories: 3 calls `opendir` `readdir` `closedir` and a `dirent` structure with a few fields. A directory "file" is comprised of many entries said above. + hl-page:: 513 + ls-type:: annotation + id:: 643a7c32-0be4-4a2e-9532-31869f4e725a + hl-color:: yellow + - Deleting Directories: `rmdir`. Note that, this syscall can only remove empty directories or it will simply fail. + hl-page:: 514 + ls-type:: annotation + id:: 643a7d55-768c-4881-b78d-f721c8d7929d + hl-color:: yellow + - Links + - Hard Links + hl-page:: 514 + ls-type:: annotation + id:: 643a7d87-b945-4068-94dd-2b2d203eae67 + hl-color:: yellow + - syscall `link` creates another name in the directory which refers to ==the same inode== of the original file. + - The *inode* keeps a reference count indicating how many hard links refer to it. On each `unlink`, RC decreases and the file will be deleted once the RC gets to 0. + - Hard links are essentially ==entries in directories== and hard links pointing to the same *inode* are just ==identical except their names==. + - An interesting usage of `link` is to rename, link to new and unlink the old + - Limitation: cannot link to a directory, cannot link to file on another partition (because *inode numbers* are only unique in the same FS/partition) + - Symbolic Links (Soft Links) + hl-page:: 516 + ls-type:: annotation + id:: 643a8017-1499-4cd3-a015-0f1e8d143e93 + hl-color:: yellow + - syscall `symlink` + - A symbolic link is essentially a ==special type of file==, which holds the pathname of the linked-to file. + - Dangling reference is possible, when then original file is deleted. + - Permission Bits + ls-type:: annotation + hl-page:: 518 + hl-color:: yellow + id:: 643a84cb-102e-4beb-a138-e8690f68356f + - 10 characters (as shown in the out of `ls`) + - The left most indicates the type of the file, such as `-` for regular, `d` for directory, `s` for symbolic link and so on. + - The other characters are grouped by 3, each corresponding to a bit. Each 3-bit group indicates the permission of *owner*, *group* and *anyone*, and the bits means namely r/w/x. Note that as for directories, x bit represents the permission to enter directory. +- eponymous (与标题)同名的 + hl-page:: 512 + ls-type:: annotation + id:: 643a7a83-66d0-4bbc-8b17-bd7604a0ed5f + hl-color:: green +- hamster 仓鼠 + hl-page:: 515 + ls-type:: annotation + id:: 643a7dda-5c26-4ed5-8e06-c03e5a0e9fb7 + hl-color:: green +- ## File System Implementation + hl-page:: 526 + ls-type:: annotation + id:: 643a88bf-206b-4b6d-9d92-95516bcbe270 + hl-color:: yellow + collapsed:: true + - The Mental Model: data structure of the FS and its access methods + hl-page:: 526 + ls-type:: annotation + id:: 643a8c8e-b3ae-4de8-9280-75201b02d6db + hl-color:: yellow + - Disk Organization + - **blocks**: divide the disk into blocks (i.e. commonly used 4KB) + hl-page:: 527 + ls-type:: annotation + id:: 643a8ce0-15b0-4d37-987d-6e649a59b616 + hl-color:: yellow + - **data region**: most of the space is user data + hl-page:: 527 + ls-type:: annotation + id:: 643a8ef8-7d3f-4794-9f00-4973a3be9bb7 + hl-color:: yellow + - **inode table**: an array of inodes containing metadata to track per-file information + hl-page:: 528 + ls-type:: annotation + id:: 643a8f4b-ac22-4cb8-b68d-e7f3078709c1 + hl-color:: yellow + - **allocation structures**: recording information about free blocks, such as free list or bitmap. The `vsfs` from the book has one for inodes and another one for user data. + hl-page:: 528 + ls-type:: annotation + id:: 643a8fa4-9783-4e86-8b04-2fad1f3a5c66 + hl-color:: yellow + - **superblock**: information about the whole file system + hl-page:: 529 + ls-type:: annotation + id:: 643a9022-da94-4092-8a64-e22cd2364365 + hl-color:: yellow + - Inode + ls-type:: annotation + hl-page:: 529 + hl-color:: yellow + id:: 643a92a1-90df-4342-a183-85c55242b8af + - **i-number**: each inode is referred to by a number (low-level name). Given an i-number, the on-disk location of the inode could be calculated fairly easily. Note that disk is not byte-addressed, need to read the whole sector. + - **metadata**: Inside each inode is virtually all of the information you need about a file. In addition, some necessary data for looking up data blocks. + - The Multi-Level Index + ls-type:: annotation + hl-page:: 531 + hl-color:: yellow + id:: 643a93f0-e122-4ea5-a228-48607f93e404 + - **direct pointer**: refer to one disk block that belongs to the file + - **indirect pointer**: points to a ==block that contains more pointers==, each pointing to a user data block. + - An inode may have s==ome fixed number of direct pointers==, and ==a single indirect pointer==. If a file grows large enough, an indirect block is allocated (from the ==data-block region of the disk==), and the inode’s slot for an indirect pointer is set to point to it. If even file grows even larger, add double/triple/... indirect pointer to your inode. The pointer refers to a ==block containing pointers to indirect blocks==, described above. + hl-page:: 531 + ls-type:: annotation + id:: 643a950d-c2c2-419b-8206-0b957b7de178 + hl-color:: yellow + - Figure 40.2: File System Measurement Summary -- Most files are small + hl-page:: 533 + ls-type:: annotation + id:: 643a96d1-5114-40f7-9dad-4291462344ff + hl-color:: yellow + - Extent-based approaches + hl-page:: 532 + ls-type:: annotation + id:: 643a975d-f0a2-47e7-bf85-63a300a2c504 + hl-color:: yellow + - **extent**: a disk pointer and a length (how many contiguous blocks are there starting from the pointer) + - The advantage of this kind of approach is that, it is more compact, thus ==saving a lot of metadata==. The disadvantage is that, sometimes it is not easy to find many ==contiguous chunks==. Thus it works better when there is enough free space. + id:: 643a97ff-4b62-41bf-aa72-7316a8f3b974 + - Linked-based approaches (FAT) + hl-page:: 534 + ls-type:: annotation + id:: 643a9c2b-a519-4800-9188-253b13e9c2e5 + hl-color:: yellow + - For each file, there is only one ==pointer to the first block== of the file. If more blocks are needed, add a ==pointer to another block at the end of this block==. + - Directory Organization + ls-type:: annotation + hl-page:: 533 + hl-color:: yellow + id:: 643a990d-2b82-4bed-a49d-46746821b5a4 + - A linear ==array of entries==. Each entry is a`(entry name, inode number)` pair, and perhaps an additional `length` (total bytes of this entry) and `strlen` (for the name). + - Directory, from the FS's perspective, is a ==special type of file==. Directories are allocated in *data region*, and also has corresponding inodes. + - Deleting a file can leave an empty space in the middle of the directory's block, and thus the FS needs to handle that (maybe mark it for reuse?). + - Free Space Management + ls-type:: annotation + hl-page:: 535 + hl-color:: yellow + id:: 643a9d3c-3847-4a2e-b50e-f8423b089b39 + - For our simple `vsfs`, search through the bitmap. + - pre-allocation: when allocating, look for a sequence of blocks (contiguous on disk) and give them to the new file, in order to improve performance + hl-page:: 535 + ls-type:: annotation + id:: 643a9d6e-eab7-475c-9822-9b2efa21e6f0 + hl-color:: yellow + - Reading A File From Disk + ls-type:: annotation + hl-page:: 536 + hl-color:: yellow + id:: 643a9e6c-c2bd-48b9-80b8-b98340f91f7a + - Open: traverse the pathname and locate the desired inode. Since the inode of root directory `/` is fixed, we can start from `/`: load inode, read directory data, search for the next-level entry and recursively go down until the desired file's inode is loaded. + hl-page:: 536 + ls-type:: annotation + id:: 643a9e8a-5f34-4dc9-817b-30466e84ffe2 + hl-color:: yellow + - The amount of I/O generated by the open is proportional to the length of the pathname. + ls-type:: annotation + hl-page:: 537 + hl-color:: yellow + id:: 643ab82b-d15c-4298-b52b-30c27da1deb0 + - Read: first consult the file's inode for block address, and may update `access_time` field in the inode after read. + - Writing A File To Disk + ls-type:: annotation + hl-page:: 537 + hl-color:: yellow + id:: 643ab83e-d2fe-4f02-b467-b969ab2482cc + - Write (with new block allocation): besides the cost of `open`, write to new block needs 5 IOs: read-write data bitmap (to allocate new free block), read-write inode (give the new block to the file), and finally write the block itself. + - Create: First of all, walk the path to its parent directory (a lot of IOs similar to `open`). Then, read-write inode bitmap (to allocate new inode block), write the new inode, read-write parent inode. Finally, if the directory block cannot accommodate the new file, more IOs generated. + - Caching and Buffering + ls-type:: annotation + hl-page:: 539 + hl-color:: yellow + id:: 643abc13-2fdb-4a66-932a-eea1eafa449a + - static partitioning: a fixed-size cache to hold popular blocks with swap strategies such as LRU. Can be wasteful, though + hl-page:: 539 + ls-type:: annotation + id:: 643abc6f-93a1-44e8-bb62-e56b2a9f2541 + hl-color:: yellow + - dynamic partitioning: modern OSs integrate VM pages and FS pages into a unified page cache + hl-page:: 539 + ls-type:: annotation + id:: 643abc73-d5b4-4627-9ab9-ef8863bc8f3d + hl-color:: yellow + - write buffering: FS can batch some updates into one IO to disk; FS can schedule subsequent IOs; some writes can be eliminated (such as an overwrite) + hl-page:: 540 + ls-type:: annotation + id:: 643abc3c-040a-4f2f-89e4-ca14c9c0c230 + hl-color:: yellow +- akin 相似的;类似的: + ls-type:: annotation + hl-page:: 532 + hl-color:: green + id:: 643a96a0-f55d-4a84-bf93-4732a282b124 +- readily 容易地;乐意地; + ls-type:: annotation + hl-page:: 533 + hl-color:: green + id:: 643a96cb-bb7d-44c7-ac86-1e55a7ea3249 +- per se 本质上,本身 by itself + hl-page:: 534 + ls-type:: annotation + id:: 643a9be6-58e7-47a5-9ef2-bfff1f4c88a7 + hl-color:: green +- bad mouth 说人坏话 + hl-page:: 541 + ls-type:: annotation + id:: 643abbf4-1d1a-4b32-9d91-345983406ce5 + hl-color:: green +- ## Fast File System + ls-type:: annotation + hl-page:: 544 + hl-color:: yellow + id:: 643abf69-04dc-428c-996d-b139cba0fa1f + collapsed:: true + - Problems with the rudimentary FS + - Data spread over the space, leading to long seek time between, e.g., inode and its data + - Free space get fragmented, making sequential read to a file slow + - Block size (512B) too small + - On-disk Structure + hl-page:: 546 + ls-type:: annotation + id:: 643ac12f-817c-459b-b9ba-bbb1745519fb + hl-color:: yellow + - **cylinder**: ==a set of tracks== on different surfaces of a hard drive that are the ==same distance from the center== of the drive + hl-page:: 546 + ls-type:: annotation + id:: 643ac141-3bff-4b00-9c18-57ad7c108fe5 + hl-color:: yellow + - **cylinder groups**: aggregates consecutive cylinders into a group + hl-page:: 546 + ls-type:: annotation + id:: 643ac144-24f3-46ca-9354-47c9d2f4ffe0 + hl-color:: yellow + - **block groups**: modern HDDs tend not to expose internal structure, so the OS cannot have cylinder groups. Instead, organize the drive into block groups (they are consecutive anyways). + hl-page:: 547 + ls-type:: annotation + id:: 643ac1ec-08d9-4584-b6ed-4332f8f791a0 + hl-color:: yellow + - FFS spreads the components of a FS into each cylinder group. + - Each group has a copy of the super block. + - A per-group inode bitmap and data bitmap, keeping free block info in the group + - The remaining blocks are data blocks. + - Allocation Policies + hl-page:: 548 + ls-type:: annotation + id:: 643ac42c-edf9-4b68-8890-b04d724c2ac2 + hl-color:: yellow + - Basic mantra: Keep related stuff together. + - **Directory** placement: put the new directory in the cylinder group with a ==low number of allocated directories== (to balance directories across groups) and a ==high number of free inodes== (to subsequently be able to allocate a bunch of files) + hl-page:: 548 + ls-type:: annotation + id:: 643ac55f-b4a2-4bfc-ad0b-23c785c4871e + hl-color:: yellow + - **File** placement: data blocks of a file in the ==same group as its inode== (long seeks between inode and data) , and it places files that are in the ==same directory== into the cylinder group of their enclosing directory. + hl-page:: 548 + ls-type:: annotation + id:: 643ac616-ab90-40d5-94b2-7b8c294c4360 + hl-color:: yellow + - The Large-File Exception + ls-type:: annotation + hl-page:: 551 + hl-color:: yellow + id:: 643ac8cc-7164-4066-9730-231063c6c7c0 + - Large file hurts locality by filling up the group and preventing other related files being placed in the same group + - After some number of blocks are allocated into the first block group, FFS places the next "l==arge" chunk of the file in another block group==. For example, put blocks pointed by direct pointers (12 blocks) in the first group, and those pointed to by the indirect block (1K blocks) in another. + hl-page:: 551 + ls-type:: annotation + id:: 643ac9e7-1479-4be9-81fe-acb750f363b4 + hl-color:: yellow + - Potential Performance: large sequential read from a large file. However, with selected chunk size (threshold of going to another group), ==cost of seek between groups can be amortized==. The larger size of a chunk, the higher average bandwidth you will reach. + - Measuring File Locality + hl-page:: 550 + ls-type:: annotation + id:: 643ac769-6511-4954-a43a-957f3b561c56 + hl-color:: yellow + - The metric can be: the distance to the common ancestor of the 2 files which are consecutively opened. + - About 40% are either the same or under same directory (FFS captures this), and 25% have distance of 2 (FFS failed to capture this) + - A Few Other Things About FFS + hl-page:: 553 + ls-type:: annotation + id:: 643acef0-5592-4bad-8557-878567dc18a1 + hl-color:: yellow + divide block into sub-blocks to save disk space (4K is too large for small files), and modify *libc* to buffer writes in 4KB chunks; + parameterization, a different disk block layout to improve sequential read +- replica 复制品 + ls-type:: annotation + hl-page:: 547 + hl-color:: green + id:: 643ac2c5-a62f-473b-b0e5-32807c7b2e6a +- corollary 必然的结果(或结论) + hl-page:: 548 + ls-type:: annotation + id:: 643ac41b-c2e0-4351-b0e3-012e792cf426 + hl-color:: green +- extensive 广阔的,广泛的;大量的,大规模的 + ls-type:: annotation + hl-page:: 549 + hl-color:: green + id:: 643ac4ec-df99-430a-9e2e-78101c74b14e +- nuance (意义、声音、颜色、感情等方面的)细微差别 + hl-page:: 549 + ls-type:: annotation + id:: 643ac4f0-6809-4acd-b141-2a96174f5395 + hl-color:: green +- watershed 分水岭 + hl-page:: 555 + ls-type:: annotation + id:: 643acd1b-5a18-4b14-acdc-006c2f97c0e8 + hl-color:: green +- ## Crash Consistency + hl-page:: 558 + ls-type:: annotation + id:: 643acfc2-eef7-4c7f-a8a5-1740c8788159 + hl-color:: yellow \ No newline at end of file