Linux 中线程和进程切换的开销: Linux 操作系统层面的进程和线程的实现都是task_struct描述符. task_struct 包含成员变量:内核态stack. 这些都存在3-4G虚拟地址空间的内核态空间中.内核栈用于保存各个寄存器值:CS,DS,SS等. os层面的线程进程切换,都是在kernel mode下操作的.每个process都有自己unique的内核栈(因为每个process对应一个task_struct,kernel stack is member of the s…
[转载] Windows Subsystem for Linux -- Pico Process Overview Overview This post discusses pico processes, the foundation of WSL. It explains how pico processes work in Windows and goes into the history of how they came to be, the abstractions we decide…
明明用rpm查看包存在,但删除的时候进程就停住了.后来出现以下错误:rpmdb: Thread/process 10646/3086534416 failed: Thread died in Berkeley DB library 此时需要清理以下rpm的临时文件 # rm -fr /var/lib/rpm/__db.*…
Page Table Entry The access control information is held in the PTE and is CPU specific; figure bit fields have the following meanings: V Valid, if set this PTE is valid, 页表是否可用 FOE ``Fault on Execute'', Whenever an access of this type occurs, t…
Kernel Page Global Directory (PGD) of User process created 在早期版本: 在fork一个进程的时候,必须建立进程自己的内核页目录项(内核页目录项要与用户空间的页目录放在同一个物理地址连续的页面上,所以不能共享,但所有进程的内核页表与进程0共享)3G用户,页目录中一项映射4M的空间(一项页目录1024项页表,每项页表对应1个页面4K),即:#define PGDIR_SHIFT 22#define PGDIR_SIZE (1UL << P…