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

使用鎖定實現計數器互斥