(操作系统教学课件)ch5Process Synchronization.ppt

(操作系统教学课件)ch5Process Synchronization.ppt

* * * * * 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

文档评论(0)

1亿VIP精品文档

相关文档