2011年6月16日

摘要: The Virtual Filesystem The Unix concept of the file is in stark contrast to record-oriented filesystems, such as OpenVMS’s Files-11. Record-oriented filesystems provide a richer, more structured representation of files than Unix’s simple byte-stream abstraction, at the cost of simplicity and flexib. 阅读全文

posted @ 2011-06-16 17:22 Teddy Yan 阅读(129) 评论(0) 推荐(0) 编辑

摘要: An Introduction to Kernel Synchronization A common use of the atomic integer operations is to implement counters. Protecting a sole counter with a complex locking scheme is overkill, so instead developers use atomic_inc() and atomic_dec(), which are much lighter in weight. The fact that a contende.. 阅读全文

posted @ 2011-06-16 17:21 Teddy Yan 阅读(133) 评论(0) 推荐(0) 编辑

摘要: Timers and Time Management The frequency of the system timer (the tick rate) is programmed on system boot based on a static preprocessor define, HZ The kernel defines the value in . The final agreement is that, at least on modern systems, HZ=1000 does not create unacceptable overhead and the move... 阅读全文

posted @ 2011-06-16 17:21 Teddy Yan 阅读(147) 评论(0) 推荐(0) 编辑


2011年4月12日

摘要: Kernel Data Structures The linked-list code is declared in the header file and the data structure is simple: Usage is slightly different in kernel versions prior to 2.6.33—doublecheck before writing code rbtrees The Linux implementation of red-black trees is called rbtrees.They are defined in l... 阅读全文

posted @ 2011-04-12 16:37 Teddy Yan 阅读(135) 评论(0) 推荐(0) 编辑

摘要: Bottom Halves and Deferring Work Bottom Halves The job of bottom halves is to perform any interrupt-related work not performed by the interrupt handler. In an ideal world, this is nearly all the work because you want the interrupt handler to perform as little work (and in turn be as fast) ... 阅读全文

posted @ 2011-04-12 16:37 Teddy Yan 阅读(158) 评论(0) 推荐(0) 编辑

摘要: asm/thread_info.h linux/threads.h /proc/sys/kernel/pid_max linux/sched.h kernel/fork.c linux/kthread.h struct task_struct *kthread_create Process Priority Process Priority Timeslice The Scheduling Policy in Action Specifically, CFS determines that the text editor has run for... 阅读全文

posted @ 2011-04-12 16:36 Teddy Yan 阅读(209) 评论(0) 推荐(0) 编辑

摘要: Syscalls: SYSCALL_DEFINE0(getpid) { return task_tgid_vnr(current); // returns current->tgid } SYSCALL_DEFINE0 is simply a macro that defines a system call with no parameters (hence the 0).The expanded code looks like this: asmlinkage long sys_getpid(void) System Call Numbers The ke... 阅读全文

posted @ 2011-04-12 16:36 Teddy Yan 阅读(155) 评论(0) 推荐(0) 编辑

摘要: FFDShow tryout 把ffmpeg和DirectX 结合起来并封装在几个类里面。类图见我的google doc 代码路径分析: //------------------Construct FFshow decoder-------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------... 阅读全文

posted @ 2011-04-12 16:35 Teddy Yan 阅读(638) 评论(0) 推荐(0) 编辑


2010年12月22日

摘要: 发现一个新的ffdshow-tryout 项目,这个东西不错。集成了ffmpeg,h264等开源项目,又是跨平台的。而且还在不断的更行,我很喜欢这个项目。值得仔细品味研究一下。可以用mingw 和vs2010编译。就像它的wiki上developer 描述的那样就可以。非常简单。用vs2010加graphEdit联合可以进行调试。 grpahEdit is part of window sdk 7.0 /binffdshow.ax有个配置界面,通过它可以选择该fliter可以解码哪些格式的音视频。还可以打开调试用winDbg可以收集到调试信息,或者直接用vs2010查看调试。加载的入口:Tff 阅读全文

posted @ 2010-12-22 17:20 Teddy Yan 阅读(1524) 评论(1) 推荐(0) 编辑


2010年12月16日

摘要: 其实题目很简单,就是计算一个整数数组中,连续的最大子数组。一开始想到肯定是个O(n*n)的算法:maxSectionGood后来使用递归O(n*log(n)):maxSectionExcellent最经典的是最后一个算法,提升到了O(n):maxSectionPrefectGoogle 笔试题:input: an array of int which represent a binary number the bit is 1output: the count of 1 triple of the numberinput: an array of intoutput: the max sum 阅读全文

posted @ 2010-12-16 10:36 Teddy Yan 阅读(231) 评论(0) 推荐(0) 编辑


Copyright © 2024 Teddy Yan
Powered by .NET 9.0 on Kubernetes