搜索资源列表
semaphore
- 带栅栏的信号量测试,共有四个java文件,在testbarirr中测试-The amount of test signals with the fence, a total of four java files, testbarirr test
RandW
- 读者写者进程同步问题解决方案,利用临界区,信号量来实现进程或者线程同步-Reader-writer synchronization process solutions, using the critical area, the signal values in order to achieve the process or thread synchronization
2_1
- 使用信号量实现有限缓冲区的生产者和消费者问题-use the signal to realize the problem
2_2
- 使用信号量实现读进程具有优先权的读者和写者问题-use the signal to realize the problem
vcthreads
- 10个VC++多线程操作实例源代码,内容涉及如何安全终止线程、如何创建UI线程、如何创建Worker线程、如何等待线程结束、如何挂起和恢复线程、如何获得线程的退出码、如何使用互斥量、如何使用临界区、如何使用信号量等内容,入门者更应该看一看,多线程的使用很广泛,可以提高程序效率。 -10 VC++ source code examples of multi-threaded operation, which relates to how to safely terminate the thre
semaphoretest
- 该代码是用JAVA编写的“信号量”问题,用于实现线程的同步-The code is written JAVA, " semaphore" problem, used to implement thread synchronization
demo
- 1. 创建多 Task,为每个Task 创建私有的Message Queue,每个Task 只通过自己的私有Message Queue 接收消息;Task 间消息通信通过向对方私有Message Queue 发送消息完 成。 2. Task1:管理Task。负责系统启动时同步系统中其他Task 的启动同步,利用信号量的semFlush()完成。同时接收各Task 的告警信息,并负责系统结束时的Task 删除处理。 3. Task2:激励Task。利用taskDelay()完成周期地向
1123
- 创建一个控制进程,此进程包含n个线程。用这n个线程来表示n个读者或写者。每个线程按相应测试数据文件的要求进行读写操作。用信号量机制分别实现读者优先和写者优先问题。运行结果显示要求:要求在每个线程创建、发出读写申请、开始读写操作和结束读写操作时分别显示一行提示信息,以确定所有处理都遵守相应的读写操作限制。 读者-写者问题的读写操作限制-Create a control process, this process contains n threads. Use of these n thread
MATLAB3
- 一. 随机现象的模拟 例: 超市出口有若干个收款台,两项服务:收款、装袋。顾客的到达的时间间隔是随机的; 因顾客购买的货物量不同,所以服务时间的长短也是随机的。 可以利用计算机产生服从一定的规律(概率分布)的(伪)随机数,用随机数确定时间间隔和服 务时间-1. Random phenomena simulation cases: There are a number of export supermarket cashier, the two services: colle
barber
- 睡眠理发师问题C++解法,使用信号量,理发座位数可选,理发师只有一个-Using semaphore to solve barbers problem,there’s one barber,infinite customer,and a few waiting position,the number of waiting position is depend on the user. 3 semaphores are involved in the program: m_h,barb
readerwriter
- 读者写者问题C++解法,使用互斥信号量,写者线程优先,共有3个读者2个写者-Similar to the barbers problem,the program use semaphore to solve the reader/writer problem.Two semaphores are involved:m_h,db_h,used as a counter and mutex between 2 writers. Main function create 3 reader thre
filesystem
- 一个linux环境下的模拟文件系统的程序,里面有使用说明,能够创建,删除,复制文件,用到了linux共享内存和信号量,另外有个shell程序进程与文件系统程序进行通信。-A linux file system environment, the simulation program, which has instructions for use, the ability to create, delete, copy files, use a linux shared memory and sem
UNIXCcode
- 用C语言编写的Unix代码实例 供大家参考 -#include <sys/sem.h> #include <sys/types.h> #include <sys/ipc.h> #include <stdio.h> #include <sys/stat.h> #define VERIFYERR(a, b) if (a) fprintf(stderr, " s failed.\n", b) else fp
con2
- 演于Windows信号量用法,司机售票员问题。 结果写入文件res.txt-demonstrate windwos semaphore usage
ipc
- 共享内存的使用演示,以及进程间信号量的封装-Demonstrate the use of shared memory, as well as inter-process semaphore package
sem.tar
- Linux下信号量编程,封装好了接口,可以方便使用-Semaphore programming under Linux, the interface wrapper, you can easily use
library
- 模拟图书馆系统,运用多线程、信号量,图书馆中有20个座位,外有10个座位-Simulation library system, the use of multiple threads, semaphores, the library has 20 seats, 10 seats outside
11
- Linux 下进程间通信实例之一——信号量 使用信号量控制父子进程的输出顺序-Linux, one example of inter-process communication- use semaphore semaphore control the output of the process of the order of father and son
12_msg
- Linux 进程间通信实例之一——消息队列 使用了信号量用于进程间的同步。-Linux is one example of inter-process communication- the message queue using semaphores for synchronization between processes.
ucos-ii_test3
- 创建三个任务,使用信号量调度任务,观察任务的运行情况。-Create three tasks, scheduling tasks using semaphores to observe the operation of the task.