摘要 |
PURPOSE:To effectively utilize a memory by setting previously the initial value of a proper stack size at a table updating the initial value with the value added with the stack extension value when a stack extension request is produced and at the same time allocating the stacks by the number equal to the size stored in a corresponding table when a task is started. CONSTITUTION:An operating system OS searches a task execution waiting list to decide a desired task and starts this task. In this case, a physical memory is secured for the stack allocation size l stored in a control table TCB and a mapping task is carried out to a logic space. If the stacks run short in an execution mode, the OS secures a physical memory to the short staks and has a mapping task to a logical space. Then the extended size (m) is added to the size l in the TCB. When a task is through and set under an execution enable state, the task is registered again into the task execution waiting list. Then a stack physical memory having a size (l-m) changed when the task is started in the preceding time is secured when a task is started by the OS. |