登录
首页 » 操作系统 » 试验目的:通过研究Linux的线程机制和信号量实现生产者消费者问题的并发控制 说明:有界缓冲区内设有20个存储单元,放入/取出的数据项设定为1~20这20个整型...

试验目的:通过研究Linux的线程机制和信号量实现生产者消费者问题的并发控制 说明:有界缓冲区内设有20个存储单元,放入/取出的数据项设定为1~20这20个整型...

于 2023-06-17 发布 文件大小:8.34 kB
0 160
下载积分: 2 下载次数: 1

代码说明:

试验目的:通过研究Linux的线程机制和信号量实现生产者消费者问题的并发控制 说明:有界缓冲区内设有20个存储单元,放入/取出的数据项设定为1~20这20个整型数。 要求: (1)每个生产者和消费者对有界缓冲区进行操作后,即时显示有界缓冲区的全部内容.当前指针位置和生产者/消费者线程的标识符 (2)生产者和消费者各有两个以上 (3)多个生产者或多个消费者之间须共享对缓冲区进行操作的函数代码。-Test Objective : To study the Linux threading mechanism and signal to producers and consumers to achieve the concurrency control : a boundary buffer There are 20 storage units, Add/remove data items for a set of 20 ~ 20-integer. Requirements : (1) Each producer and consumer sector of the buffer zone is operated, immediately after the sector showed a buffer in its entirety. The current position and producer/consumer threads identifier (2) producers and consumers have two or more (3) A number of producers or many consumers to be shared between the right to operate the buffer function code.

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

发表评论

0 个回复

  • 由超
    C#编写的超小的操作系统,有兴趣的可以下载研究一下,-prepared by the ultra-small operating system, are interested in the study can be downloaded,
    2022-03-21 14:35:55下载
    积分:1
  • 扩展的动态内存机制 任务综述 本任务扩展了自己私有的内存管理机制。首先使用预先规划的思想,使用预先分配的内存池和内存分区,再通过使用消息队列为内...
    扩展的动态内存机制 任务综述 本任务扩展了自己私有的内存管理机制。首先使用预先规划的思想,使用预先分配的内存池和内存分区,再通过使用消息队列作为内存池的管理机制处理内存块分配与释放的过程,而消息队列中保存的是每个预先申请内存块的地址。当用户需要分配一个内存块时,使用msgQReceive() 函数从消息队列中获取一个相应大小的内存块地址;当用户需要释放一个内存块时,则使用msgQSend()函数将内存块首地址发送回消息队列中。通过这种方法,减少了内存反复申请与释放产生外部碎片的可能,并能够有效利用预先分配的思想减少内部碎片。同时也通过消息队列的特性实现了方便的内存块申请与释放的管理操作。 同时,本系统作为扩展的动态内存管理机制,引入了定制的内存分配与释放功能,使用了互斥机制保证操作安全性和一系列告警机制。在保证内存分配与释放安全有序的基础上,还增加了管理监视机制。 其系统具体实现参照系统实现部分。-none
    2022-10-26 02:25:03下载
    积分:1
  • cnix.rar
    cnix.rar
    2022-01-25 23:45:09下载
    积分:1
  • operating system bankers algorithm source code
    操作系统银行家算法原代码-operating system bankers algorithm source code
    2022-06-20 00:40:48下载
    积分:1
  • 这是个银行家算法看看哦
    这是个银行家算法看看哦-This is a look at the banker"s algorithm oh
    2022-02-16 01:24:11下载
    积分:1
  • mmurtl(TM)的电脑版本x0.8,源代码。
    MMURTL(tm) Computer Operating System Ver x0.8, source code.-MMURTL (tm) Computer Operating System Ver x0.8, the source code.
    2022-10-31 13:45:03下载
    积分:1
  • DustFS 文件实现源码,研究文件的朋友可以下载参考!...
    DustFS 文件系统实现源码,研究文件系统的朋友可以下载参考!-DustFS File System source code, research papers, the system can be downloaded refer to a friend!
    2022-07-16 02:32:02下载
    积分:1
  • information system for understanding the mechanism of C source code
    用以理解系统消息机制的C++源代码-information system for understanding the mechanism of C source code
    2022-02-21 04:20:17下载
    积分:1
  • 这是我写的一个关于的FIFO的过程,希望大学在使用的同时指出不足之处,...
    这是我写的一个关于操作系统的FIFO的过程,希望大学在使用的同时指出不足之处,-This the one I wrote on the operating system FIFO process, in the hope that the University of noted deficiencies, thank you
    2023-05-23 23:00:02下载
    积分:1
  • Internal communication systems to provide network communication capabilities, in...
    企业内部通讯系统必须提供网络通讯功能、在通讯过程中禁止使用聊天表情、文件传送等功能,避免资料外泄,或因发送错误而导致上级资料的丢失以及其他损失。最重要的是必须适应任何操作系统,也就是实现跨平台技术,因为企业内部的工作需要,工作环境中使用了多个操作系统来完成不同的工作。另外,系统不需要使用服务器中转和记录通讯内容,可以独立完成通讯任务,排除职工对领导监视工作进度等逆反心理-Internal communication systems to provide network communication capabilities, in the communications process of the Prohibition of the Use chat expressions, such as file transfer capabilities, to avoid leakage of information, or send an error which led to the loss of higher-level information as well as other losses. The most important thing is to be adapted to any operating system, which is cross-platform technology, as businesses need to work within the working environment in the use of a number of different operating system to complete the work. In addition, the system does not require the use of transit and records of communications servers, you can independently accomplish the communication task, remove the leadership of trade unions to monitor the progress of the work of such an antagonistic mental
    2022-05-15 18:57:53下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载