An Improved Task Scheduling Algorithm for Intelligent Control in Tiny Mechanical System
Table 1
The structure of Webit&NEU OS kernel.
Function module
Implementation of system calls
(a) Task management services
(i) CREATE TASK: Creating and scheduling a system task dynamically. (ii) DELETE TASK: Deleting a specific system task. (iii) GET FUNCTION ID: Obtaining task’s function ID (00H to 0FFH). (iv) SUSPEND TASK: Suspending a task of being executed.
(b) Intertask communication services
(i) ALLOCATE: Allocating buffer space where a task creates a message for sending. (ii) SEND MESSAGE: Sending a message to the specific destination. (iii) WAIT MESSAGE: Causing a task to wait for receiving a message. (iv) DEALLOCATE: Returning a buffer allocated to the system buffer.
(c) Internal memory management services
(i) GET MEMORY: Getting the address of a block of internal memory with specific length is currently available in the system. (ii) RELESE MEMORY: Returning a block of memory of specific length to the system memory pool.
(d) Interrupt-handling services
(i) DISABLE INTERRUPT: Disabling specific interrupts. (ii) ENABLE INTERRUPT: Reenabling disabled interrupts. (iii) SYNCHRONIZE: Synchronizing tasks with interrupts.
(e) Timing services
(i) SET INTERVAL: Setting a time interval when the interval event has occurred. (ii) WAIT TIME: Waiting for interval event or timeout to occur.