{"format":"brushup-mindmap-v1","id":"os-00-sheet1","title":"基本概念","structure":"timeline-h","theme":"auto","root":{"id":"07bba7a6bbbb12bd5eecf9c3fd","topic":"基本概念","expanded":true,"children":[{"id":"3fd807a1163af0db631eca7253","topic":"操作系统基本概念","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-44b04ee4db8d01.svg"},"children":[{"id":"344a0ef55e0b72e597c8eaa98c","topic":"操作系统概念","expanded":true,"children":[{"id":"f61ba9c2bb0a1f92f7fb2af74e","topic":"操作系统（operating system，简称OS）是管理【计算机硬件】与【软件资源】的【计算机程序】。操作系统需要处理如管理与配置内存、决定系统资源供需的优先次序、控制输入设备与输出设备、操作网络与管理文件系统等基本事务。操作系统也提供一个让用户与系统交互的操作界面。","expanded":true}]},{"id":"4c3be52ff568ef977cbb8b710f","topic":"四大特征","expanded":true,"children":[{"id":"7df861f92789c992d40a5be279","topic":"并发","expanded":true,"children":[{"id":"13a8222d646bec1abb134a0dbe","topic":"两个或多个事件在同一时间间隔发生","expanded":true,"style":{"background":"#FF9595"}},{"id":"e8282e433279fe30cd90290694","topic":"并行","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"e2680c922f993fc36f5f88d4aa","topic":"多流水线或者多CPU可以实现并行","expanded":true},{"id":"b80935c66299bd81200e582422","topic":"在同一时间同一时刻","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"a28859c7157a3bfe1ffff95770","topic":"引入进程目的就是让程序可以并发","expanded":true},{"id":"56181036599abb480c41a85748","topic":"【宏观并行，微观并发】","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"73ff7d13-05c5-478c-aecc-8b07edb63249","topic":"并发：两个程序一个CPU，依次轮询使用1ms，宏观上看是同时处理了两个程序","expanded":true}]},{"id":"97293c4ff87b003b84df098aba","topic":"并发是资源共享的基础，若OS不支持并发，则不存在共享","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"4b0db139-601b-4896-9451-e075d304617b","topic":"A在使用资源，此时A还没有结束进程，B就想来使用，A让给了B：【能并发、有共享】","expanded":true}]}]},{"id":"10eaab2d04693eb909bf59f42c","topic":"共享","expanded":true,"children":[{"id":"03e9d6310bdb1e5a5bfca916f7","topic":"指资源共享","expanded":true,"style":{"background":"#FF9595"}},{"id":"6a897a929e08ec49d5703b19eb","topic":"互斥资源共享","expanded":true,"children":[{"id":"d2ba2a6e4aeae6d60c78b98fc8","topic":"在一段时间内，无论宏观微观都不可以同时访问","expanded":true,"style":{"background":"#FF9595"}},{"id":"8e1a4878b678a8ac63e47ab8bd","topic":"如打印机、磁带机","expanded":true},{"id":"aa68f45c095a344bd78259b6ae","topic":"互斥式共享","expanded":true,"children":[{"id":"0b1b61018f4be91aa9079a2054","topic":"进程A访问完才可以释放，才允许另一进程访问","expanded":true}]},{"id":"72b91027669a9421cf4b6aecef","topic":"独占资源/临界资源","expanded":true,"children":[{"id":"304839fde369b69dae0ca94d8c","topic":"一段时间内只允许一个进程访问的","expanded":true}]}]},{"id":"7479fbe26a6a4b497c526beac4","topic":"同时访问方式","expanded":true,"children":[{"id":"48cb934e9219009caf3cda50ef","topic":"在一段时间内，宏观上同时访问微观上分时访问","expanded":true}]},{"id":"f87b1d44505957a2915ffa4927","topic":"OS对共享资源的管理会影响到并发执行的情况","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"43e8674db448d4c5523e4bf7da","topic":"虚拟","expanded":true,"children":[{"id":"511bcdc7c848c2ed7c72784d10","topic":"把一个物理实体变为若干逻辑上的对应物","expanded":true,"style":{"background":"#FF9595"}},{"id":"cc5b4c92f76ab2dbe1eefa2de1","topic":"虚拟处理器","expanded":true,"children":[{"id":"9ecadedf3cd95d10740c19091f","topic":"利用多道程序设计技术把一个物理上的CPU虚拟为多个逻辑上的CPU","expanded":true,"children":[{"id":"fb7b72aeb89a2f325faae97c6f","topic":"通过并发","expanded":true}]}]},{"id":"471b0776edfa00255cd22a6b53","topic":"虚拟内存","expanded":true,"children":[{"id":"92b8c9c4d2ea9c87965f48fa55","topic":"虚拟存储器","expanded":true},{"id":"96386650509ad4e39d8d1b200a","topic":"把物理存储器转变为虚拟存储器，以从逻辑上扩充存储器容量","expanded":true}]},{"id":"087b6afd648b0bc5a49c8b1601","topic":"虚拟外部设备","expanded":true,"children":[{"id":"f4085c0e87a91d1de20fd8a054","topic":"将一台物理IO设备虚拟为多台逻辑IO设备","expanded":true,"children":[{"id":"bb079499-da3c-4f80-85ee-b0ce3b1694d0","topic":"Spooling技术","expanded":true}]}]}]},{"id":"7e7bfc5e64ca9afaebf8492943","topic":"异步","expanded":true,"children":[{"id":"84cab7775459fb396ede6a954d","topic":"进程是以不可预知的速度向前推进的，这就是进程的异步性","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"5ae9fb919139b02200840a6501","topic":"目标和功能","expanded":true,"children":[{"id":"829822f284b8192797222aafa2","topic":"系统资源的管理者","expanded":true,"children":[{"id":"1cfa27b8097a6047a4dd29a3c1","topic":"处理机管理","expanded":true,"children":[{"id":"579b554d562ae7305d1ccbdba2","topic":"进程","expanded":true}]},{"id":"0b6b71d8cc1ae009c528a9d91d","topic":"存储器管理","expanded":true,"children":[{"id":"be68b24ea0a96ab0babaeb8c87","topic":"内存","expanded":true}]},{"id":"1ce83e9e704bff9fd1fc6837c5","topic":"文件管理","expanded":true,"children":[{"id":"e8ba06a3ee0b7ab933a39afade","topic":"文件","expanded":true}]},{"id":"2b88a23ab86a36c1faef69f867","topic":"设备管理","expanded":true,"children":[{"id":"7858a839dbd9dfe6e060d9072e","topic":"IO","expanded":true}]}]},{"id":"059b6c783ccad6b156c73a55c9","topic":"用户和硬件的接口","expanded":true,"children":[{"id":"e21987983c290b306fff784618","topic":"命令接口","expanded":true,"children":[{"id":"0ecb7e938b1a1d3a818abaa1ea","topic":"联机","expanded":true},{"id":"b8eabc09ab88ce16493f387338","topic":"脱机","expanded":true}]},{"id":"13e993ef0058487eacd2796a62","topic":"程序接口","expanded":true,"children":[{"id":"708afe9333198cc9305fbadeb1","topic":"使用GUI","expanded":true}]}]},{"id":"bca8fd3eb0e9c2c91f08cb4077","topic":"用作扩充机器","expanded":true,"children":[{"id":"15e95706b978cfaf73ae9b8d72","topic":"没有任何软件支持的计算机称为裸机","expanded":true},{"id":"e8ebe166ef1a04a379181b087b","topic":"覆盖了软件的机器为扩充机器、虚拟机","expanded":true}]}]},{"id":"751fc4c9-c59c-4649-80a7-49c3e41941a4","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"dddfbb1b-aea1-49fa-ae48-2db6f8163eea","topic":"09、10、13、22","expanded":true}]}]},{"id":"bf89ec3435481989f6a278bd3c","topic":"操作系统的发展和分类","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-585f1b7054eb27.svg"},"children":[{"id":"9f5b1fa5-8a43-45ab-b8d8-fd52b586920b","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"69fb638e-637d-4094-b6ae-d5f8c2559a48","topic":"16、17、18","expanded":true}]},{"id":"d5e8ef5464ca777d6238e90901","topic":"手工操作","expanded":true,"children":[{"id":"a76beb3f7fca545a8050fbb7e1","topic":"需要大量的时间进行人工处理，输入输出以及计算机计算的时候微乎其微","expanded":true},{"id":"66ab88f473ba64f4e4acdb83fa","topic":"缺点：","expanded":true,"children":[{"id":"e4ea51e4c34974d3d294393884","topic":"用户独占全部、资源利用率低、CPU等待手工操作、CPU利用不充分","expanded":true}]}]},{"id":"d30b0dbe322aa4f9a961e9cbcf","topic":"批处理阶段","expanded":true,"children":[{"id":"28494a7bf63a830966bea91cef","topic":"单道批","expanded":true,"children":[{"id":"638b72f3456805899832facfb9","topic":"自动性、顺序性、单道性","expanded":true,"children":[{"id":"2c9a7c34ce0b82d80f56985ed4","topic":"比手工操作的人工处理时间更少","expanded":true}]}]},{"id":"b43833f75f287baee8d0299271","topic":"多道批","expanded":true,"children":[{"id":"1d2badfb7c68ac2faffba81f9d","topic":"多道、宏观并行、微观串行","expanded":true,"children":[{"id":"2f799a18c86b9a12043d691207","topic":"实现了并发","expanded":true}]}]},{"id":"1079739904cad92bda458bafdf","topic":"缺点：","expanded":true,"children":[{"id":"3cb988ec04f9dfa8bbd4cab386","topic":"不提供人机交互","expanded":true,"children":[{"id":"22fbd0cbc70baf0d5d138bf2fc","topic":"优点：","expanded":true,"children":[{"id":"63db8aded7bb2403b1ce59d29e","topic":"资源利用率高\n更能保持忙碌情况","expanded":true}]}]}]}]},{"id":"861aa5a054eb2bf57a14196c39","topic":"分时操作系统","expanded":true,"children":[{"id":"dd591335da2b764d6ecaaacbc2","topic":"同时性、交互性、独立性、及时性","expanded":true,"children":[{"id":"447abd3f05eace102b836803a5","topic":"独立性：多个用户可以不被干扰的控制计算机","expanded":true,"style":{"background":"#FF9595"}}]},{"id":"795ab5c1186af3f6032579308a","topic":"会浪费一定的资源利用率来完成分时操作","expanded":true,"style":{"background":"#FDD834"}},{"id":"8f189ba2db694d17dedafbdc8b","topic":"缺点：","expanded":true,"children":[{"id":"e58893821a4a64b2a7ef9afcb2","topic":"缺乏对紧急事件的处理能力","expanded":true,"children":[{"id":"f6f846f8ba1940547fffdaed87","topic":"优点：可以人工交互","expanded":true}]}]}]},{"id":"6dcaa3621d299747bc29991409","topic":"实时操作系统","expanded":true,"children":[{"id":"8a09d836243b1d3b968f4a45b4","topic":"硬实时","expanded":true,"children":[{"id":"5b0ab74d9e6aad71845f0abdf8","topic":"某个动作必须提供绝对的保证，在某个特定时间内完成","expanded":true}]},{"id":"1aea4aa1c8c8796bf45c89375d","topic":"软实时","expanded":true,"children":[{"id":"9609ddd23868c8200f93291305","topic":"可以偶尔违背一下时间规定的","expanded":true}]}]},{"id":"6b9b20f1023b634ca9098864d4","topic":"网络操作系统","expanded":true,"children":[{"id":"253bcff01da8e95e9a37aad07d","topic":"网络中的各种资源共享和多台计算机进行通信","expanded":true}]},{"id":"ab394dba8a9bce2540eb9b6ea7","topic":"分布式操作系统","expanded":true,"children":[{"id":"404915d3905adea438d2fb322b","topic":"每台主机都有同等地位，不存在主机从机","expanded":true}]},{"id":"34fa1ba635f9dfc70ff3bbc1ce","topic":"个人计算机操作系统","expanded":true,"children":[{"id":"2a1b17963ba8dc64edf0e8b80f","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f7db496fd320d8.png","width":777.39,"height":263.6}}]},{"id":"af094b9f9e18ac8da522ba8cec","topic":"多任务（现代计算机）操作系统：","expanded":true,"children":[{"id":"7eab34cc12699a1db955191629","topic":"并发 + 并行","expanded":true}]}]},{"id":"7cf9644aaebbdea584badbf14c","topic":"操作系统运行环境","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-127eb26f8b6f75.svg","width":94,"height":94},"children":[{"id":"262ffcee-d346-4a49-8410-c81225f3863d","topic":"处理器运行模式","expanded":true,"children":[{"id":"f43149fe-936b-471b-ac7e-3181c63c5507","topic":"特权指令/非特权指令","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"1022972f-2630-43a0-a797-76c200a53a4b","topic":"特权指令：是指不允许用户直接使用的指令，如I/O指令、置中断指令","expanded":true,"style":{"background":"#8EDE99"}},{"id":"0eb07d2a-881f-45bd-a63f-8be5e5935534","topic":"非特权指令：是指允许用户直接使用的指令，它不能直接访问系统中的软硬件资源，仅限于访问用户的地址空间，这也是为了防止用户程序对系统造成破坏","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"3f68261cf59a42a252c838140d","topic":"内核态和用户态","expanded":true,"children":[{"id":"7c3ab845dcea04b19a32b96ad0","topic":"PSW = 1，即在内核态（管态）","expanded":true},{"id":"20280b9c96a9474a2689d81dbc","topic":"PSW = 0，即在用户态（目态）","expanded":true},{"id":"4d7bd125-80e9-42e1-ae28-6bc66e0fe3f9","topic":"广义指令 = 系统调用","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"29a25f82-2eee-4c56-b7ce-820326e4d49b","topic":"广义指令在用户态下调用，内核态下执行","expanded":true,"style":{"background":"#FF9595"}}]}]}]},{"id":"be38a178d37b7c5950863993ec","topic":"4方面内容：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"ec0a0942a5aaf1bf9cee5b6414","topic":"时钟管理","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"884a70ffe0cad2bf3fa95829a3","topic":"功能：计时、切换进程","expanded":true}]},{"id":"bdcbbd32073a8a5a611d0bafbc","topic":"中断机制","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"75c82b8fed6825916e27f9b3aa","topic":"引入中断提高CPU利用率，提高外部设备利用率","expanded":true}]},{"id":"153a630b63c88bf47c1abad385","topic":"原语","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"caa9344ff1ab10701b0188a9eb","topic":"处于操作系统最底层","expanded":true},{"id":"3f98660b46992b97044769db72","topic":"具有原子性，一气呵成","expanded":true},{"id":"f7292835ff9a92b36bf3e83985","topic":"运行时间短，调用频繁","expanded":true}]},{"id":"32abd6123cf9f81ff3a839a3d4","topic":"系统控制的数据结构和处理","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"3a29c968e58b9c07dbf39b7028","topic":"进程管理","expanded":true},{"id":"08f87d1729fbc65b09cabb39b5","topic":"存储器管理","expanded":true},{"id":"1cca2f9b79eaa19684245af5e0","topic":"设备管理","expanded":true}]}]},{"id":"36c89ed5640938486af2cbe456","topic":"中断和异常","expanded":true,"children":[{"id":"02c80201b438d390d0fd284aef","topic":"中断","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"db4ae5c597fa53c4b987cb58db","topic":"内中断","expanded":true,"children":[{"id":"c790fe5c-4e28-48e7-9b96-b552f923c908","topic":"来自CPU内部的","expanded":true},{"id":"9d2a7ff2be499b282bd5dbaac4","topic":"故障 fault","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"14ec994a-f46b-423c-b289-eb03fbdcbb9c","topic":"fault是可以被修复的异常","expanded":true,"style":{"background":"#FDD834"}},{"id":"24b75d42-c627-4f82-b183-a3563b57d508","topic":"非法操作码、缺页、除数为0、溢出","expanded":true}]},{"id":"8ab808cdfdcbb861f190f98fe8","topic":"自陷 trap","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"9682d158-5296-4e70-a1e4-81396689c21e","topic":"trap指令","expanded":true,"style":{"background":"#FDD834"}},{"id":"f03af47f-1cd7-417b-8076-e58cc19babbf","topic":"安排好的时间，在用户态下调用操作系统内核程序","expanded":true}]},{"id":"b859ccb2e218d898d9b09a0a57","topic":"终止 abort","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"6b935ff1-5a8f-490b-b008-8056465804dc","topic":"abort是十分严重的异常","expanded":true,"style":{"background":"#FDD834"}},{"id":"c0a7eb26-2cbb-496f-a884-57c9fc93b4e0","topic":"使CPU无法执行的硬件故障，例如控制器出错了、存储器校验错等","expanded":true}]}]},{"id":"340bb52a6c5a3a19c5d2dba317","topic":"外中断","expanded":true,"children":[{"id":"b6e9a5e8-b1c1-43ea-aac2-d54fcace2ecc","topic":"通常处理IO","expanded":true},{"id":"ea098d2c7db820b8bcac9bff03","topic":"可屏蔽中断 INTR","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"fb71ca1d-8738-449f-b0d2-69e7bc09900e","topic":"通过改变屏蔽字实现多重中断","expanded":true}]},{"id":"e6895a29f52872e5e6c36b1629","topic":"不可屏蔽中断 NMI","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"a6b3bd5b-fe1e-441b-ba29-894022dbe7e4","topic":"紧急的硬件故障","expanded":true}]}]}]},{"id":"d7a85a6713f85b056c9918a9e6","topic":"中断处理：","expanded":true,"children":[{"id":"02cbb9edeafb412eaf72bad1a5","topic":"OS检测到中断后，就会查询系统中断向量表，找到应该执行的中断处理程序","expanded":true,"children":[{"id":"33cbdc008db8f5723daa9a5025","topic":"通过中断向量地址 --->  中断向量 ---> 处理程序","expanded":true}]}]},{"id":"ffab81d53b1a83523803fa817b","topic":"中断处理过程：","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"be8a748f718a13fc2871ea0c7c","topic":"中断隐指令","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"b7ba8db471e965be57626890b2","topic":"1. 关中断","expanded":true},{"id":"263be761b3ab41da266e0aa41e","topic":"2. 保存断点","expanded":true,"children":[{"id":"44480d27c61be873e4c2cb9bc1","topic":"即PC寄存器的内容","expanded":true}]},{"id":"5aa9b936819b2c0aa5b0a9a9ea","topic":"3. 中断服务程序寻址","expanded":true}]},{"id":"2f5a6b5823fabbed30fb7a782b","topic":"中断程序","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"bed8ec692ada273c4ed36a7fc4","topic":"4. 保护现场和屏蔽字","expanded":true,"children":[{"id":"3febb7a338ca96d0b3c86b9f8a","topic":"现场信息：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"c3e8e506052a18537dbc69f647","topic":"PSW程序状态字寄存器","expanded":true,"style":{"background":"#FDD834"}},{"id":"4c4a86045b6805acef32084580","topic":"通用寄存器内容","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"ae2b2850969a2fe879575ae12e","topic":"屏蔽字：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"01abc2f7e909001267adb8a3b1","topic":"硬件实现、软件实现（计组）","expanded":true,"style":{"background":"#FDD834"}}]}]},{"id":"182915d3c128075ba11acbb125","topic":"5. 开中断","expanded":true,"children":[{"id":"9909aae8c529a830c49efb8406","topic":"如果不支持多重中断，则没有这里的开关中断（计组）","expanded":true,"style":{"background":"#7986CB"}}]},{"id":"6ccabec8ac0b61b24d686bc103","topic":"6. 执行中断处理程序","expanded":true},{"id":"2f49b0250748881fb4a82ac7fb","topic":"7. 关中断","expanded":true},{"id":"4eead9ae7e691ac5f1682b439e","topic":"8. 恢复现场屏蔽字","expanded":true},{"id":"623b9a22929b79ad940cda5fe2","topic":"9. 开中断","expanded":true},{"id":"98eb40aaf76a7fa032339b2e81","topic":"10. 中断返回","expanded":true}]}]}]},{"id":"5fa847aafb4bde968cfc89fed0","topic":"系统调用","expanded":true,"children":[{"id":"79fb798cac1a65d8437d096ac6","topic":"系统调用可视为特殊的公共子程序","expanded":true},{"id":"fa1abbbe553937f616b66b38ad","topic":"分为五类","expanded":true,"children":[{"id":"75a1f077-b810-49f1-8c96-a9b700d124de","topic":"设备管理、文件管理、进程控制、进程通信、内存管理","expanded":true}]}]},{"id":"0b0c2d4e-f053-460c-b7be-c2413af03d7e","topic":"考频：高","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"dbbaabdb-de9e-4daa-b179-cde91954035a","topic":"11、12*2、13、14、15*2、16-22","expanded":true}]}]},{"id":"514d0154-c614-46a6-993f-b984b0e5189b","topic":"操作系统结构","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-6feacda3816260.svg","width":94,"height":95},"children":[{"id":"ea06471e-13de-4ee9-b7a4-6ea968403804","topic":"分层法","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"b89f9ebc-3631-4e8c-8fc2-1da8c3e56e27","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-ea2ed7abf36eb5.png","width":432,"height":304}},{"id":"c13b6a4f-17c2-4c29-b360-c7079bf75894","topic":"优点","expanded":true,"children":[{"id":"f511d1fe-e523-4681-b94e-d03192331319","topic":"1. 简化了系统设计和实现，编程方便，便于调试 2. 便于扩充和维护","expanded":true}]},{"id":"bf5e91c7-616c-46bc-9689-60eb96ddd619","topic":"缺点","expanded":true,"children":[{"id":"2775ff5c-69f4-46fd-85a2-95fc6c852c34","topic":"1. 定义各层比较困难 2. 效率差","expanded":true}]}]},{"id":"1fd1b7a1-ba62-4d99-8c2e-b549cd74c406","topic":"模块化","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"d1364510-15cd-4657-a3fd-e365d7f1960b","topic":"图示","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-7a9fdbdc370e49.png","width":420,"height":180},"children":[{"id":"2f8068be-4cf0-49d5-bb53-f7466f86fb3d","topic":"分块标准","expanded":true,"children":[{"id":"8148857f-363c-412f-907a-54b2062cbd53","topic":"高内聚低耦合","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-b0292df014f831.png","width":261,"height":134}},{"id":"d3daf3cf-464a-44a9-9ecb-ba50dcebbf3f","topic":"模块内紧密度要高，模块间的联系影响要小","expanded":true}]}]},{"id":"ed9f13b8-5095-4aba-b442-714dc1d6c1c2","topic":"优点","expanded":true,"children":[{"id":"734194ce-d1a3-496d-8a70-79ce3c2a38de","topic":"1. 提高了OS的正确性、可理解性、可维护性 2. 可适应性高 3， 加速的开发过程（可以不同模块不同团队同时开发）","expanded":true}]},{"id":"6b903ab9-5652-4c8b-9cf5-c1a47147a93e","topic":"缺点","expanded":true,"children":[{"id":"d48f8dec-f5db-4caf-8c50-a8785ac16729","topic":"1. 【模块间】的接口规定很难满足对接口的需求 2. 各模块开发者难以找到一个可靠的决定顺序","expanded":true}]}]},{"id":"ee1bb868-f5ce-44ad-b5ec-de600ee01184","topic":"宏内核","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"b6a95813-751e-4dc4-bb12-b38fe75f08fc","topic":"单内核、大内核","expanded":true,"style":{"background":"#8EDE99"}},{"id":"a334a572-990e-42f0-954a-139689842995","topic":"OS的所有功能模块全都在内核态","expanded":true},{"id":"90596ab7-5d07-4639-bc48-ed4c9811f45b","topic":"优点：","expanded":true,"children":[{"id":"63022c8f-8bf1-4dd5-bf41-cdffe1ea6cae","topic":"速度快","expanded":true}]},{"id":"b6ce71de-635a-4e81-9b78-9c2086d743bf","topic":"缺点：","expanded":true,"children":[{"id":"2aca6f5e-1c26-4b4e-9764-82b31026e093","topic":"一个模块奔溃导致整个核崩溃","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-4e546e09960e57.png","width":384,"height":223}}]},{"id":"e26acd46-4d53-400a-a845-4b86c05ea352","topic":"在桌面OS中宏内核取得很大成功","expanded":true,"children":[{"id":"a73d6ae8-4cdb-406e-b713-ee45d560a1ab","topic":"例如Windows、MacOS、Linux、iOS、Android等等","expanded":true}]}]},{"id":"29fc8e1b-06e1-496f-98df-ef047fc1d196","topic":"微内核","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"9cd76515-c384-4a11-bb6a-323d520edc81","topic":"把部分内核OS代码移出内核，采用C/S模式进行执行","expanded":true,"style":{"background":"#8EDE99"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f42deca9126899.png","width":430,"height":143}},{"id":"25d32c1d-a99e-4347-8c30-7b4f0fde075e","topic":"内核代码：","expanded":true,"children":[{"id":"6c822b27-3e94-4242-bb5e-87e61ee0e19a","topic":"1. 与硬件紧密相连的 2. 一些较为基本的功能 3. 客户服务器的通信功能","expanded":true}]},{"id":"c3cb767e-0893-4d55-8cd7-e82711b6fb9e","topic":"用户的服务器：","expanded":true,"children":[{"id":"0aef1d71-85a7-41e5-a4d2-8ed287fbf7c3","topic":"这些服务器本质上就是一个进程，借助微内核的消息传递机制进行交互的","expanded":true}]},{"id":"554c2243-bc7b-40da-8397-6ad70fa626db","topic":"基本功能：","expanded":true,"children":[{"id":"ac18551c-8035-4c9e-a010-a2d3760314e1","topic":"线程管理、低级存储器管理、中断和陷入处理","expanded":true}]},{"id":"bf8fbee6-5f22-44a7-bda9-c8ca7ee7b150","topic":"优点","expanded":true,"children":[{"id":"a8ae0563-0be6-409e-894a-a544be2fbd9b","topic":"1. 扩展+灵活（新增内容加个服务器就好）","expanded":true},{"id":"3207568a-c858-4d3f-a83f-d3455850e6bf","topic":"2. 可靠+安全（一个模块崩溃就重启那个模块就好）","expanded":true},{"id":"b7b2275b-ef58-4754-b9d7-8b38b2a9ec34","topic":"3. 可移植性好（服务器的具体细节与硬件无关）","expanded":true},{"id":"f6643da8-6ab8-41c5-a793-beab7e2fe19c","topic":"4. 分布式计算，可以很好的支持分布式系统和网络系统","expanded":true}]},{"id":"44426fb2-cd9b-4e46-bf16-5011602c3dc2","topic":"缺点","expanded":true,"children":[{"id":"715b79f8-7c94-4d5e-a549-997eb549541c","topic":"慢","expanded":true}]},{"id":"28aabf54-2709-4d93-9bb7-3f12d960932d","topic":"在实时、工业、军事、航空等特别流行","expanded":true,"children":[{"id":"508ec367-d1f8-40e2-9bc5-8462d33c7f7f","topic":"谷歌的Fuchsia、鸿蒙OS","expanded":true}]}]},{"id":"3251977a-64ea-475b-a1c7-502038e0e124","topic":"外核","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"262a0ab3-a941-4606-9193-1ce7745a429a","topic":"外核是提高'虚拟机’效率的","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"68640414-011d-4554-a360-48dd26727ef9","topic":"外核可以使一个应用进程直接获得访问内核的权利","expanded":true,"style":{"background":"#8EDE99"}}]},{"id":"4f46cbef-cc74-46e0-b927-80ed3646096d","topic":"优点","expanded":true,"children":[{"id":"40182461-cb8d-430c-acf0-4eb2e422d166","topic":"1. 减少了映射层","expanded":true,"children":[{"id":"8b0cc3de-2875-4ab7-a586-93afdefcc70e","topic":"磁盘的一个部分的盘块就直接分配给了这个虚拟机，这样虚拟机间就不会发生冲突了","expanded":true},{"id":"350eec34-89d5-485b-a7ec-5299e844e23a","topic":"如果不采用外核：那么多个虚拟机使用同一个内存，每个虚拟机进程需要维护一个映射表格","expanded":true}]},{"id":"425f0cb7-1e28-4c31-bd37-345ddaa118aa","topic":"2. 把多道程序（外核外）与OS代码（用户空间）加以分离","expanded":true}]}]}]},{"id":"c0e0feba-9bc6-456d-be61-61e4ae5557cd","topic":"OS引导","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-1a41d00eaed658.svg","width":125.31,"height":127.4},"children":[{"id":"9c53aef8-ebd2-4e06-94e7-802998fef030","topic":"前提","expanded":true,"children":[{"id":"4d513043-bd66-4e35-90f2-eb558e4ddd06","topic":"磁盘的格式化","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"afa0bb82-ef3b-4cf8-b482-8101be94fc2a","topic":"物理格式化","expanded":true,"style":{"background":"#8EDDF9"}},{"id":"e3c644c5-0086-4d1a-9f26-a12a210438ab","topic":"逻辑格式化","expanded":true,"style":{"background":"#8EDDF9"}}]},{"id":"4b3695a8-7f88-4bef-809f-f048528bca10","topic":"RAM和ROM","expanded":true,"children":[{"id":"93295dbf-2dfc-48bc-aaf5-933575532f32","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-3dd2e0838213d9.png","width":250.15,"height":309.84}}]}]},{"id":"79916a2d-8191-4599-bbb9-63317a5e690e","topic":"步骤图示：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"b622757a-11d1-4c54-ad9e-f05fd852b786","topic":"图示","expanded":true,"style":{"background":"#FDD834"},"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-97cdb81ffdb072.png","width":503.16,"height":199.17},"children":[{"id":"b20266d2-a5ed-46b8-b614-3c3a6cbce94b","topic":"MBR中的标志信息位：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"8804bc18-7e78-4358-ba28-45ca6e9d01a3","topic":"告诉主机这个磁盘是不是引导盘（分区中至少有一个分区是活动分区、有操作系统）","expanded":true,"style":{"background":"#FDD834"}}]},{"id":"8b152897-52fc-4799-a2f8-44377ab21ba9","topic":"CPU读ROM进行自检、找OS的","expanded":true,"style":{"background":"#FDD834"}},{"id":"6a25f65d-2cd6-4eed-832f-f483613dc9cb","topic":"引导块：","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"1f32e70d-0db9-41ed-b90e-ff05f9762d8e","topic":"如果该磁盘分区有OS，则引导块不为空；如果没有OS，则为引导块内没有实际内容","expanded":true,"style":{"background":"#FDD834"}}]}]}]},{"id":"bf4333bd-3667-43c5-85e6-b6741ef4d7e1","topic":"步骤：","expanded":true,"children":[{"id":"db1869e5-469e-4d27-b8ce-4325f0da2b9b","topic":"① CPU读ROM","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"5fed5117-f105-4164-a98d-d6f38962fc05","topic":"激活CPU","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"1020c72c-8cb3-4257-984b-debaa811a6dc","topic":"CPU读取ROM里的boot程序，IR置为BIOS的第一条指令（开始运行BIOS）","expanded":true}]},{"id":"8641dc84-81e7-4490-a3ad-e613d7ae072d","topic":"硬件自检","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"dfd7d684-73c3-44ed-b87b-87e975fb3dbd","topic":"启动BIOS程序，硬件开始自检，检查是否有故障","expanded":true}]},{"id":"3e4451ac-008a-4db5-9789-a3198e76e7b6","topic":"带有OS的硬盘","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"2e9d9f71-ba92-4579-9032-5eb222e540f5","topic":"BIOS读取Boot Sequence","expanded":true,"children":[{"id":"eb24e13d-927c-48eb-8a42-21432e1036c1","topic":"Boot Sequence是一个在CMOS中的设置启动顺序的元件","expanded":true}]},{"id":"50caa10d-e7c8-4022-9671-52f391c9eabb","topic":"BIOS找到了设置的第一顺序的存储设备，然后把这个设备的【引导扇区内容（MBR）】加载入内存","expanded":true}]}]},{"id":"c5001ff8-ac3f-4a36-922e-a2a6e6738b75","topic":"② RAM读MBR","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"90c2ee0a-4026-4e0f-bbee-b6a7b171ecd4","topic":"加载主引导记录MBR","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"206f2905-0235-4050-9223-7dafc4679c6a","topic":"硬盘以特定标识符来区分引导和非引导盘。遍历每一个，直到发现引导盘","expanded":true,"children":[{"id":"719613ed-4ad8-4944-9507-20424dc13d8b","topic":"MBR作用：告诉CPU去哪个主分区找操作系统","expanded":true,"style":{"background":"#8EDE99"}}]}]},{"id":"8b6e0fcd-1ee6-414f-afec-bebdec2cd646","topic":"加载硬件分区表","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"31aa53eb-2e02-4be5-9e92-95c768faf9b3","topic":"找哪个磁盘分区中装有操作系统，所以需要扫描MBR中的硬件分区表","expanded":true}]}]},{"id":"b6f78f60-b1aa-4d92-bac8-f74472f13f6b","topic":"③ RAM读活动分区","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"221ee5e7-370a-42e9-99b4-cd57081b0636","topic":"加载磁盘活动分区","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"c464c917-8c89-4e0a-b5d0-5dd5b96905fb","topic":"活动分区：装有OS的分区就是活动分区","expanded":true},{"id":"9355aee9-492a-4975-a8ab-9c335847cf80","topic":"MBR找到了对应的OS分区后，把这分区读入RAM","expanded":true}]},{"id":"e80dbba5-8149-4977-adb0-e9362c087891","topic":"加载分区引导记录PBR","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"cd33c163-9a34-4ed4-bac8-aa7b587ad25f","topic":"PBR：引导块","expanded":true},{"id":"110b8287-8feb-4ac4-9cae-c05399f184e9","topic":"寻找并激活根目录","expanded":true}]},{"id":"d62ae174-c473-4303-9785-6572536d02dc","topic":"加载启动管理器","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"924c8bed-301a-48fc-81db-a93aefb8d326","topic":"图示","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-a361af8957eeb0.png","width":653,"height":366}}]}]},{"id":"7d2ffa48-e06e-47fc-b705-4059e84834f0","topic":"④ RAM读操作系统","expanded":true,"style":{"background":"#FF9595"},"children":[{"id":"3d2ab827-cf9c-4246-a2b1-5e1afba62404","topic":"从根目录处加载操作系统","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"908ff787-7378-482f-830a-cca0467b1de3","topic":"例如MAC的boot根目录","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-53547b34967926.png","width":502,"height":310}}]}]}]}]},{"id":"bebfefe0-a411-4265-807c-26dcdcce9284","topic":"虚拟机","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-840402b6aff094.svg","width":123,"height":124},"children":[{"id":"e993aff7-af4b-4ccd-ac2f-f51c14c92992","topic":"考频：低","expanded":true,"style":{"background":"#8EDDF9"},"children":[{"id":"e5808037-491b-404a-9172-9aecd494b33e","topic":"22","expanded":true}]},{"id":"ffe73d6f-864c-470c-9604-b5cae3e09749","topic":"计算环境","expanded":true,"children":[{"id":"2085a4a5-1367-4779-9fa6-ed86e1978628","topic":"逻辑的计算机，通过隐藏特定计算平台来为用户提供抽象、统一、模拟的计算环境","expanded":true}]},{"id":"75c0f104-7dad-4962-9cea-763fccb67fee","topic":"第一类","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"75aa41a5-1bcf-4c87-b485-2f1fab55d44e","topic":"第一类虚拟机是运行在裸机上的OS，它的工作是支持真实硬件的多个虚拟机拷贝，类似于不同操作系统支持的进程。","expanded":true,"style":{"background":"#8EDE99"},"children":[{"id":"2aa363ef-5405-4da2-9141-675bb0ba5c84","topic":"例如Xen、Hyper-V、vSphere","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-337efa2656c600.png","width":386,"height":252}}]},{"id":"d23a4850-0d99-4858-a3af-52bc01488d8d","topic":"虚拟内核态","expanded":true,"children":[{"id":"8dc69d3a-ebbb-454a-ae93-c2d0ad3a2192","topic":"OS认为自己运行在内核态，但其实不是内核态","expanded":true,"style":{"background":"#FF9595"}},{"id":"01f1e521-495f-491d-b289-050710a2a31c","topic":"OS上的用户进程认为自己执行在用户态，事实也如此","expanded":true,"style":{"background":"#FF9595"}}]}]},{"id":"cddc2dc6-2ef1-484a-971b-3ae72268bb25","topic":"第二类","expanded":true,"style":{"background":"#FDD834"},"children":[{"id":"cbc1e265-9ab4-4f59-b4ff-06d3fec24cb9","topic":"第二类虚拟机是运行在宿主操作系统上的，进程调度、资源分配等是依赖于其他OS的","expanded":true,"children":[{"id":"d1dc3a08-bf5e-4ef4-a121-d3eacaed4a1b","topic":"例如VMware","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-f0e077f9167291.png","width":372,"height":360}}]}]}]},{"id":"282a1a55edf9db3e208ecacfbe","topic":"做题遇到的概念","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-54c6bb48937d38.svg","width":109.06,"height":109.06},"children":[{"id":"821b2f489cfbec03a21d29580b","topic":"硬件支持","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"14b9ff74c51ab1ed89dd791aa6","topic":"需要硬件支持","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"602bf064434bf845cff8ba5e48","topic":"地址映射","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"4bd8550f1129f17e45bd7bfa7c","topic":"地址映射需要重定位，需要访问存储单元","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"ee8b4dc0892882c3e2d3a91e39","topic":"时钟管理","expanded":true,"style":{"background":"#FFABD5"}},{"id":"4d2bf7a506f9fe0b94da8aa78f","topic":"中断系统","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"e5e918eededb7d52b3f4c8a0f5","topic":"不需要硬件支持","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"8028bd3604ab515675a6088b0b","topic":"进程调度","expanded":true,"style":{"background":"#FFABD5"}}]}]},{"id":"35294254e07a0b734e4e396d40","topic":"用户态和内核态","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"db294f4eae39de55e9e049ff27","topic":"执行程序or发生情况：","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"0df802536cb82e86cb472b6aac","topic":"用户态下","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"1278b89906d8c6f1c83f29806e","topic":"缺页","expanded":true,"style":{"background":"#FFABD5"}},{"id":"12e8e66033faab24e3b63a6b4c","topic":"系统调用","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"4b086df8b628a59a3c426ad1d9","topic":"访管指令","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"9fea9ce9-5f21-49c5-acae-51ea5e01ff82","topic":"广义指令的调用","expanded":true,"style":{"background":"#FFABD5"}},{"id":"8bebd73b32e95cedeeb669142e","topic":"外部中断","expanded":true,"style":{"background":"#FFABD5"}},{"id":"81ebae1052480553aa4789a449","topic":"命令解释程序","expanded":true,"style":{"background":"#FFABD5"}}]},{"id":"627bf486191abd57995a298712","topic":"内核态下","expanded":true,"style":{"background":"#FFABD5"},"children":[{"id":"baaae97ff829c3a303b0a9856b","topic":"进程切换","expanded":true,"style":{"background":"#FFABD5"}},{"id":"d0c96f6022c82164e00779fb50","topic":"缺页处理程序","expanded":true,"style":{"background":"#FFABD5"}},{"id":"485b0081e87abd1b95a64b3015","topic":"进程调度","expanded":true,"style":{"background":"#FFABD5"}},{"id":"7b3bdca5dd4bc121b212aaf3cb","topic":"时钟中断","expanded":true,"style":{"background":"#FFABD5"}},{"id":"25db977f6dba6c8fcdd46bb720","topic":"广义指令的执行","expanded":true,"style":{"background":"#FFABD5"}},{"id":"5348d7bf026ba762c771fbab85","topic":"输入输出","expanded":true,"style":{"background":"#FFABD5"}},{"id":"81681b18af292cead1a1696441","topic":"开关中断","expanded":true,"style":{"background":"#FFABD5"}}]}]}]}]},{"id":"42890592e27838ee2fb1e937f6","topic":"END","expanded":true,"image":{"src":"https://gastigado.cnies.org/d/BrushUP/mm-17250ac514b2bc.svg"}}]},"relations":[{"id":"c619b630ff6972d4a4930802e9","from":"20280b9c96a9474a2689d81dbc","to":"7c3ab845dcea04b19a32b96ad0","bidirectional":false,"label":"是由硬件完成的"}],"summaries":[{"id":"09863ea9-368e-4891-a5e9-5434a8a42d95","parentId":"7df861f92789c992d40a5be279","start":1,"end":1,"label":"单核CPU基本都是并发，多核CPU/多CPU基本都是并行+并发"},{"id":"7dea2f29-b9aa-44e6-9ed4-59e1c431983f","parentId":"4c3be52ff568ef977cbb8b710f","start":0,"end":1,"label":"两个最基本的特征"},{"id":"5bf85f6bddaa9ac20384685577","parentId":"bf89ec3435481989f6a278bd3c","start":5,"end":6,"label":"有点像CS模式和P2P模式"},{"id":"4c70efc4-1c18-4f14-9211-3e5b037385f2","parentId":"db4ae5c597fa53c4b987cb58db","start":1,"end":2,"label":"软件中断"},{"id":"d6dcdbbd-b168-40da-83fd-87b2cc027fad","parentId":"db4ae5c597fa53c4b987cb58db","start":3,"end":3,"label":"硬件中断"},{"id":"dfa9dd96-60bd-4048-a5d4-8369d863ed78","parentId":"ffab81d53b1a83523803fa817b","start":0,"end":1,"label":"结合计组"},{"id":"f5fc20ae-cf73-45b7-9045-aeeb2fbeb74a","parentId":"ee1bb868-f5ce-44ad-b5ec-de600ee01184","start":1,"end":1,"label":"OS服务越来越复杂，OS面临着”软件危机“"},{"id":"df402ed8-36c7-4b29-a20e-33b8643c97fa","parentId":"44426fb2-cd9b-4e46-bf16-5011602c3dc2","start":0,"end":0,"label":"解决办法之一：把用的频繁的服务器加到内核"},{"id":"fe9cc444-25d2-4ca6-acfa-f7b5a991f07f","parentId":"d23a4850-0d99-4858-a3af-52bc01488d8d","start":0,"end":0,"label":"故虚拟机是不允许执行敏感指令的"}],"boundaries":[{"id":"8daa20bd3cbad033942e298857","parentId":"638b72f3456805899832facfb9","start":0,"end":0,"label":"改进"},{"id":"bf8b7f1a87aba887cf6d39385c","parentId":"e58893821a4a64b2a7ef9afcb2","start":0,"end":0,"label":"改进"}]}