* * * * * rw_mutex控制读写的信号量,同时只有一个读 Mutex是控制read_count的信号量,多个读进程修改read_count * * * * * * * * * * * * * * * * * * * * * * * * * * * * A memory transaction is a sequence of read-write operations to memory that are performed atomically. void update() { /* read/write memory */ } Transactional Memory OpenMP is a set of compiler directives and API that support parallel progamming. void update(int value) { #pragma omp critical { count += value } } The code contained within the #pragma omp critical directive is treated as a crit
您可能关注的文档
- (操作系统教学课件)Appendix A FreeBSD.ppt
- (操作系统教学课件)ch0Course Info.ppt
- (操作系统教学课件)ch1Introduction.ppt
- (操作系统教学课件)ch2Operating-System Structures.ppt
- (操作系统教学课件)ch3Processes.ppt
- (操作系统教学课件)ch4Threads.ppt
- (操作系统教学课件)ch6CPU Scheduling.ppt
- (操作系统教学课件)ch7Deadlocks.ppt
- (操作系统教学课件)ch8Main Memory.ppt
- (操作系统教学课件)ch9Virtual Memory.ppt
原创力文档

文档评论(0)