IMPROVEMENTS RELATING TO STACK USAGE IN COMPUTER­RELATED OPERATING SYSTEMS
    2.
    发明公开
    IMPROVEMENTS RELATING TO STACK USAGE IN COMPUTER­RELATED OPERATING SYSTEMS 审中-公开
    的改进与在计算机操作系统中堆栈使用

    公开(公告)号:EP1573538A2

    公开(公告)日:2005-09-14

    申请号:EP03791005.6

    申请日:2003-08-20

    发明人: LAKE, David

    IPC分类号: G06F9/50

    CPC分类号: G06F9/5016 G06F9/50

    摘要: Methods, devices, configuration tools and operating systems are disclosed for reducing memory and processor usage in a computer operating system utilising a processor, a memory and a single stack, the operating system comprising a plurality of tasks divided into predetermined priority categories, including preemptive tasks and at least one task that voluntarily yields control of the processor to tasks of lower priority than itself in predetermined circumstances, wherein each task has associated therewith a stack pointer, and wherein the at least one task, when started, has its stack pointer set to a precalculated worst-case value guaranteed to leave sufficient space in the stack beneath the stack pointer for any preemptive tasks of lower priority, and wherein the at least one task has allocated to it an area of memory into which its stack contents is saved, a size of the area of memory being determined by a declared precalculated worst-case stack usage of the at least one task at any point at which the at least one task may yield control of the processor. Embodiments of the present invention enable a plurality of tasks to run on a single stack, thus saving memory and processor usage.