现在,利用图5和图6来总结一下锁关系。
如果只有几个应用程序并发地运行,则可以增大 MAXLOCKS,因为在这些条件下锁列表空间中不会有太多争用。
You can increase MAXLOCKS if only a few applications run concurrently, because there will not be a lot of contention for the lock list space under these conditions.
而且根据更大的基本块支持其他何种优化,在粗化的情况下,持有锁的时间甚至可能不会延长。
And depending on what other optimizations are enabled by the larger basic block, the duration for which the lock is held may not even be lengthened under coarsening.
从表面上看,锁省略似乎可以允许我们不必忍受同步带来的负担,就可以编写线程安全的代码了,前提是在同步的确是多余的情况下。
On the surface it looks as though lock elision allows us to write thread safe code without any synchronization penalty for using in cases where it really wasn't needed.
更重要的是,在这种情况下进行振动测试,螺母没有出现松脱现象。这表明即使螺母没有完全扭紧,其自锁效果仍然存在。
What's more, when a vibration test was performed in this condition, no loosening occurred, indicating that a self-locking effect is present even if the nut is not fully tightened.
默认情况下,锁计数器不会被收集。
零下十摄氏度把轿车上的锁冻住了。
我们来看一下所有这些锁。
只有在其他线程不拥有锁的情况下才会成功,如果其他线程拥有锁,当前线程就被阻塞。
This only succeeds if another thread does not already have the lock, in which case the current thread is blocked.
在仅出现该锁的情况下,CE服务器将不阻止任何更改。
The ce server will not prohibit any change due to the mere presence of a lock.
您只能在有限的一些情形下使用volatile变量替代锁。
You can use volatile variables instead of locks only under a restricted set of circumstances. Both of the following criteria must be met for volatile variables to provide the desired thread-safety.
Linux在没有锁争用的情况下执行用户空间中的所有锁定。
Linux performs all locking in user space in cases without contention.
例如,某些情况下VM也许能够完全删除锁机制,这使得我们难以抽象地比较volatile和 synchronized的开销。
For example, the VM may be able to remove locking entirely in some situations, which makes it hard to talk about the relative cost of volatile vs. synchronized in the abstract.
在这些情形下,锁定超时报告中只会显示一个锁持有者。
In those cases only one of the lock owners is shown in the lock timeout report.
使用volatile变量的主要原因是其简易性:在某些情形下,使用 volatile变量要比使用相应的锁简单得多。
The primary motivation for using volatile variables is simplicity: In some situations, using a volatile variable is just simpler than using the corresponding locking.
使用volatile变量次要原因是其性能:某些情况下,volatile变量同步机制的性能要优于锁。
A secondary motivation for using volatile variables is performance: in some situations, volatile variables may be a better-performing synchronization mechanism than locking.
在使用ONLINE关键字时,DDL操作是在没有将排它锁应用于定义特定索引表的情况下执行的。
When you use the ONLINE keyword, DDL operations execute without applying an exclusive lock to the table on which the specified index is defined.
在某些情况下,如果读操作远远大于写操作,volatile变量还可以提供优于锁的性能优势。
In situations where reads greatly outnumber writes, volatile variables may also provide a performance advantage over locking.
乐观事务锁不能用于在单个update语句中更新数据行集合,因此在这种情况下,很难进行错误处理。
Optimistic transaction locking should not be used to update sets of rows in a single update statement, as error handling in this case is very difficult.
为你的裤子锁一下裤边可以让你看起来很时尚而不是要扫大街。
Shorten the hems on your bargain pants and you'll look chic rather than vaguely like you're trying to sweep the streets.
当在程序中使用JUC锁的时候,线程会在下面两种情况下“停止”执行。
When using a JUC lock, a thread will "stop" execution in the following two cases.
实验证明这些方法能有效防止活锁现象,极大地提高服务器在高负载情况下的性能。
The results of the tests prove that these methods can avoid livelock effectively and improve the performance of overloaded servers greatly.
劳力士深海型配有专利劳力士环锁系统,能够安全潜入海下12800英尺。
Fitted with a patented Rolex Ringlock System, the Rolex Deepsea safely descends to 12,800 feet.
我想门已经锁了,但我还是去查看一下的好。
在这种情况下,锁的粒度是非常重要的。
您是否可以找人修一下漏的水龙头和坏锁呢?
Could you find someone to repair a leaky faucet and broken lock?
小猪短租正要开始向房东供应“智能锁”,可以在房东不在场的情况下读取房卡。
The company wants to start supplying hosts with "smart locks" that can read the cards without the host being present.
以下所有函数只能在编译时确认支持线程的情况下可用,并且必须在解释器锁创建后被调用。
All of the following functions are only available when thread support is enabled at compile time, and must be called only when the interpreter lock has been created.
刺激一侧眶下神经,于双侧胸锁乳突肌记录峰潜伏期和波幅。
Electrical stimulation was applied to the infraorbital nerves and latency and amplitude of wave were recorded from the bilateral sternocleidomastoid muscles.
刺激一侧眶下神经,于双侧胸锁乳突肌记录。
Electrical stimuli were applied to the infraorbital nerves and it was recorded from the sternocleidomastoid muscles.
应用推荐