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

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

于 2022-03-10 发布 文件大小:622.00 B
0 180
下载积分: 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 个回复

  • 周立功
    ZLG-GUI源代码完整版12-GUI_StockC.c-ZLG-GUI source code full version of 12-GUI_StockC.c
    2022-01-31 20:10:06下载
    积分:1
  • linux环境下arm2410的 dma驱动程序
    在linux环境下arm2410的 dma驱动程序 -In linux environment arm2410 the dma driver
    2023-08-23 08:10:03下载
    积分:1
  • SnackAmp is a powerful multi
    SnackAmp is a powerful multi-platform audio music (mp3, ogg ,wav, streams ...) player and organizer for large music collections. Manage your entire collection, including ID3 tagging and auto-playlisting. Integrated web server for remote control/streaming
    2023-08-11 16:45:09下载
    积分:1
  • 认证
    certi-SHM-3.0.tar 不错的开源的分布式方针软件 大家多多支持 他是linux-certi- SHM- 3.0.tar good open-source software distributed approach we will support him linux
    2022-03-10 08:17:10下载
    积分:1
  • //颜色初始化 if(!has_colors() || start_color() == ERR){ endwin() print...
    //颜色初始化 if(!has_colors() || start_color() == ERR){ endwin() printf("Terminal does not support color. ") exit(1) } init_pair(1, COLOR_GREEN, COLOR_BLACK) init_pair(2, COLOR_RED, COLOR_BLACK) init_pair(3, COLOR_CYAN, COLOR_BLACK) init_pair(4, COLOR_WHITE, COLOR_BLACK) init_pair(5, COLOR_MAGENTA, COLOR_BLACK) init_pair(6, COLOR_BLUE, COLOR_BLACK) init_pair(7, COLOR_YELLOW, COLOR_BLACK) //写字符串 for(i = 1 i
    2023-04-17 02:35:03下载
    积分:1
  • 2022-03-11 20:37:01下载
    积分:1
  • Davinci 6446 nand flash烧写程序
    Davinci 6446 nand flash烧写程序-Davinci 6446 nand flash Shaoxie program
    2022-02-25 09:33:16下载
    积分:1
  • AT&T汇编语言的I386依赖特征的特别说明,LINUX开发的必备资料
    AT&T汇编语言的I386依赖特征的特别说明,LINUX开发的必备资料-ATT assembler language of I386 on the special features of note, LINUX development of the requisite information
    2022-01-26 02:31:54下载
    积分:1
  • 这是第一个开源实现动态主机配置…
    This is the first ever open source implementation of Dynamic Host Configuration Protocol for IPv6 (DHCPv6) server and client on Linux Operating System. The server provides leases (durations or lifetimes) on IPv6 addresses to the clients who request for it
    2022-05-16 18:05:10下载
    积分:1
  • linux指令集,快速查找指令,使用很方便。
    linux指令集,快速查找指令,使用很方便。-linux,Quick Find command,Very convenient to use
    2022-02-05 17:04:48下载
    积分:1
  • 696518资源总数
  • 106227会员总数
  • 11今日下载