01 2013 档案
5289A 中断控制器
摘要:本来想翻译一篇国外的文章, 因为不得不说他比我会写多了, 但貌似高质量的文章背后是将一个问题尽量拖长, 像是写小说似的, 很多东西似乎和想要说的无关, 只是为了流畅易懂来的。 全部翻译下来, 太累了, 干脆摘抄部分关键段落, 剩下的自己写。 而且我也有我自己的理解, 英文全文链接在此:http://blog.chinaunix.net/uid-7190305-id-3014030.html。An interrupt source, fed into an 8259A, is known as an IRQ – Interrupt Request. An 8259A has 8IRQ inp..
阅读全文
伪中断
摘要:1. The interrupt flag (IF) of the 80x86 is reset eitherdirectly (e.g., by a "cli" instruction) or because aninterrupt handler is entered. In the latter case thecorresponding in-service (IS) bit of the 8259A is set(effectively blocking interrupts of lower priority).2. The 8259A receives an
阅读全文
linux page 管理分析(1)
摘要:681/* 682 * Get the lock to a page atomically. 683 */ 684struct page * __find_lock_page (struct address_space *mapping, 685 unsigned long offset, struct page **hash) 686{ 687 struct page *page; 688 689 /* 690 * We scan the hash list read-only. Ad...
阅读全文
linux do_mmap
摘要:do_mmap 函数自己本身并不真做 mmap, 它基本上只是检查参数, 准备必要的数据结构; 但这也不是没有可说的, 事实上, glibc 函数 mmap 的需要注意的点, 再这个函数里面还真有几个。先看 mmap 原型void* mmap(void* addr, sie_t length, int prot, int flags, int fd, offset_t offset)参数含义可以 man, 不多说, 单看几个prot | flags偏门组合:1. PROT_READ | MAP_SHARED这意思是, 我只读, 但别人的写得给我看到;那么这个和 PROT_READ | MAP_
阅读全文
linux mount 过程
摘要:struct inode 里面有 15 个成员最为重要, 分成4类:1. 链表类,i_hash 将 inode 链接入 inode hashtable, 外部可以通过 super_block 指针与 ino 来找到这个 inodei_dentry 为 inode 的 dentry 链表表头, 从而一个 inode 可以在文件树中有多个硬链接i_list 将 inode 链接入 inode_used 链表2. 属性类i_ino, inode numberi_mode, 文件 RWX 属性及文件类型, 比如是否是文件夹, 普通文件, 或者设备文件等i_dev, inode 所在设备的设备号, 从
阅读全文
浙公网安备 33010602011771号