搜索资源列表
threadinWin32
- 在编程过程中产生线程作了全面的分析,分析CriticalSection Mutex Semaphore Event在线程中的应用时各自优缺点作详细解说
EX3
- 使用Win32同步对象(互斥对象,事件对象,信号量对象等)解决临界区问题-兄弟问题 -Use Win32 synchronization object (mutex objects, events, objects, semaphore objects, etc.) to solve critical problems- the problem brother
thread
- 线程锁.Windows系统是多任务操作系统,系统内核为我们提供了 事件(Event)、Mutex、信号灯(semaphore)和计时器4种对象来控制线程间的同步。 在C++Builder中,为我们提供了用于创建Event的TEvent对象供我们使用。-Thread lock. Windows system is a multi-tasking operating system kernel to provide us with the event (Event), Mutex, sema
producer-consumer-problem
- 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
Access
- 在Windows2000环境下,创建一个控制台进程,此进程包含n个线程。用这n个线程来表示n个读者或写者。每个线程按相应测试数据文件(后面介绍)的要求进行读写操作。用信号量机制分别实现读者优先和写者优先问题。 读者-写者问题的读写操作限制(包括读者优先和写者优先) 1) 写-写互斥:不能有两个写者同时进行写操作 2) 读-写互斥:不能同时有一个线程在读,而另一个线程在写。 3) 读-读允许:可以有一个或多个读者在读。 -In Windows2000 environment,
sem_named_lock
- use named semaphore to lock and unlock the resource, like mutex, but it use between processed.
thrd-win32
- Win32 现成创建,包括Win32 MUTEX 锁和WIN 32 SEMAPHORE 信号灯。-Windows 32 thread create.
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
2009103015231441894
- 10个VC++多线程操作实例源代码,内容涉及如何安全终止线程、如何创建UI线程、如何创建Worker线程、如何等待线程结束、如何挂起和恢复线程、如何获得线程的退出码、如何使用互斥量、如何使用临界区、如何使用信号量等内容,入门者更应该看一看,多线程的使用很广泛,可以提高程序效率。 -10 VC++ source code examples of multi-threaded operation, which relates to the safe termination of the thre
Muti-thread-win32
- 用C语言撰写的多线程win32程序,运用了mutex,semaphore和event来同步多个线程-Written in C language with multi-threaded win32 program, using a mutex, semaphore and event to synchronize multiple threads
MUTEX
- 进程与线程中的信号量编程,有关Mutex方面的源代码-Process and thread semaphore programming, the Mutex' s source code
Mutex_Critical
- 这个例子利用多线程使用不同的排序算法对数据进行排序,每一个线程使用不同的算法。主线程里使用快速排序QuickSort,其他四个算法分别建立四个子线程,在子线程中进行排序。因为每一个线程都要调用函数PrintResult把结果输出到显示器上,所以不同的线程就会争夺着向显示器输出,这样,不同线程的输出就会混合在一起,所以呢必须让线程一个接着一个输出。也就是必须对PrintResult进行互斥控 制。要进行互斥控制,则必须用到Event、Mutex、CrititicalSection、Semaph
PV
- 用多线程实现“生产者-消费者问题”本作业要求设计并实现一个进程,该进程拥有一个生产者线程和一个消费者线程,它们使用N个不同的缓冲区(N为一个自定义的确定的数值,例如N=32)。你需要使用如下信号量:一个互斥信号量,用以阻止生产者线程和消费者线程同时操作缓冲区列表;一个信号量,当生产者线程生产出一个物品时可以用它向消费者线程发出信号;一个信号量,消费者线程释放出一个空缓冲区时可以用它向生产者线程发出信号; -Achieved with multi-threaded " producer
ThreadTest
- 測試lock, monitor, mutex, semaphore等執行緒用法-test use of lock, monitor, mutex, and semaphore in threads
p-and-c
- 在Windows和Linux操作系统上,利用各自操作系统提供的Mutex和信号量机制(Win32 API或Pthreads),实现生产者/消费者问题-In the Windows and Linux operating systems, the use of their operating system provided Mutex and semaphore mechanism (Win32 API or Pthreads), to achieve the producer/consumer
vcthreads
- 10个VC++多线程操作实例源代码,内容涉及如何安全终止线程、如何创建UI线程、如何创建Worker线程、如何等待线程结束、如何挂起和恢复线程、如何获得线程的退出码、如何使用互斥量、如何使用临界区、如何使用信号量等内容,入门者更应该看一看,多线程的使用很广泛,可以提高程序效率-10 VC++ multi-threaded operation examples of source code, content involves how to safely terminate a thread, ho
dxc
- 处理多线程问题,具体是处理生产者与消费者的问题,有关学习互斥量信号量的简单知识-Deal with multi-threading issues, in particular the problem of treatment of producers and consumers, the simple knowledge about learning mutex semaphore
shiyan2
- 哲学家进餐问题 #include<stdio.h> #include<semaphore.h> #include<pthread.h> //宏定义信号量个数为5,宏定义0表示思考,宏定义1表示饿,宏定义2表示吃,宏定义(ph_num+4) N表示左,宏定义(ph_num+1) N表示右 #define N 5 #define THINKING 0 #define HUNGRY 1 #define EATING 2 #
uTenux-example
- uTenxu的例子,包含任务,信号量,互斥体,邮箱,事件标志,消息缓冲,内存池,中断(The example of uTenxu includes tasks, semaphore, mutex, mailbox, event flag, message buffer, memory pool, interrupt.)