首页> 外国专利> Uniprocessor operating system design facilitating fast context switching

Uniprocessor operating system design facilitating fast context switching

机译:单处理器操作系统设计有助于快速上下文切换

摘要

A task stack and a context pointer in a task control block (TCB) are implemented to provide more efficient context switching. Additionally, multiple routines each of which saves or restores a certain combination of volatile registers is implemented. A task can store in its task control block a routine identifier to select from the multiple routines a set of routines for saving and restoring volatile registers during context switching. On the occurrence of an event that may lead to a context switch a scheduler selects based on the routine identifier a routine that only saves registers used by the task, thereby, reducing execution overhead. The registers are saved on the task stack and a context pointer to the registers is saved in the TCB. In the event a context switch is necessary, it is not necessary to copy the registers to the TCB because the context pointer is in the TCB. A non-volatile register indicator that indicates whether non-volatile registers are used is stored in the task control block. The non-volatile registers are only saved if used, also reducing execution overhead. Furthermore, a storage area is implemented for saving task context for the task when it is interrupted during context switch in. Upon the occurrence of an interrupt the task context is saved in the storage area. If the interrupt leads to a second task which has a higher priority being made ready, the second task is switched in without first returning to switch-in the task.
机译:任务控制块(TCB)中的任务堆栈和上下文指针实现为提供更有效的上下文切换。另外,实现了多个例程,每个例程保存或恢复易失性寄存器的某种组合。一个任务可以在其任务控制块中存储一个例程标识符,以便从多个例程中选择一组例程,以便在上下文切换期间保存和恢复易失性寄存器。在发生可能导致上下文切换的事件时,调度程序将根据例程标识符选择仅保存任务使用的寄存器的例程,从而减少执行开销。寄存器保存在任务堆栈中,指向寄存器的上下文指针保存在TCB中。如果需要进行上下文切换,则不必将寄存器复制到TCB,因为上下文指针位于TCB中。指示是否使用非易失性寄存器的非易失性寄存器指示符存储在任务控制块中。非易失性寄存器仅在使用时才保存,这也减少了执行开销。此外,实现了用于在上下文切换期间中断任务时保存任务上下文的存储区域。在发生中断时,任务上下文被保存在存储区域中。如果中断导致具有更高优先级的第二个任务准备就绪,则在不首先返回切入任务的情况下切入第二个任务。

著录项

  • 公开/公告号US7313797B2

    专利类型

  • 公开/公告日2007-12-25

    原文格式PDF

  • 申请/专利权人 ANAND SUNDARAM;MAARTEN KONING;

    申请/专利号US20020246830

  • 发明设计人 ANAND SUNDARAM;MAARTEN KONING;

    申请日2002-09-18

  • 分类号G06F9/46;

  • 国家 US

  • 入库时间 2022-08-21 20:09:19

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号