Context switch

Context switch

Commutation de contexte

Une commutation de contexte (context switch) en informatique consiste à sauvegarder l'état d'un processus ou d'un processus léger et à restaurer l'état d'un autre processus (léger) de façon à ce que des processus multiples puissent partager les ressources d'un seul processeur dans le cadre d'un système d'exploitation multitâche.

Une commutation de contexte peut être plus ou moins coûteuse en temps processeur suivant le système d'exploitation et l'architecture matérielle utilisés.

Le contexte sauvegardé doit au minimum inclure une portion notable de l'état du processeur (registres généraux, registres d'états, etc.) ainsi que, pour certains systèmes, les données nécessaires au système d'exploitation pour gérer ce processus.

La commutation de contexte invoque au moins trois étapes. Par exemple, en présumant que l'on veut commuter l'utilisation du processeur par le processus P1 vers le processus P2 :

  • Sauvegarder le contexte du processus P1 quelque part en mémoire (usuellement sur la pile de P1).
  • Retrouver le contexte de P2 en mémoire (usuellement sur la pile de P2).
  • Restaurer le contexte de P2 dans le processeur, la dernière étape de la restauration consistant à reprendre l'exécution de P2 à son point de dernière exécution.

Certains processeurs peuvent sauvegarder et restaurer le contexte du processeur en interne, évitant ainsi d'avoir à sauvegarder ce contexte en mémoire vive.

  • Portail de l’informatique Portail de l’informatique
Ce document provient de « Commutation de contexte ».

Wikimedia Foundation. 2010.

Contenu soumis à la licence CC-BY-SA. Source : Article Context switch de Wikipédia en français (auteurs)

Игры ⚽ Поможем решить контрольную работу

Regardez d'autres dictionnaires:

  • Context switch — For other uses, see Switch (disambiguation). A context switch is the computing process of storing and restoring the state (context) of a CPU so that execution can be resumed from the same point at a later time. This enables multiple processes to… …   Wikipedia

  • Switch (disambiguation) — NOTOC Switch may mean: Technology * Switch, or (more formally) Electromechanical switch or Electric switch, all meaning a device for making or breaking an electric circuit, or for selecting between multiple circuits; in usage the former… …   Wikipedia

  • Context (computing) — In computer science, a task context (process, thread ...) is the minimal set of data used by this task that must be saved to allow a task interruption at a given date, and a continuation of this task at the point it has been interrupted and at an …   Wikipedia

  • Context analysis — is a method to analyze the environment in which a business operates. Environmental scanning mainly focuses on the macro environment of a business. But context analysis considers the entire environment of a business, its internal and external… …   Wikipedia

  • Turing switch — The Turing switch is a logical construction similar to the Turing machine. The Turing switch models the operation of a basic switch in a network of switches, much the same as a Turing machine models the operation of a basic computational entity.… …   Wikipedia

  • DioneOS — (pronounced /djoneos/) is multitasking preemptive, real time operating system. The system is designed for Texas Instruments MSP430x microcontrollers. Target microcontroller platform has limited resources, i.e. system clock frequency in tens of… …   Wikipedia

  • Thread (computer science) — This article is about the concurrency concept. For the multithreading in hardware, see Multithreading (computer architecture). For the form of code consisting entirely of subroutine calls, see Threaded code. For other uses, see Thread… …   Wikipedia

  • Kernel (computer science) — In computer science, the kernel is the central component of most computer operating systems (OS). Its responsibilities include managing the system s resources (the communication between hardware and software components). As a basic component of… …   Wikipedia

  • Memory management unit — This 68451 MMU could be used with the Motorola 68010 A memory management unit (MMU), sometimes called paged memory management unit (PMMU), is a computer hardware component responsible for handling accesses to memory requested by the CPU. Its… …   Wikipedia

  • Kernel (computing) — A kernel connects the application software to the hardware of a computer In computing, the kernel is the main component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”