... i should be modest » 正在翻译,请等待... Process needs Structure » 进程需要结构 it's like in summer another in autumn » 这就像在夏季另一秋 ...
基于1个网页-相关网页
如果您需要在一个进程内部对线程使用很多锁,那么可以考虑使用自动完成锁的维护的语言或者语言结构。
If you need many locks for threads inside a process, consider using a language and language constructs that automatically do a lot of lock maintenance.
内核为系统中所有的进程都维护了一个context结构体,以及要在不同进程之间有效进行上下文切换所需要的信息。
The kernel maintains a context structure for all the processes in the system, information it needs for effective context switching among different processes.
这些数据结构里面的大部分都是当你首次创建线程或者进程的时候被创建和初始化的,它们所需的代价成本很高,因为需要和内核交互。
The space for this memory is set aside in your process space at thread creation time, but the actual pages associated with that memory are not created until they are needed.
应用推荐