12 2017 档案

摘要:进程拥有以下几种状态:就绪/运行状态、等待状态(可以被中断打断)、等待状态(不可以被中断打断)、停止状态和僵死状态. TASK_RUNNING: 正在运行或处于就绪状态:就绪状态是指进程申请到了CPU以外的其他所有资源,正所谓:万事俱备,只欠东风.提醒:一般的操作系统教科书将正在CPU上执 行的进程 阅读全文
posted @ 2017-12-29 22:57 mull 阅读(4878) 评论(0) 推荐(0)
摘要:017-12-6 16:27:35时钟中断TIMER_BH(bottom_half)实现分析1.3.1001. 时钟0号中断安装 setup_x86_irq(0, &irq0);@arch/i386/kernel/time.c |- set_intr_gate(0x20+irq,interrupt[ 阅读全文
posted @ 2017-12-28 16:15 mull 阅读(342) 评论(0) 推荐(0)
摘要:gdb 不同位置,函数调用参数显示差异,如: copy_strings (argc=1, argv=0xffcf08, page=0xffce6c, p=131068, from_kmem=2) at exec.c:230230 {(gdb) n235 if (!p)(gdb) n328 __asm 阅读全文
posted @ 2017-12-15 10:26 mull 阅读(999) 评论(0) 推荐(0)
摘要:1.3.100 find_first_zero_bit在使用gcc 4.2.4 编译时,需要保护%eax find_first_zero_bit 修订后: /* * Find-bit routines.. */extern __inline__ int find_first_zero_bit(voi 阅读全文
posted @ 2017-12-14 11:14 mull 阅读(590) 评论(0) 推荐(0)
摘要:http://tech.sina.com.cn/roll/2017-06-26/doc-ifyhmtrw4006354.shtml 腾讯OS死亡或注定,为何国内无自主ROM? 2017年06月26日 15:36 蓝鲸财经 文/蓝鲸TMT 杨博丞 2年零2个月后,腾讯还是宣布了Tencent OS的死 阅读全文
posted @ 2017-12-14 10:50 mull 阅读(315) 评论(0) 推荐(0)
摘要:a gcc 4.2.4 bug(被stos指令累加后%edi作为参数的)* * Ok, now we can initialize the rest of the tty devices and can count * on memory allocations, interrupts etc..  阅读全文
posted @ 2017-12-14 09:14 mull 阅读(310) 评论(1) 推荐(0)
摘要:2017-12-13 10:44:19gcc -02引起内存溢出'unsigned i'应修订为'volatile unsigned i'1.3.100 driver/char/random.cstatic inline void add_entropy_word(struct random_buc 阅读全文
posted @ 2017-12-13 10:50 mull 阅读(284) 评论(0) 推荐(0)
摘要:2017-12-12 18:53:04gcc优化引起get_free_page比__get_free_page返回值多4096内核版本:1.3.100extern inline unsigned long get_free_page(int priority){ unsigned long page 阅读全文
posted @ 2017-12-12 18:54 mull 阅读(263) 评论(0) 推荐(0)
摘要:gdb跟踪剖发现free_area_init中一段优化错了,如下: memset(mem_map, 0, start_mem - (unsigned long) mem_map); do { __asm__ __volatile__("":::"memory"); //gcc请不要优化 --p; p 阅读全文
posted @ 2017-12-12 16:19 mull 阅读(1035) 评论(0) 推荐(0)
摘要:int change_bit(int nr, void * addr){ int oldbit; //1.第nr位取反, 原nr位入CF //2. sbbl带借位减(把源操作数和标志位CF的值从目的操作数中一起减去) // 即oldbit保留了结果为nr位上原值:0 or -1 __asm__ __ 阅读全文
posted @ 2017-12-08 10:18 mull 阅读(549) 评论(0) 推荐(0)
摘要:/* * IBM messed up *AGAIN* in their thinkpad: 0xA0000 -> 0x9F000. * They seem to have done something stupid with the floppy * controller as well.. */ 阅读全文
posted @ 2017-12-07 09:56 mull 阅读(154) 评论(0) 推荐(0)
摘要:1.3.100static inline pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags){ long retval; __asm__ __volatile__( "movl %%esp,%%esi\n\t 阅读全文
posted @ 2017-12-07 09:26 mull 阅读(614) 评论(0) 推荐(0)
摘要:时钟中断TIMER_BH(bottom_half)实现分析1.3.1001. 时钟0号中断安装 setup_x86_irq(0, &irq0);@arch/i386/kernel/time.c |- set_intr_gate(0x20+irq,interrupt[irq]);//interrupt 阅读全文
posted @ 2017-12-06 16:50 mull 阅读(367) 评论(0) 推荐(0)
摘要:2017-12-6 10:26:504.9.51int __get_order(unsigned long size){ int order; size--; size >>= PAGE_SHIFT;#if BITS_PER_LONG == 32 order = fls(size);#else or 阅读全文
posted @ 2017-12-06 10:28 mull 阅读(1109) 评论(0) 推荐(0)
摘要:piggy.lnk 简析 SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }} 简析:SECTIONS { .data 阅读全文
posted @ 2017-12-01 12:37 mull 阅读(218) 评论(0) 推荐(0)