随笔分类 -  Linux编程

Classic IPC Problems 经典的进程间通信问题
摘要:The Producer-Consumer Problem Presenter Notes: 生产者消费者问题(英语:Producer-consumer problem),也称有限缓冲问题(英语:Bounded-buffer problem),是一个多线程同步问题的经典案例。该问题描述了两个共享固定 阅读全文

posted @ 2018-11-11 16:04 solvit 阅读(432) 评论(0) 推荐(0)

Linux编程 多进程,多线程求解PI(圆周率)
摘要:题目: 链接 多进程: #include <unistd.h> #include <stdio.h> #include <stdlib.h> #define n 100000000.0 int main() { int fd[2]; // 创建二个 fd, fd[0] 管道用于读, fd[1] 管道 阅读全文

posted @ 2018-11-02 10:18 solvit 阅读(1775) 评论(0) 推荐(0)

实现自己的shell--MIT xv6 shell
摘要:参考代码: #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <fcntl.h> #include <string.h> #include <assert.h> #include <sys/types.h> #in 阅读全文

posted @ 2018-10-20 10:14 solvit 阅读(899) 评论(0) 推荐(0)

Linux fork()函数
摘要:参考 阅读全文

posted @ 2018-10-19 09:28 solvit 阅读(98) 评论(0) 推荐(0)

导航