Chinaunix首页 | 论坛 | 博客
  • 博客访问: 478179
  • 博文数量: 133
  • 博客积分: 1235
  • 博客等级: 少尉
  • 技术积分: 1201
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-08 19:59
文章分类

全部博文(133)

文章存档

2023年(12)

2022年(3)

2018年(2)

2017年(4)

2016年(4)

2015年(42)

2014年(1)

2013年(12)

2012年(16)

2011年(36)

2010年(1)

发布时间:2015-04-29 15:51:40

Unix跟Windows等那些”对于开发者易于使用”的OS比起来,在信号和线程的利用方面有诸多的限制。但是即使不知道这些知识就做构架设计和实现的情况也随处可见。这个就是那些经常不能再现的bug的温床吧。因此,我想分成几回来写一些准则来防止陷入到这些圈套里。准则1:不依赖于信号收发的设计·给其他进程以及.........【阅读全文】

阅读(1860) | 评论(0) | 转发(0)

发布时间:2015-04-29 15:36:33

Problem 1 : Is it a loop ? (判断链表是否有环?)Assume that wehave a head pointer to a link-list. Also assumethat we know the list is single-linked. Can you come up an algorithm to checkwhether this link list includes a loop by using O(n) time and O(1) space wheren is the length of the l.........【阅读全文】

阅读(994) | 评论(0) | 转发(0)

发布时间:2015-04-29 15:22:16

Tool GDBExamining Memory (data or in machine instructions)You can use the command x (for “examine”) to examine memory in any of several formats, independently of your program's data types.x/nfu addrx addrxn, the repeat countThe repeat count is a decimal integer; the d.........【阅读全文】

阅读(6347) | 评论(0) | 转发(0)

发布时间:2015-04-29 15:11:12

http://www.cnblogs.com/zhenjing/archive/2011/07/04/filelock.html缘起因项目需要,自行设计一套通用的文件读写锁,要求该机制能用于本地文件系统和NFS文件系统。内核的文件数据结构内核中有3个数据结构和文件直接相关,分别是:file descriptor table, file table and i-node table。其中file descriptor.........【阅读全文】

阅读(1102) | 评论(0) | 转发(0)

发布时间:2015-04-29 15:08:27

http://www.cnblogs.com/zhenjing/archive/2011/07/15/process_mutex_race.html缘起在linux编程中,经常有这样的要求:特定进程(尤其是daemon进程)有且只有一个,即特定资源只能由一进程拥有。问题是:如何保证特定进程间的“互斥”关系(只有一个实例)?当检测到“互斥(锁定)”时,其余进程可直接退出,而无需同步.........【阅读全文】

阅读(871) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册