OS – Neohope的网络笔记 https://www.neohope.com Learn and share. Thu, 26 Sep 2024 10:03:18 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.2 Linux5.9源码 https://www.neohope.com/2021/10/01/linux5-9%e6%ba%90%e7%a0%81/ https://www.neohope.com/2021/10/01/linux5-9%e6%ba%90%e7%a0%81/#respond Fri, 01 Oct 2021 09:29:26 +0000 http://www.neohope.com/?p=4055 https://www.neohope.com/2021/10/01/linux5-9%e6%ba%90%e7%a0%81/feed/ 0 Linux虚拟化管理 https://www.neohope.com/2021/08/21/linux%e8%99%9a%e6%8b%9f%e5%8c%96%e7%ae%a1%e7%90%86/ https://www.neohope.com/2021/08/21/linux%e8%99%9a%e6%8b%9f%e5%8c%96%e7%ae%a1%e7%90%86/#respond Sat, 21 Aug 2021 04:30:27 +0000 http://www.neohope.com/?p=3992 https://www.neohope.com/2021/08/21/linux%e8%99%9a%e6%8b%9f%e5%8c%96%e7%ae%a1%e7%90%86/feed/ 0 Linux系统调用03 https://www.neohope.com/2021/08/17/linux%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a803/ https://www.neohope.com/2021/08/17/linux%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a803/#respond Tue, 17 Aug 2021 12:18:42 +0000 http://www.neohope.com/?p=3981 https://www.neohope.com/2021/08/17/linux%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a803/feed/ 0 Linux系统调用02 https://www.neohope.com/2021/08/17/linux%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a802-2/ https://www.neohope.com/2021/08/17/linux%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a802-2/#respond Tue, 17 Aug 2021 12:16:32 +0000 http://www.neohope.com/?p=3987 https://www.neohope.com/2021/08/17/linux%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a802-2/feed/ 0 Linux系统调用01 https://www.neohope.com/2021/08/17/linux%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a801/ https://www.neohope.com/2021/08/17/linux%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a801/#respond Tue, 17 Aug 2021 12:12:05 +0000 http://www.neohope.com/?p=3985 https://www.neohope.com/2021/08/17/linux%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a801/feed/ 0 Linux内存管理 https://www.neohope.com/2021/08/15/linux%e5%86%85%e5%ad%98%e7%ae%a1%e7%90%86/ https://www.neohope.com/2021/08/15/linux%e5%86%85%e5%ad%98%e7%ae%a1%e7%90%86/#respond Sun, 15 Aug 2021 05:08:52 +0000 http://www.neohope.com/?p=3976 __rmqueue->__rmqueue_fallback】 3、申请内存时,一般先在CPU所属内存节点申请;如果失败,再去其他内存节点申请;具体顺序,和NUMA memory policy有关;]]> https://www.neohope.com/2021/08/15/linux%e5%86%85%e5%ad%98%e7%ae%a1%e7%90%86/feed/ 0 Linux进程管理 https://www.neohope.com/2021/08/15/linux%e8%bf%9b%e7%a8%8b%e7%ae%a1%e7%90%86/ https://www.neohope.com/2021/08/15/linux%e8%bf%9b%e7%a8%8b%e7%ae%a1%e7%90%86/#respond Sun, 15 Aug 2021 05:06:48 +0000 http://www.neohope.com/?p=3974 https://www.neohope.com/2021/08/15/linux%e8%bf%9b%e7%a8%8b%e7%ae%a1%e7%90%86/feed/ 0 Linux设备管理 https://www.neohope.com/2021/08/15/linux%e8%ae%be%e5%a4%87%e7%ae%a1%e7%90%86/ https://www.neohope.com/2021/08/15/linux%e8%ae%be%e5%a4%87%e7%ae%a1%e7%90%86/#respond Sun, 15 Aug 2021 05:04:54 +0000 http://www.neohope.com/?p=3972 Continue reading Linux设备管理]]> https://www.neohope.com/2021/08/15/linux%e8%ae%be%e5%a4%87%e7%ae%a1%e7%90%86/feed/ 0 Linux文件管理 https://www.neohope.com/2021/08/15/linux%e6%96%87%e4%bb%b6%e7%ae%a1%e7%90%86/ https://www.neohope.com/2021/08/15/linux%e6%96%87%e4%bb%b6%e7%ae%a1%e7%90%86/#respond Sun, 15 Aug 2021 05:01:17 +0000 http://www.neohope.com/?p=3970 fs_struct中,记录进程相关的文件系统信息,这样就可以对文件系统,进行新增、删除、打开、关闭等相关操作。 4、同时,在进程结构task_struct->files_struct->fdtable->file,保存全部打开的文件指针,文件指针file结构中,会保存inode指针,从而可以获取文件权限、文件访问记录、文件数据块号的信息,进一步可以从文件读取文件信息。 二、trfs demo 极客时间 操作系统实战45讲 trfs源码 1、除上面的结构外,内部使用了两个结构:文件描述fileinfo,目录描述dir_entry A、fileinfo记录在了inode的私有数据中,这样通过inode就可以方便的找到fileinfo B、如果是文件,fileinfo.data中记录的就是文件内容 C、如果是文件夹,fileinfo.data记录的就是一个个dir_entry 2、trfs基于非连续内存 A、由MAX_FILES+1个fileinfo组成,记录在全局变量finfo_arr中,但第0和第MAX_FILES个好像没有使用 B、每个fileinfo中包含一个文件块,大小为MAX_BLOCKSIZE C、并没有使用单独的位图,而是通过每个fileinfo来记录其使用情况的 3、初始化 4、使用 A、每次新建文件或文件夹,就占用一个空闲的fileinfo B、删除文件或文件夹,就将一个fileinfo设置为可用 C、读写文件就是通过file找到fileinfo.data D、查找和枚举就是通过file找到fileinfo.data,然后访问其中的每个dir_entry]]> https://www.neohope.com/2021/08/15/linux%e6%96%87%e4%bb%b6%e7%ae%a1%e7%90%86/feed/ 0 Linux四次挥手源码分析 https://www.neohope.com/2021/08/15/linux%e5%9b%9b%e6%ac%a1%e6%8c%a5%e6%89%8b%e6%ba%90%e7%a0%81%e5%88%86%e6%9e%90/ https://www.neohope.com/2021/08/15/linux%e5%9b%9b%e6%ac%a1%e6%8c%a5%e6%89%8b%e6%ba%90%e7%a0%81%e5%88%86%e6%9e%90/#respond Sun, 15 Aug 2021 04:56:51 +0000 http://www.neohope.com/?p=3967 https://www.neohope.com/2021/08/15/linux%e5%9b%9b%e6%ac%a1%e6%8c%a5%e6%89%8b%e6%ba%90%e7%a0%81%e5%88%86%e6%9e%90/feed/ 0