| Summary: | In existing embedded Forth operating systems,multitask space cannot be reused and multitask management supports only task creation.To address the problem,this paper proposes a space reuse algorithm for multitask in embedded operating systems based on Forth Virtual Machine(FVM).The algorithm takes the task control block as the header node of the idle task image partition list.The link address variable in the task control block is used to track the background task images deleted by the system,and both collection and redistribution of task image space can be realized by modifying only one user variable pointer.Experimental results show that the proposed algorithm improves memory resource utilization of Forth system while ensuring the stability and inherent features of Forth system.It is applicable to embedded environments with limited resources.
|