共 38 篇文章 |
|
ELF文件的加载过程(load./** * load_elf_phdrs() - load ELF program headers * @elf_ex: ELF header of the binary whose program headers should be loaded * @elf_file: the opened ELF binary file * * Loads ELF program headers from the binary file elf_file, which has the ELF * header pointed to by elf_ex, into a newly allocate... 阅307 转0 评0 公众公开 17-11-24 18:58 |
$ gcc -o c_rc -static c_rc.o$ c_rc;int __libc_start_main( /* Pointer to the program''''''''s main function */ (int (*main) (int, char**, char**), /* argc and argv */ int argc, char **argv, /* Pointers to initialization and finalization functions */ __typeof (main) init, void (*fini) (vo... 阅50 转0 评0 公众公开 17-11-24 13:14 |
测试结果是~3000ns/context switch. 按照之前67ns/syscall来看,系统调用时间是相对较少的,所以可以认为整个结果就是context switch时间,所以一个context swtich占用6000cycle。所以第三次作者测试设置了cpu affinity. 测试结果是 ~1600ns/process context switch, ~1300ns/thread context siwtch,也就是说3200cycle/process context switc... 阅87 转0 评0 公众公开 15-04-19 11:38 |
如何编写一个可靠的linux守护进程 linux服务端程序都需要提供7 * 24不间断的服务,如何保证工作进程一直不退出或者不被kill掉,常见的方法就是启动一个守护进程来检测工作进程的状态,如果发现工作进程退出,就再fork一个出来。而守护进程只有在工作进程正常退出的情况下才完成自己的使命,否则(工作进程被其他信号结束掉,如SIGABRT, SIGKI... 阅7 转自SamBooksh... 公众公开 14-11-17 09:18 |
handler = (unsigned long) signals->action[sig-1].sa.sa_handler;你能试着注释掉下面的两个signal()函数, 用这个,试着回答下面的两个问题 struct sigaction sa,old_sa; sigaction(SIGCHLD,&sa,&old_sa); sa = old_sa; sa.sa_flags |= SA_NOCLDSTOP; //当子进程结束的时候,阻止子进程向其父进程发SIGCH... 阅3 转自kiadjb 公众公开 14-10-22 11:36 |
The TTY demystifiedThe TTY demystified.Together, a particular triplet of UART driver, line discipline instance andTTY driver may be referred to as a TTY device, or sometimes just TTY. Auser process can affect the behaviour of any TTY device by manipulating thecorresponding device file under /dev.Configuring the TTY de... 阅103 转0 评0 公众公开 14-10-03 15:02 |
该kernel的执行起点是stext函数,定义于arch/arm/kernel/head.S。*/ b __arm920_setup .long cpu_arch_name .long cpu_elf_name .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB .long cpu_arm920_name .long arm920_processor_functions .long v4wbi_tlb_fns .long v4wb_user_fns#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH .long arm920_cache_fns#... 阅1 转自guitarhua 公众公开 14-09-27 17:31 |
正常情况下,x86架构上的int n指 令会将其下条指令的cs:ip压入堆栈,所以当通过iret指令返回时,原来的代码将从int n的下条指令继续执行,不过如果我们能在后续的C代码中改变regs->cs与regs->ip(也就是int n执行时压入栈中的cs与ip),那么就可以控制下一步代码执行的走向,而 sys_execve函数的调用链正好利用了这一点,接下来我们很快就... 阅37 转0 评0 公众公开 13-09-16 21:21 |
异步异常(中断)handler不是没有上下文, 而是没有固定的上下文, 如果使用被抢占的任务作为上下文, 一,自身的处理无法得到实时保障,导致系统不确定性, 二,任务受到影响.不好意思,我看贴也不仔细,把lz“总结: 异步异常(中断)handler不是没有上下文, 而是没有固定的上下文, 如果使用被抢占的任务作为上下文, 一,自身的处理无法得到实时保障,... 阅2259 转0 评0 公众公开 13-09-11 15:47 |
Linux 内核学习(1)持续更新中......1.注:本专栏参考资料《Linux内核0.11(0.95)完全注释》 阅23 转0 评0 公众公开 13-09-07 09:25 |