mutexes

mutexes

 英

  • 网络互斥器;互斥量;互斥体

例句

Imagine, if you will, a pair of mutexes; we'll call them count_mutex and rand_mutex.

想像这儿互斥我们分别它们count_mutexrand_mutex。

OK, now it's time to see all the different ways to use mutexes.

现在看看使用互斥对象各种不同方法

So far, you have used a mutex or multiple mutexes included as part of the data structure for synchronization.

目前为止数据结构使用一个多个互斥管理同步

Mutexes will insert a "memory barrier, " which ensures that the writes to main memory occur in the order the threads lock the mutex.

互斥对象插入一道内存关卡”,确保主存写入按照线程锁定互斥对象顺序进行

pthread_mutexes can be created with different locking policies.

pthread_mutex可以使用不同锁定策略创建

Deadlock can also happen if threads do not unlock mutexes properly.

如果线程没有正确释放互斥死锁发生

Mutexes provide mutual exclusion for one or more data objects and are the primary method of thread synchronization.

互斥体能一个多个数据对象相互排斥互斥线程同步主要手段

But parallel computing is more than just using mutexes and condition variables in random functions and methods.

但是并行编程只是随便什么函数方法使用互斥条件变量

Robust mutexes solve the problem of cleaning up locks properly after an application holding locks crashes.

健壮互斥解决持有应用程序崩溃正确清理问题

An important problem associated with mutexes is the possibility of deadlock.

一个互斥有关重要问题可能发生死锁

You should have a basic understanding of thread creation, mutexes, and condition variables, as well.

应该基本了解线程创建互斥条件变量

Finally, we explore kernel mutexes, which are built on top of the atomic API.

最后我们讨论构建原子API内核互斥

Mutexes are available in the kernel as a way to accomplish semaphore behavior.

内核可以使用互斥实现信号量行为

Linux pthread mutexes are supported by fast user-space mutexes, known as futexes.

快速用户空间互斥称为futexes支持Linuxpthread互斥

Almost free as code size, you need no semaphores nor mutexes. * Almost free as code size, you need no semaphores nor mutexes.

基本上没有代码空间开销需要信号量互斥

For achieving synchronization, you can use mutexes.

实现同步可以使用互斥信号

First of all, mutexes are used to serialize access to *shared data*.

首先互斥对象用于串行化存取*共享数据*。

I added mutexes to the shared data structures and add locks to most methods.

共享数据结构增加互斥还给大多数方法

The most common building blocks of intertask communication are semaphores and mutexes.

进程通讯基石信号灯互斥

Mutexes are system-wide objects which multiple processes can see.

互斥系统范围对象可以多个进程使用

Thus no mutexes are held by the signal while a slot is executing.

因此插槽执行信号没有持有互斥

But mutexes are faster and more compact than the current kernel semaphore option, so if they fit your need, they're the choice to use.

但是互斥当前内核信号量选项更快并且更加紧凑因此如果它们满足需求那么它们明智选择

Part 3 covers mutexes, critical sections, and wait functions.

第3部分涵盖信号关键区域等待函数

These mutexes are not visible to Java code, only VM C code.

这些互斥VMC代码可见

I've used a combination of mutexes and spinlocks to keep things synchronized.

使用互斥spinlock组合方案保证同步

Higher-level interfaces enable much simpler code, even if there are still mutexes and such under the covers.

高级别的接口可以简化代码即使仍然互斥一类东西

Another problem with mutexes is that contention for a mutex can lead to priority inversion.

另外一个问题互斥争夺造成优先权倒置

To produce predictable code, you'll want to use mutexes.

产生预测代码使用互斥对象

The most commo building lock of intertask communication are semaphore and mutexes.

大部分进程通讯建立基石信号灯互斥

If you place too many mutexes, your code won't have any kind of concurrency and will run slower than a single-threaded solution.

如果放置过多互斥对象代码没有什么并发性运行起来单线解决方案

Mutexes are necessary tools for threaded programs, but they can't do everything.

互斥对象线程程序必需工具它们并非万能

The decision about which mutexes to lock is made based on data only available at runtime. This is the essence of the problem.

应该锁定哪些互斥取决于运行时可用数据问题关键所在

As with mutexes, it's possible that these calls won't do very much in some implementations, but you should make them anyway.

对于互斥来说这些调用有些实现可能并不什么但是应该调用它们

This is how mutexes work.

互斥对象这样工作

Implementing counters and mutexes with locking

使用锁定实现计数器互斥