Part 2 handles semaphores and events.
第2部分处理的是信号量与事件。
Timeout: Win32 event semaphores support timed wait.
超时:Win32事件信号支持定时等待。
Between processes, System V semaphores can be used.
在进程之间,可以使用Systemv信号量。
The next article in this series will cover semaphores.
本系列的下一篇文章将阐述信号量。
Nsems is the number of semaphores in the semaphore set.
nsems是这个信号量集中信号量的数量。
A text file showing the semaphores that were contended for.
一个文本文件,显示被争用的信号量。
Named semaphores extend the synchronization between processes.
有名信号量可以在进程之间进行同步。
Linux POSIX semaphores use sem_post to post an event semaphore.
LinuxPOSIX信号量使用sem_post来发出一个事件信号量。
Type of semaphore: Windows provides named and unnamed semaphores.
信号量的类型:Windows提供了有名(named)信号量和无名(unnamed)信号量。
Linux POSIX semaphores use sem_destroy to destroy the unnamed semaphore.
LinuxPOSIX信号使用sem_destroy来销毁无名称的信号。
Type of semaphore: Win32 supports both named and un-named event semaphores.
信号的类型:Win32 既支持有名称的事件信号,也支持无名称的事件信号。
On Linux, POSIX semaphores are used only between the threads of same process.
在Linux 上,在相同进程的不同线程之间,则只使用POSIX 信号量。
Listing 22 USES POSIX semaphores to implement synchronization between threads a and b.
清单22使用POSIX信号来实现线程a和B之间的同步。
You can also see the reduction in the semaphores in this production workload with Domino 7.
您还可以看到使用Domino7后此生产工作负载中信号量的减少。
Specifically, semaphores ensure that a server completes certain tasks before it begins other tasks.
具体地说,信号量确保服务器完成某些任务,然后再开始其他任务。
Part 2 in the series covers synchronization objects and primitives, starting with semaphores and events.
系列的第2部分介绍了同步对象和原语,首先是信号量和事件。
Refer to the section on semaphores in this article for the prototype for each of these System V semaphores.
关于每个SystemV信号量的原型,请参阅本文中有关信号量一节的内容。
Linux POSIX semaphores use sem_wait to suspend the calling thread until the semaphore has a non-zero count.
LinuxPOSIX信号使用sem_wait来挂起发出调用的线程,直到信号拥有了非零的计数值。
A real application would use semaphores or other techniques to control reading and writing to the Shared segment.
真实的应用程序会使用信号量或其他技术控制对共享内存段的读写。
Other resources, such as semaphores, network handles, database connections, and so on, deserve the same consideration.
其他资源(如信号量、网络句柄、数据库连接等)同样值得考虑。
This second part of the series has introduced synchronization objects and primitives, starting with semaphores and events.
本文是这一系列的第 2部分,这篇文章从信号量和事件入手,介绍了有关同步对象和原语的内容。
Linux POSIX semaphores are count variables and can be used to achieve the Windows functionality of semaphores on Linux.
LinuxPOSIX信号量也是一些计数器变量,可以用来在Linux上实现Windows上的信号量功能。
The threading module does provide many synchronization primatives, including semaphores, condition variables, events, and locks.
线程模块提供了许多同步原语,包括信号量、条件变量、事件和锁。
Performance Degradations such as failure to correctly release resources including file handles, connections, semaphores, and streams
性能下降问题,诸如释放资源(包括文件句柄、连接、信号和流)失败。
Notice that in System V semaphores, key is used to uniquely identify the semaphore; in Windows, the semaphore is identified by a name.
注意,在Systemv信号量中,key被用来惟一标识信号量;在Windows中,信号量是使用一个名称来标识的。
POSIX semaphores are count semaphores, but when the count is set to 1 they provide similar functionality to the Windows event object.
尽管POSIX信号量是计数器信号量,但是当这个计数器被设置为1时,它们可以提供与Windows事件对象相似的功能。
Having an organized methodology towards recording and reporting semaphores provides a cornerstone for a more maintainable system in the long term.
以有组织的方式记录和报告信号量为长期的可维护系统提供了基础。
This tactic requires that you review what the base OS kernel provides or advises in terms of designing the use of semaphores within your program logic.
这种策略要求您了解基本操作系统内核提供的机制,并在程序逻辑中利用这些机制设计信号量使用方法。
So, for example, if semaphores were numbered 1 to 10, each task would start by locking the lowest number first, working its way up to the highest numbered.
例如,如果信号量编号为1到10,那么每个任务先锁住编号最低的信号量,然后依次锁住信号量,直到编号最高的信号量。
应用推荐