登录
首页 » Linux-Unix program » 在同一个进程地址空间内执行的两个线程。生产者线程生产物品,然后将物品放置在一个空缓冲区中供消费者线程消费。消费者线程从缓冲区中获得物品,然后释放缓冲区。当生产者...

在同一个进程地址空间内执行的两个线程。生产者线程生产物品,然后将物品放置在一个空缓冲区中供消费者线程消费。消费者线程从缓冲区中获得物品,然后释放缓冲区。当生产者...

于 2022-03-10 发布 文件大小:622.00 B
0 204
下载积分: 2 下载次数: 1

代码说明:

在同一个进程地址空间内执行的两个线程。生产者线程生产物品,然后将物品放置在一个空缓冲区中供消费者线程消费。消费者线程从缓冲区中获得物品,然后释放缓冲区。当生产者线程生产物品时,如果没有空缓冲区可用,那么生产者线程必须等待消费者线程释放出一个空缓冲区。当消费者线程消费物品时,如果没有满的缓冲区,那么消费者线程将被阻塞,直到新的物品被生产出来。-In the same address space of a process implemented within the two threads. The producer thread production of goods, and then items placed in an empty buffer in the thread consumption for consumers. Consumer thread to acquire items from the buffer, and then release the buffer. When the producer thread is the production of goods, if there is no empty buffers are available, then the producer thread must wait for the Consumer thread to release an empty buffer. When a consumer thread consumer goods, if the buffer is not full, then the consumer thread will be blocked until the new items were produced.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 改编自ATmega88单片机+ENC28J60程序,不做什么优化,看起来..
    程序改写来自atmega88+enc28J60,没有做什么优化,看起来 有点乱.供大家参考参考~ 可以通过网页访问192.168.1.1/123456 来控制LPC2103模块上的led-Procedures adapted from atmega88+ Enc28J60, what not to do optimization, looks a bit chaotic. For your information through the website to visit ~ 192.168.1.1/123456 to control the led module LPC2103
    2022-06-12 03:13:34下载
    积分:1
  • 典型的守护程序,可用于录制
    典型的守护程序,可用于录制-typical procedure can be used to record
    2022-03-20 11:41:12下载
    积分:1
  • CGI网站访问代码下载
    CGI网站访问代码下载-CGI code download website
    2023-03-30 16:45:04下载
    积分:1
  • Redhat Linux9安装的详细步骤及过程,可以作为入门的简单资料
    Redhat Linux9安装的详细步骤及过程,可以作为入门的简单资料-Redhat Linux9 detailed installation steps and the process can be used as a simple data entry
    2022-01-25 22:59:15下载
    积分:1
  • 这是华蓝佳声科技公司操表机 打印程序源码
    这是华蓝佳声科技公司操表机 打印程序源码-This is the best blue acoustic technology companies parade Table printing procedures FOSS
    2022-08-15 03:15:45下载
    积分:1
  • VMware QEMU模拟器QEMU的性能几乎是AB率模拟
    性能几乎VMWareQEMU仿真器Qemu的模拟率约为25台机器的60倍左右。Plex86,用户模式Linux,VMware和虚拟PC比QEMU快一点,但是Bochs需要特定的内核补丁用户模式Linux对于来宾系统必须是Linux VMware和虚拟PC你需要安装一个特定的来宾系统的驱动程序,它们是为操作系统仿真而进行的,也不能说是一个完整的模拟器。因此,QEMU仍然是非常好的x86仿真器。
    2022-07-17 10:35:18下载
    积分:1
  • 创建一个符合iso
    创建一个符合iso-9660标准的iso文件系统,应用于Linux/UNIX平台。-Create an iso-9660 standard iso file system, used in Linux/UNIX platforms.
    2023-03-28 10:10:03下载
    积分:1
  • LINUX下的C语言函数库大全
    LINUX下的C语言函数库大全-LINUX C language library Daquan
    2023-02-03 17:45:04下载
    积分:1
  • solaris10
    solaris10安装指南-自定义jumpstart和高级安装-solaris10
    2022-02-06 17:51:15下载
    积分:1
  • check password
    check password
    2022-04-13 16:59:53下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载