=================================线程培训===============================
线程故事
cocurrent process、pthread、POISX
线程设计模式
boss\work
Peer
Pipe Line
what time need thread?
It is independent of other tasks
It can become blocked in potentially long waits
It can use a lot of CPU cycles
It must respond to asynchronous events
Its work has greater or lesser importance than other work in the application
确认并行比串行快,I/O requests
场景分析:我(CPU)打算使用辣椒、藕片、土豆(输入)做个两个菜:抄藕片、香辣土豆丝(输出)
Buffering Data Between Threads
A buffer
A lock
A suspend/resume mechanism
State information
rule:
Obtain a lock before accessing the resource
Release the lock when you are finished with the resource
线程同步
pthread_join function
Mutex variable functions
Condition variable functions
pthread_once function
Reader/writer exclusion
Threadsafe data structures
Semaphores
线程管理
Thread attributes
The pthread_once mechanism
Scheduling
Mutex scheduling attributes
线程调度
总结
IO、CPU、MEM
atomic、voliate、sleep(0)
多进程
SMB
相关推荐
由浅入深Linux下pthread线程库介绍[归类].pdf
详细介绍了Linux下pthread线程库,并对线程创建与结束、线程的绑定、线程的状态、线程的优先级、线程的撤消、线程数据、互斥锁、条件变量、信号量、异步信号等都有详细的说明,并附有例子,帮助读者由浅入深的了解...
多线程编程指南,SUN的Pthread线程库手册,中文版的。
自己制作的资料,pthread 多线程程序设计 中文版
Pthread C语言开发线程包,移植到windows版,习惯linux多线程编程的同学可以考虑使用~
posix线程库,值得学习。特别是锁的技巧。posix线程库,值得学习。特别是锁的技巧。
用C++封装好的线程,有使用例子,LINUX下通过测试可直接运行多线程
并行计算pthread多线程求pi的三种方法,编译后在命令行后输入线程数以及计算规模n运行
可在win32下实现linux中的pthread,操作系统实验用
一个示例程序,演示在linux环境下如何使用pthread实现多线程的使用和控制。
第二章 实验四POSIX 线程(Pthread)POSIX 线程,简称 Pthreads,是线程的 POSIX(Portable Operating Syste
linux pthread,栈空间分配,及怎样查看其空间大小
pthread多线程编程,进行了封装,方便使用。
C++pthread线程应用
java、win32、pthread三种线程库均有 适合用来学习多线程操作的入门例程
pthread多线程求pi,linux多线程pthread,C,C++源码
用Pthread创建一个线程的简单Demo
pthread多线程求pi,linux多线程pthread,C,C++源码.rar