POSIX Threads
POSIX Threads, usually referred to as pthreads, is an execution model that exists independently from a language, as well as a parallel execution model. It allows a program to control multiple different flows of work that overlap in time. Each flow of work is referred to as a thread, and creation and control over these flows is achieved by making calls to the POSIX Threads API. POSIX Threads is an API defined by the standard POSIX.1c, Threads extensions (IEEE Std 1003.1c-1995).
Implementations of the API are available on many Unix-like POSIX-conformant operating systems such as FreeBSD, NetBSD, OpenBSD, Linux, Mac OS X, Android[1]and Solaris, typically bundled as a library libpthread. DR-DOS and Microsoft Windows implementations also exist: within the SFU/SUA subsystem which provides a native implementation of a number of POSIX APIs, and also within third-party packages such as pthreads-w32,[2] which implements pthreads on top of existing Windows API.
pthreads defines a set of C programming language types, functions and constants. It is implemented with a pthread.h header and a thread library.
There are around 100 threads procedures, all prefixed pthread_ and they can be categorized into four groups:
- Thread management - creating, joining threads etc.
- Mutexes
- Condition variables
- Synchronization between threads using read/write locks and barriers
The POSIX semaphore API works with POSIX threads but is not part of threads standard, having been defined in the POSIX.1b, Real-time extensions (IEEE Std 1003.1b-1993) standard. Consequently, the semaphore procedures are prefixed by sem_ instead of pthread_.
https://en.wikipedia.org/wiki/POSIX_Threads
POSIX Threads的更多相关文章
- Linux posix线程库总结
由于历史原因,2.5.x以前的linux对pthreads没有提供内核级的支持,所以在linux上的pthreads实现只能采用n:1的方式,也称为库实现. 线程的实现,经历了如下发展阶段: Linu ...
- POSIX 线程详解 一种支持内存共享的简捷工具
线程是有趣的 了解如何正确运用线程是每一个优秀程序员必备的素质.线程类似于进程.如同进程,线程由内核按时间分片进行管理.在单处理器系统中,内核使用时间分片来模拟线程的并发执行,这种方式和进程的相同.而 ...
- VxWorks 6.9 内核编程指导之读书笔记 -- POSIX
POSIX能力 VxWorks扩展了POSIX,为了移植,VxWorks提供了额外的POSIX接口作为可选组件.VxWorks实现了POSIX 1003.1(POSIX .1)一些传统接口以及POSI ...
- posix 线程(一):线程模型、pthread 系列函数 和 简单多线程服务器端程序
posix 线程(一):线程模型.pthread 系列函数 和 简单多线程服务器端程序 一.线程有3种模型,分别是N:1用户线程模型,1:1核心线程模型和N:M混合线程模型,posix thread属 ...
- OS之进程管理---多线程模型和线程库(POSIX PTread)
多线程简介 线程是CPU使用的基本单元,包括线程ID,程序计数器.寄存器组.各自的堆栈等,在相同线程组中,所有线程共享进程代码段,数据段和其他系统资源. 传统的的单线程模式是每一个进程只能单个控制线程 ...
- Pthread:POSIX 多线程程序设计【转】
转自:http://www.cnblogs.com/mywolrd/archive/2009/02/05/1930707.html#phtread_ref POSIX 多线程程序设计 Blaise ...
- Windows下POSIX线程编程(pThread)环境搭建
系统: Windows 编辑器:codeblocks13.12 1. 简介: Windows有一个叫 POSIX Threads for Win32 的开源项目给出了一个功能比较完善的Windows下 ...
- [posix]Posix多线程编程
就不排版了,可以到原作者博客下看 转自:http://www.cnblogs.com/zhangsf/archive/2013/09/09/3309867.html 目录表 摘要 译者序 Pthre ...
- POSIX是什么?
1.什么是POSIX? POSIX是可移植操作系统接口(Portable Operating System Interface for UNIX)的缩写,是IEEE为了在各种UNIX操作系统上运行软件 ...
随机推荐
- JavaScript 创建对象之单例、工厂、构造函数模式
01单例模式 首先看一个问题,我们要在程序中描述两个人,这两个人都有姓名和年龄,可能刚刚开始学习js的时候会写成这样: var name1 = 'iceman'; var age1 = 25; var ...
- 使用kubeadm在CentOS上搭建Kubernetes1.14.3集群
练习环境说明:参考1 参考2 主机名称 IP地址 部署软件 备注 M-kube12 192.168.10.12 master+etcd+docker+keepalived+haproxy master ...
- mysql数据库增量恢复
mysqldump -uroot -p -B discuzx -F -x --master-data=2 --events|gzip >/root/discuzx.sql.gz 写入数据 删除数 ...
- 跳一跳的Python环境搭建
微信最新的小程序里面出了个叫“跳一跳”的小游戏,一经推出立马刷爆了朋友圈,而一些大神们也通过Python实现了自动玩游戏具体代码见(Github地址:https://github.com/wangsh ...
- Appium遇到问题:
问题一:问题org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possibl ...
- OGG For Bigdata To Kafka同步问题处理
一.问题报错 -- :: ERROR OGG- Java or JNI exception: oracle.goldengate.util.GGException: Error detected ha ...
- asp.net-EF事物与存储过程
FK_Equipment_EquipmentClass 这个是sql中的命名规范,外键名称在前面,主键名称在后面 EF事务的代码 DbTransaction tran = null; try { ne ...
- C# 知识点集合
1.一个Visual studio软件进程只能打开一个程序集,但是一个程序集可以加载多个项目,通过程序集的添加功能可以实现. 2.F11单步调试,F10跨程序调试(一般用不到) 3.VS如何快速的切换 ...
- CF914A Perfect Squares
CF914A Perfect Squares 题意翻译 给定一组有n个整数的数组a1,a2,…,an.找出这组数中的最大非完全平方数. 完全平方数是指有这样的一个数x,存在整数y,使得x=y^2y2 ...
- [ASP.NET]asp.net动态加载用户控件
用户控件 // 用户控件源码 namespace wzjr.control { public partial class Topic : System.Web.UI.UserControl { pub ...