欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

线程培训大纲

更新时间: 2014-05-14 23:44:16 责任编辑: Author_N3

 

线程培训提纲

=================================线程培训===============================

线程故事

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

上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-05-14 23:44:16
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/318444/
本文WWW.DOC100.NET DOC100.NET版权所有。