网站首页  英汉词典

请输入您要查询的英文单词:

 

单词 Critical sections
释义

Critical sections

中文百科

临界区段 Critical section

(重定向自Critical sections)

在同步的编程中,临界区段(Critical section)指的是一个访问共用资源(例如:共用设备或是共用内存)的程序片段,而这些共用资源有无法同时被多个线程访问的特性。

当有线程进入临界区段时,其他线程或是行程必须等待(例如:bounded waiting 等待法),有一些同步的机制必须在临界区段的进入点与离开点实现,以确保这些共用资源是被互斥或的使用,例如:semaphore。

只能被单一线程访问的设备,例如:打印机。

一个最简单的实现方法就是当线程/线程(Thread)进入临界区段时,禁止改变处理器;在uni-processor系统上,可以用"禁止中断(CLI)"来完成,避免在运行上下文交换(Context switching)的时候发生系统调用(System Call);当离开临界区段时,处理器回复原先的状态。

英语百科

Critical section 临界区段

(重定向自Critical sections)

In concurrent programming, a critical section is a part of a multi-process program that may not be concurrently executed by more than one of the program's processes. In other words, it is a piece of a program that requires mutual exclusion of access. Typically, the critical section accesses a shared resource, such as a data structure, a peripheral device, or a network connection, that does not allow multiple concurrent accesses.

随便看

 

英汉网英语在线翻译词典收录了3779314条英语词汇在线翻译词条,基本涵盖了全部常用英语词汇的中英文双语翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2024 encnc.com All Rights Reserved
更新时间:2025/6/21 18:11:17