上一页 1 2 3 4 5 6 7 ··· 21 下一页
摘要: 线程(thread): 现代操作系统引入进程概念,为了并发(行)任务 1.进程之间的这种切换代价很高 2.通信方式的代价也很大基本概念: 1.线程是比进程更小的资源单位,它是进程中的一个执行路线(分支)2.线程同进程内其它线程共享地址空间(代码段、数据段、堆...)3.线程也称为轻量级进程线程特点: 阅读全文
posted @ 2016-08-12 15:43 立刻行动 阅读(499) 评论(0) 推荐(0) 编辑
摘要: 回顾: 进程间通信方式: 信号,管道 消息队列,共享内存,信号量 sokcet 信号: 本质就是软中断 signal(信号,函数指针); void func(int); kill(pid,signo); raise(signo); alarm(seconds); pause(); kill -9 P 阅读全文
posted @ 2016-08-10 20:45 立刻行动 阅读(660) 评论(0) 推荐(0) 编辑
摘要: 回顾: 进程间通信方式: 信号,管道 消息队列,共享内存,信号量 sokcet 信号: 本质就是软中断 signal(信号,函数指针); void func(int); kill(pid,signo); raise(signo); alarm(seconds); pause(); kill -9 P 阅读全文
posted @ 2016-08-10 20:44 立刻行动 阅读(524) 评论(0) 推荐(0) 编辑
摘要: 回顾: 进程间通信方式: 信号,管道 消息队列,共享内存,信号量 sokcet 信号: 本质就是软中断 signal(信号,函数指针); void func(int); kill(pid,signo); raise(signo); alarm(seconds); pause(); kill -9 P 阅读全文
posted @ 2016-08-10 20:42 立刻行动 阅读(2908) 评论(0) 推荐(0) 编辑
摘要: 复习: 进程创建 fork(); 进程终止 exit(0)/return 0; 进程等待 wait()/waitpid(pid,NULL,0); 进程替换 exec函数族 1.system()函数 system - execute a shell command #include<stdlib.h> 阅读全文
posted @ 2016-08-10 20:38 立刻行动 阅读(187) 评论(0) 推荐(0) 编辑
摘要: ./a.out . #include<stdio.h>#include<stdlib.h>#include<unistd.h>#include<dirent.h>#include<string.h>#include<signal.h> void music_self(void);void mysig 阅读全文
posted @ 2016-08-09 21:01 立刻行动 阅读(399) 评论(0) 推荐(0) 编辑
摘要: ./a.out . 表示循环播放当前目录下的音乐 #include<stdio.h>#include<stdlib.h>#include<unistd.h>#include<dirent.h>#include<string.h> int main(int argc,char *argv[]){ DI 阅读全文
posted @ 2016-08-09 19:21 立刻行动 阅读(414) 评论(0) 推荐(0) 编辑
摘要: arm-linux-gcc test.c -ljpeg -I /usr/local/libjpeg-8a/include/ -L /usr/local/libjpeg-8a/lib/ 这样编译 代码 #include<stdio.h>#include<sys/types.h>#include<dir 阅读全文
posted @ 2016-08-09 17:34 立刻行动 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 1.文件数据内容,元数据内容 i节点ls -l err.txt-rw-rw-r-- 1 csgec csgec 50 Jun 23 11:19 err.txt-:普通文件(文件类型)rw-:属主用户拥有可读可写的权限1:表示硬链接数(链接有软链接和硬连接) ln csgec:用户名 组名50:文件大 阅读全文
posted @ 2016-08-09 17:24 立刻行动 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1.打开文件 int open(const char *pathname, int flags); int open(const char *pathname, int flags, mode_t mode); int creat(const char *pathname, mode_t mode) 阅读全文
posted @ 2016-08-09 17:22 立刻行动 阅读(381) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 21 下一页