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 FreeBSDNetBSDOpenBSDLinuxMac OS XAndroid[1]and Solaris, typically bundled as a library libpthreadDR-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 typesfunctions 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:

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的更多相关文章

  1. Linux posix线程库总结

    由于历史原因,2.5.x以前的linux对pthreads没有提供内核级的支持,所以在linux上的pthreads实现只能采用n:1的方式,也称为库实现. 线程的实现,经历了如下发展阶段: Linu ...

  2. POSIX 线程详解 一种支持内存共享的简捷工具

    线程是有趣的 了解如何正确运用线程是每一个优秀程序员必备的素质.线程类似于进程.如同进程,线程由内核按时间分片进行管理.在单处理器系统中,内核使用时间分片来模拟线程的并发执行,这种方式和进程的相同.而 ...

  3. VxWorks 6.9 内核编程指导之读书笔记 -- POSIX

    POSIX能力 VxWorks扩展了POSIX,为了移植,VxWorks提供了额外的POSIX接口作为可选组件.VxWorks实现了POSIX 1003.1(POSIX .1)一些传统接口以及POSI ...

  4. posix 线程(一):线程模型、pthread 系列函数 和 简单多线程服务器端程序

    posix 线程(一):线程模型.pthread 系列函数 和 简单多线程服务器端程序 一.线程有3种模型,分别是N:1用户线程模型,1:1核心线程模型和N:M混合线程模型,posix thread属 ...

  5. OS之进程管理---多线程模型和线程库(POSIX PTread)

    多线程简介 线程是CPU使用的基本单元,包括线程ID,程序计数器.寄存器组.各自的堆栈等,在相同线程组中,所有线程共享进程代码段,数据段和其他系统资源. 传统的的单线程模式是每一个进程只能单个控制线程 ...

  6. Pthread:POSIX 多线程程序设计【转】

    转自:http://www.cnblogs.com/mywolrd/archive/2009/02/05/1930707.html#phtread_ref POSIX 多线程程序设计  Blaise ...

  7. Windows下POSIX线程编程(pThread)环境搭建

    系统: Windows 编辑器:codeblocks13.12 1. 简介: Windows有一个叫 POSIX Threads for Win32 的开源项目给出了一个功能比较完善的Windows下 ...

  8. [posix]Posix多线程编程

    就不排版了,可以到原作者博客下看 转自:http://www.cnblogs.com/zhangsf/archive/2013/09/09/3309867.html 目录表  摘要 译者序 Pthre ...

  9. POSIX是什么?

    1.什么是POSIX? POSIX是可移植操作系统接口(Portable Operating System Interface for UNIX)的缩写,是IEEE为了在各种UNIX操作系统上运行软件 ...

随机推荐

  1. 什么是J2EE的集群?

    1. 前言         现在有越来越多的关键应用和大型应用是基于J2EE 来创建的,像银行系统和帐单系统这些关键应用要求有很高的可用性,而Google 和Yahoo 这样的大型应用就需要很好的可扩 ...

  2. List或者Map等对象创建语句放在循环外和循环内的区别

    每一个对象创建的时候都会有一个ID,List对象在执行add方法的时候是将对象的引用放入List中. 如果把创建Map对象的语句放在外面,在将对象add到List中时,前后向List中add的对象都是 ...

  3. JavaScript对原始数据类型的拆装箱操作

    JS中的基本类型: boolean null undefined string number symbol 每当读取一个基本类型的时候,会隐式的自动进行装箱操作(即:将一个基本类型变成对象): var ...

  4. 洛谷P1200 [USACO1.1]你的飞碟在这儿Your Ride Is He…

    题目描述 众所周知,在每一个彗星后都有一只UFO.这些UFO时常来收集地球上的忠诚支持者.不幸的是,他们的飞碟每次出行都只能带上一组支持者.因此,他们要用一种聪明的方案让这些小组提前知道谁会被彗星带走 ...

  5. [luogu2272 ZJOI2007] 最大半连通子图 (tarjan缩点 拓扑排序 dp)

    传送门 题目描述 一个有向图G=(V,E)称为半连通的(Semi-Connected),如果满足:?u,v∈V,满足u→v或v→u,即对于图中任意两点u,v,存在一条u到v的有向路径或者从v到u的有向 ...

  6. YII实现dropDownList 联动事件

    因功能需求,需要用到联动,特此记录分享 一.视图中 <div class="main-form"> <?php $form = ActiveForm::begin ...

  7. 在android平台打印C语言日志

    在android平台打印C语言日志 1.操作平台:AS2.0 2.步骤如下: 在C代码中添加如下代码: #define LOG_TAG "我的C语言日志:" #define LOG ...

  8. hibernate框架总结

    实体类编写规则1 实体类里面属性私有的 2 私有属性使用公开的set和get方法操作 3 要求实体类有属性作为唯一值(一般使用id值) 4 实体类属性建议不使用基本数据类型,使用基本数据类型对应的包装 ...

  9. 模拟ArrayList底层实现

    package chengbaoDemo; import java.util.ArrayList; import java.util.Arrays; import comman.Human; /** ...

  10. nyoj 42判断欧拉路径模板题

    #include<stdio.h> #include<string.h> #define N 2100 int degree[N]; int pre[N];//很长时间没写欧拉 ...