Patent ID: 7152145

Claim:
A method for optimizing system performance by transferring a stack in a real time operating system comprising: a microcomputer ( 1 ) having an embedded RAM ( 11 ), a flash memory ( 13 ) and EEPROM (electrically erasable and programmable read only memory) ( 12 ) to generally control the system through a certain program; input/output parts ( 2 ); a power supply ( 3 ) to provide power supply voltage to each part; a display ( 4 ) to indicate results of operation of the system; an interface ( 5 ) for data communication with external devices; and an armored RAM ( 6 ) in which various data and programs are memorized, wherein the method comprises the steps of: continuously detecting whether it is time to change stack pointers (SP) of a task by means of a task management program which is memorized in the microcomputer ( 1 ), wherein, if it is not time to change the stack pointers (SP), the task management program continues to check the task; if it is time to change stack pointers (SP), performing a subroutine to search for a task on which occupancy time is the longest in operating a program; if the task on which occupancy time is the longest is found, transferring the stack of the task to a reserved area of the embedded RAM ( 11 ); finding tasks to be processed by means of a task scheduler in a memory map of the transferred stack; and processing the tasks found.