V2EX  ›  英汉词典
Enqueued related words: Preemption

Context Switch

Definition / 定义

上下文切换:在操作系统中,CPU 从一个正在运行的进程/线程切换到另一个进程/线程时,保存当前任务的运行状态(寄存器、程序计数器、栈等)并恢复下一个任务状态的过程。该过程会带来一定的时间开销。(该词在非计算机语境中也可指“情境/话题的切换”。)

Pronunciation / 发音

/ˈkɒn.tekst swɪtʃ/(英)
/ˈkɑːn.tekst swɪtʃ/(美)

Examples / 例句

A context switch takes time.
上下文切换需要时间。

Frequent context switches can reduce throughput when too many threads compete for the CPU.
当过多线程争用 CPU 时,频繁的上下文切换会降低吞吐量。

Etymology / 词源

context 来自拉丁语 contextus(“连接在一起的、上下文”),switch 原指“细枝/鞭梢”,后引申为“转换、切换”。“context switch”作为计算机术语主要在操作系统与并发计算的发展过程中普及,用来描述任务之间“保存与恢复运行现场”的切换动作。

Related Words / 相关词

Literary Works / 文学作品

  • Operating System Concepts(Silberschatz, Galvin & Gagne,《操作系统概念》)
  • Modern Operating Systems(Andrew S. Tanenbaum,《现代操作系统》)
  • Computer Systems: A Programmer’s Perspective(Bryant & O’Hallaron,《深入理解计算机系统》)
  • Linux Kernel Development(Robert Love,《Linux 内核开发》)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   3521 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 07:58 · PVG 15:58 · LAX 23:58 · JFK 02:58
♥ Do have faith in what you're doing.