登录
首页 » 操作系统 » 分享一个模拟生产者消费者的小程序

分享一个模拟生产者消费者的小程序

于 2022-10-22 发布 文件大小:1.36 MB
0 99
下载积分: 2 下载次数: 1

代码说明:

实验目的进程同步是操作系统多进程/多线程并发执行的关键之一,进程同步是并发进程为了完成共同任务采用某个条件来协调他们的活动,这是进程之间发生的一种直接制约关系。本次试验是利用信号量进行进程同步。实验软件环境VC++或者Linux操作系统实验内容• 生产者进程生产产品,消费者进程消费产品。 • 当生产者进程生产产品时,如果没有空缓冲区可用,那么生产者进程必须等待消费者进程释放出一个缓冲区。 当消费者进程消费产品时,如果缓冲区中没有产品,那么消费者进程将被阻塞,直到新的产品被生产出来。

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

发表评论

0 个回复

  • Process Scheduling Algorithm Implementation
    进程调度算法的实现-Process Scheduling Algorithm Implementation
    2023-03-15 07:15:03下载
    积分:1
  • uCos_II到ARM7的移植,内附详细的PDF说明文档及完整的源代码。
    uCos_II到ARM7的移植,内附详细的PDF说明文档及完整的源代码。-uCos_II ARM7 to the transplant, the PDF containing detailed documentation, and complete source code.
    2022-08-13 06:35:44下载
    积分:1
  • this is aes algorithm
    this is aes algorithm
    2022-02-02 04:29:09下载
    积分:1
  • 只要自己做编,对就有深刻的了解,讲的是进程间的
    只要自己做编,对操作系统就有深刻的了解,讲的是进程间的操作-To do as long as their provision of operating systems have a profound understanding of the process of talking about inter-operation
    2022-11-20 10:05:04下载
    积分:1
  • 微软女士
    Microsoft MS-DOS6.0 完整源代码,包括所有外部命令,安装程序,DOSSHELL等。每个源文件均包括开发历史、更新说明、注释。这样一套源码对你的意义,实在无法以笔墨形容-Microsoft the MS-DOS6.0 complete source code, including all external commands, the installation procedure, DOSSHELL and so on. Each source document includes the development history, the renewal explanation, the annotation. This kind of set of sources code to your significance, really is unable to the words to describe
    2022-05-17 19:09:01下载
    积分:1
  • 利用简单的结构和控制方法模拟进程结构、进程状态和进程控制。...
    利用简单的结构和控制方法模拟进程结构、进程状态和进程控制。-The use of a simple structure and control simulation of process structure, process status and process control.
    2022-08-25 15:11:54下载
    积分:1
  • Win32串口编程
    Win32串口编程教程及源代码Win32串口编程教程及源代码Win32串口编程教程及源代码Win32串口编程教程及源代码Win32串口编程教程及源代码Win32串口编程教程及源代码Win32串口编程教程及源代码Win32串口编程教程及源代码Win32串口编程教程及源代码Win32串口编程教程及源代码Win32串口编程教程及源代码Win32串口编程教程及源代码
    2022-08-13 10:14:04下载
    积分:1
  • 通过研究Linux的线程机制和信号量实现读者写者(Reader
    通过研究Linux的线程机制和信号量实现读者写者(Reader-Writer)问题并发控制。 1)写-写互斥:不能有两个写者同时进行写操作; 2)读-写互斥:不能同时有一个线程在读,而另一个线程在写; 3)读-读允许:可以有一个或多个读者在读; 4)读者优先的附加限制:如果读者申请进行读操作时已有另一个读者正在进行读操作,则该读者可直接开始读操作; 5)写者优先的附加限制:如果一个读者申请进行读操作时已有另一个写者在等待访问共享资源,则该读者必须等到没有写者处于等待状态后才能开始读操作。 -By studying the Linux thread mechanism and semaphores realize readers who write (Reader-Writer) the issue of concurrency control. 1) to write- write mutex: Can not write at the same time there are two write operations 2) read- write mutex: Can not have a thread at the same time in reading and writing another thread 3) Reading- Reading of permit: can have one or more readers read 4) the priority of additional restrictions readers: If the readers apply for a read operation, there was another reader being read, the reader can be directly started reading operation 5) to write additional priority Restrictions: If an application for a reader reading write operation has been in waiting for another visit to a shared resource, the read
    2022-02-06 09:26:49下载
    积分:1
  • 写他自己的,“一本书的源代码,每…
    《自己动手写操作系统》一书里面的源码,个人认为对学习操作系统的朋友有点帮助。-"to write his own operating system," a book which the source code, personal view on learning the system a bit to help a friend.
    2022-01-25 14:45:00下载
    积分:1
  • WINCE寄存器读写工具源码
    Wince对CPU寄存器的直接读写 方便驱动开发的朋友调试开发
    2022-09-16 11:40:05下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载