Description:
Introduction
In this project, we will design a programming solution to the bounded-buffer problem using the producer and consumer processes . The solution uses three semaphores: empty and full, which count the number of empty and full slots in the buffer, and mutex, which is a binary (or mutual exclusive) semaphore that protects the actual insertion or removal of items in the buffer. For this project, standard counting semaphores will be used for empty and full, and, rather than a binary semaphore, a mutex lock will be used to represent mutex. The producer and consumer – running as separate threads – will move items to and from a buffer that is synchronized with these empty, full, and mutex structures. You are required to use the pthread package to solve this problem in this project.
And there can be several producers/consumers as many as you want.
-Introduction In this project, we will design a programming solution to the bounded-buffer problem using the producer and consumer processes. The solution uses three semaphores: empty and full, which count the number of empty and full slots in the buffer, and mutex, which is a binary (or mutual exclusive) semaphore that protects the actual insertion or removal of items in the buffer. For this project, standard counting semaphores will be used for empty and full, and, rather than a binary semaphore, a mutex lock will be used to represent mutex. The producer and consumer- running as separate threads- will move items to and from a buffer that is synchronized with these empty, full, and mutex structures. You are required to use the pthread package to solve this problem in this project.And there can be several producers/consumers as many as you want. Platform: |
Size: 96256 |
Author:MidnightD |
Hits:
Description: 关于进程同步的,完成的是生产者消费者问题。包含信号量-With regard to the process of synchronization, and the completion of the producer consumer problem. With semaphores Platform: |
Size: 2048 |
Author:rain |
Hits:
Description: 生产者与消费者问题,用信号量实现!linux环境下的C代码-Producer and consumer issues, using semaphores to achieve! C code in linux environment Platform: |
Size: 1024 |
Author:flydragon |
Hits:
Description: a C program that implements a
producer-consumer system with two
processes.(using semaphores) Platform: |
Size: 1024 |
Author:MPLinux |
Hits:
Description: 生产者消费者模型,多线程程序,主要涉及互斥、信号量等操作系统知识-Producer consumer model, multi-threaded programs, mainly related to mutual exclusion, semaphores and other operating system knowledge Platform: |
Size: 4486144 |
Author:李明 |
Hits:
Description: 设计目的:通过研究Linux 的进程机制和信号量,实现生产者消费者问题的并发控制.
说明:有界缓冲区内设有20个存储单元,有界缓冲区可用数组实现,缓冲区中的内容自定。
设计要求:(1)每个生产者和消费者对有界缓冲区进行操作后,即时显示有界缓冲区的全部内容,当前指针位置和生产者/消费者进程标识符.(2)生产者和消费者至少各有两个以上.(3)多个生产者或多个消费者之间须有对缓冲区进行共享操作的函数代码(注意互斥与同步).-Design Objective: To study the mechanism and process of Linux semaphores to achieve producer-consumer problem of concurrency control. Description: bounded buffer storage units are equipped with 20, bounded buffer can be used to achieve the array, the contents of the buffer Custom. Design requirements: (1) Each producer and consumer of the bounded buffer operations immediately after the show the entire contents of a bounded buffer, the current pointer position and the producer/consumer process identifier (2) Producer and consumers have at least two or more (3) A number of producers or consumers should have to share operation of the buffer function of the code (note the mutual exclusion and synchronization). Platform: |
Size: 13312 |
Author:奋斗 |
Hits:
Description: 通过研究Linux的进程同步机制和信号量,实现生产者消费者问题的并发控制。-Through the study of Linux process synchronization mechanism and semaphores, concurrency control of the producer-consumer problem. Platform: |
Size: 4847616 |
Author:litao |
Hits:
Description: Linux进程编程,生产者-消费者程序组,支持多个生产者和消费者,生产者进程数为2,
消费者进程数为3。
生产者与消费者之间使用共享内存进行数据传递,并使用信号量对数据的内容进行保护。-The Linux process programming, producer- consumer program group, supports multiple producers and consumers, the the producer process for 2, consumers process 3. Use shared memory for data transfer between producers and consumers, and use semaphores to protect the data. Platform: |
Size: 3072 |
Author:q |
Hits:
Description: 编写一个生产者-消费者程序组,支持多个生产者和消费者,生产者进程数为2,
消费者进程数为3。
生产者与消费者之间使用共享内存进行数据传递,并使用信号量对数据的内容进行保护。-Preparation of a producer- consumer program group, supports multiple producers and consumers, the the producer process for 2
Consumers number of processes.
Use shared memory for data transfer between producers and consumers, and use semaphores to protect the data. Platform: |
Size: 150528 |
Author:蔡应恒 |
Hits:
Description: 生产者消费者模型,用c语言实现模拟内存管理中的生产者和消费者,实现用信号量和锁的使用方法-Model of producers and consumers, producers and consumers in the analog memory management using the c language, the use of semaphores and locks Platform: |
Size: 12288 |
Author: |
Hits:
Description: 我是编程小菜鸟= =,这是一个信号量互斥的经典问题,消费者生产者问题的简单实现,使用线程方式,所以在调试时须选择多线程方式。-I was programming a small rookie = = This is a classic problem of mutual exclusion semaphores, producer consumer problem s simple implementation, using threads, so when debugging multithreaded mode must be selected. Platform: |
Size: 1904640 |
Author:李宜核 |
Hits:
Description: 这是关于操作系统中生产者消费者问题的一段代码,其中生产者和消费者问题是用信号量实现的,临界资源是用数组实现的。-This is a piece of code about the producer-consumer problem in the operating system, where producer and consumer problems are implemented with semaphores, and the critical resource is implemented as an array. Platform: |
Size: 2048 |
Author:宗道明 |
Hits: