这最适用于短时间锁,例如事务内的名称空间锁。
This is best used for short-lived locks, such as namespace locks within a transaction.
不过,该公司还需要一些时间来修复所有自行车上的新锁。
However, it will take some time for the company to fix the new locks on all of its bikes.
另一方面,如果锁被占有很长时间,那么自旋的线程只会消耗CPU而不做任何有用的工作,因此带来浪费。
On the other hand, if the lock is held for a longer time, spinning is wasteful as the spinning thread consumes CPU without doing anything useful.
由于数据库管理器能够确定某一行何时会被修改,因此可以保证数据完整性,同时限制持有锁的时间。
Because the database manager can determine when a row is changed, it can ensure data integrity while limiting the time that locks are held.
第一列是时间,表明什么时候锁出现了竞争。
The first lane is Time, indicating when this lock contention occurs.
要支持高数据库并发性,则需要减少数据库锁,并尽可能缩短保持资源的时间。
To support high database concurrency, you need to reduce database locks and hold resources for as little time as possible.
给定系统上运行的线程越多,对那些有限系统资源的需要更多,等待同步锁释放的时间越长。
The more threads running on a given system, the more demand for those limited system resources and the more time spent waiting on synchronization locks to release.
确保应用程序持有锁的时间尽可能短。
Ensure that applications hold locks for as short a time as possible.
这些锁基于优先级继承并且其持有时间较短。
These locks are based on priority inheritance and are held for short time intervals.
LockWaitTime:在执行此sql语句期间等待锁花费的时间(以秒为单位)。
Lock wait Time: Time spent waiting for locks during this SQL statement in seconds.
如果发生系统突然关机或panic,MUI可能在启动时很难打开,因为系统崩溃时MUI没有适当的时间来清除剩余的锁文件。
In the event of a sudden system shutdown or panic, the MUI may have trouble starting when booting up because the MUI doesn't have the proper time to clean up leftover lock files when a system fails.
LockWaitTime:在执行此sql语句期间系统等待锁的时间。
Lock wait Time: Time the system waited for locks during SQL statement.
可以从此屏幕截图中看到,JLAsink 监视程序进行了 9,161 次 get,并且请求线程被阻塞,阻止它获得 25%的锁时间。
You can see from this screenshot that the JLAsink monitor has had 9,161 gets made on it and that the requesting thread was blocked trying to obtain the lock 25 percent of the time.
这个例程有两个参数,第二个参数是绝对时间值。如果在到达这个时间时还无法获得锁,例程会返回且状态码非零。
This routine takes in two arguments, the second being the absolute value of time by which, if the lock could not be acquired, the routine returns with a non-zero status.
通过这种方法,所有读取操作和相应的处理将在事务的上下文之外执行,因此不会在事务持续时间内在数据库中保持锁。
This way, all of the read operations and corresponding processing execute outside of a transaction's context, and consequently do not hold locks in the database for the duration of the transaction.
解决方案必须避免会话锁超时和长时间等待锁。
The solution must avoid session lock timeouts and long wait for locks.
这个差别反映了调度开销上的时间损失和用于等待获取锁的空闲时间。
This difference reflects the time lost to scheduling overhead and to idle time spent waiting to acquire locks.
如果您要在整个迭代期间都保持对集合的锁,那么其他的线程就会在锁外停留很长的一段时间,等待解锁。
If you are going to hold the lock on the collection during an entire iteration, then other threads may be stalled waiting for the collection lock for a long time.
这对于等待同一互斥锁的其他线程有不利影响,因为等待时间现在会更长。
For other threads waiting on the same mutex, this has a negative effect, because the wait time is now even longer.
这向JVM实现人员提出了一个问题:如果锁只被持有很短的时间,那么旋转会更有效率;如果锁持有很长时间,那么暂挂会更有效率。
This presents a problem for JVM implementers: if locks are only held for a short time, then spinning is more efficient; if locks are held for a long time, then suspension is more efficient.
而且根据更大的基本块支持其他何种优化,在粗化的情况下,持有锁的时间甚至可能不会延长。
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.
同乐观锁定策略相比,物理数据库锁需要持续较长的时间,因此应用程序性能和吞吐量很可能会受到影响。
As physical database locks are held for a longer time duration than with an optimistic locking strategy, there is more of a chance for performance and throughput being impacted.
在本方案中,通过逻辑锁(而不是物理锁)来对在较长时间中使用的数据行进行标记。
In this case, a logical lock (not a physical database lock) is used to flag that a row is in use for a long-term duration.
当锁被占有的时间很短时,自旋锁的效果非常好。
Spin locks work well in cases where lock durations are very short.
门从外面上了锁,时间是差几分七点,也就是说,我们得在这些格子间里被锁上十二个小时。
The doors were locked on the outside a little before seven in the evening, and would stay locked for the next twelve hours.
建模不恰当的事件处理程序可能导致死锁和由于锁导致长时间等待。
Improperly modeled event handlers may lead to deadlock situations or long wait times caused by locks.
操作系统调度程序决定哪个线程获得对互斥锁的控制权—通常,等待时间最长的读线程先读取数据。
The operating system scheduler determines which thread gets control of the mutex next-typically, the reader thread that has waited the longest gets to read the data first.
自适应意味着自旋的时间不再固定了,而是取决于一个基于前一次在同一个锁上的自旋时间以及锁的拥有者的状态。
With adaptive spinning the duration of the spin is not fixed anymore, but determined by a policy based on previous spin attempts on the same lock and the state of the lock owner.
大部分时间手机被发现的时候都是锁着的,或者是移除SIM卡的。
Most of the time, when phones are found they are locked and have had their SIM CARDS removed.
大部分时间手机被发现的时候都是锁着的,或者是移除SIM卡的。
Most of the time, when phones are found they are locked and have had their SIM CARDS removed.
应用推荐