KR100657139B1 - Scheduling method for real-time processing in mobile communication terminal - Google Patents

Scheduling method for real-time processing in mobile communication terminal Download PDF

Info

Publication number
KR100657139B1
KR100657139B1 KR1020060002271A KR20060002271A KR100657139B1 KR 100657139 B1 KR100657139 B1 KR 100657139B1 KR 1020060002271 A KR1020060002271 A KR 1020060002271A KR 20060002271 A KR20060002271 A KR 20060002271A KR 100657139 B1 KR100657139 B1 KR 100657139B1
Authority
KR
South Korea
Prior art keywords
task
scheduling
priority
work
execution time
Prior art date
Application number
KR1020060002271A
Other languages
Korean (ko)
Inventor
최석운
Original Assignee
주식회사 팬택앤큐리텔
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 팬택앤큐리텔 filed Critical 주식회사 팬택앤큐리텔
Priority to KR1020060002271A priority Critical patent/KR100657139B1/en
Application granted granted Critical
Publication of KR100657139B1 publication Critical patent/KR100657139B1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D53/00Sealing or packing elements; Sealings formed by liquid or plastics material
    • B65D53/04Discs
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D81/00Containers, packaging elements, or packages, for contents presenting particular transport or storage problems, or adapted to be used for non-packaging purposes after removal of contents
    • B65D81/24Adaptations for preventing deterioration or decay of contents; Applications to the container or packaging material of food preservatives, fungicides, pesticides or animal repellants
    • B65D81/30Adaptations for preventing deterioration or decay of contents; Applications to the container or packaging material of food preservatives, fungicides, pesticides or animal repellants by excluding light or other outside radiation
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D85/00Containers, packaging elements or packages, specially adapted for particular articles or materials
    • B65D85/50Containers, packaging elements or packages, specially adapted for particular articles or materials for living organisms, articles or materials sensitive to changes of environment or atmospheric conditions, e.g. land animals, birds, fish, water plants, non-aquatic plants, flower bulbs, cut flowers or foliage

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Marine Sciences & Fisheries (AREA)
  • Toxicology (AREA)
  • Zoology (AREA)
  • Food Science & Technology (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A scheduling method for real time processing in a mobile terminal is provided to process each task in real time by preventing the phenomenon that a task with a lower priority level cannot be performed for a long time. When a scheduling task with a high priority level is selected as a task to perform an operation, a task to perform an operation is selected by using task information stored in a structure in the scheduling task, and when there is a task which has never been executed, an operational task is selected according to a round-robin format according to priority(S40,S42,S50). An operation of the selected operational task is performed during an allocated execution time, and information indicating whether the operation task has been executed is updated to execution(S52,S54).

Description

이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법{SCHEDULING METHOD FOR REAL-TIME PROCESSING IN MOBILE COMMUNICATION TERMINAL}SCHEDULING METHOD FOR REAL-TIME PROCESSING IN MOBILE COMMUNICATION TERMINAL

도 1은 종래 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법을 설명하기 위한 플로우챠트.1 is a flowchart illustrating a scheduling method for real time processing in a conventional mobile communication terminal.

도 2는 본 발명의 일 실시예에 따른 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법을 설명하기 위한 플로우챠트.2 is a flowchart illustrating a scheduling method for real-time processing in a mobile communication terminal according to an embodiment of the present invention.

본 발명은 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법에 관한 것으로서, 특히 각 태스크들을 실시간 처리할 수 있도록 하는 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법에 관한 것이다.The present invention relates to a scheduling method for real-time processing in a mobile communication terminal, and more particularly, to a scheduling method for real-time processing in a mobile communication terminal to enable real-time processing of each task.

현재 이동 통신 단말기에서 가장 많이 사용하는 OS(Operating System;운영 체제)는 REX(Real-Time Executive)로, REX는 그 이름에서 알 수 있듯이 실시간 처리를 위해서 만들어진 임베디드(Embeded) 운영 체제로, 여러 개의 태스크(Task)를 생성하고, 그 태스크들을 스케쥴링하여 우선 순위가 가장 높은 태스크를 실행시키는 멀티태스킹(Multi-tasking)을 지원한다.The operating system (OS) most commonly used in mobile communication terminals is REX (Real-Time Executive). As its name suggests, REX is an embedded operating system that is designed for real-time processing. It supports multi-tasking that creates a task, schedules the tasks, and executes the highest priority task.

그러나, 실제 동작에 있어서 실시간 처리 특히 멀티태스킹을 지원하는 데 한계가 있다.However, there is a limit in supporting real-time processing, in particular multitasking in actual operation.

즉, 이동 통신 단말기의 소프트웨어는 여러 개의 태스크라 불리는 단위로 나누어져 동작하게 되는 데, REX에서 이 태스크들의 스케쥴링을 담당하게 된다.In other words, the software of the mobile communication terminal is divided into several units called tasks, and the REX is responsible for scheduling the tasks.

도 1은 종래 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법을 설명하기 위한 플로우챠트이다.1 is a flowchart illustrating a scheduling method for real time processing in a conventional mobile communication terminal.

우선, 현재 CPU를 점유하여 작업중인 태스크(CT;Current Task)의 작업이 끝나 CT였던 태스크가 유휴 태스크(IT;Idle Task)로 전환되면서 대기 리스트에서 빠지게 되거나, 주어진 실행 시간인 틱(Tick)이 경과되었을 때(S10), REX는 새로 대기 태스크(RT;Ready Task)가 된 태스크가 존재하는 지를 검색하여(S12), 새로 RT가 된 태스크가 존재하면, 우선 순위를 검사하여 대기 리스트에 추가한다(S14).First, when the task of the current task (CT) is occupied by the current CPU and the task that was CT is switched to the idle task (IT), it is removed from the waiting list, or the tick, which is a given execution time, is When the elapsed time (S10), REX detects whether there is a newly ready task (RT; Ready Task) (S12), and if there is a newly RT task, checks its priority and adds it to the waiting list. (S14).

이후에는 기존 CT의 작업이 남아 있는 지를 판단한다(S16).After that, it is determined whether the work of the existing CT remains (S16).

상기한 과정 S16의 판단결과 기존 CT의 작업이 남아 있는 경우에는, 기존 CT와 대기 리스트에서 대기하고 있는 RT들 중에서 우선 순위가 가장 높은 RT의 우선 순위를 비교하여 우선 순위가 높은 태스크(BPT;Best Priority Task)를 새로 선정한다(S18).As a result of the determination of step S16, when the work of the existing CT remains, the prioritized task (BPT; Best) is compared by comparing the priorities of the RT having the highest priority among the RTs waiting in the existing CT and the waiting list. Priority Task) is newly selected (S18).

상기한 과정 S18에서 대기 리스트에서 대기하고 있던 RT들 중에서 우선 순위가 가장 높은 RT의 우선 순위가 기존 CT의 우선 순위보다 높은 경우에는, 대기 리 스트에서 대기하고 있던 RT들 중에서 우선 순위가 가장 높은 RT가 BPT로 새로 선정되고, 대기 리스트에서 대기하고 있던 RT들 중에서 우선 순위가 가장 높은 RT의 우선 순위가 기존 CT의 우선 순위보다 낮은 경우에는 기존 CT가 BPT를 계속 유지하게 된다. 여기서, 대기 리스트에서 대기하고 있던 RT들 중에서 우선 순위가 가장 높은 RT가 BPT로 선정되는 경우, 기존 CT는 다시 RT가 된다.If the priority of the RT having the highest priority among the RTs waiting in the waiting list in step S18 is higher than the priority of the existing CT, the RT having the highest priority among the RTs waiting in the waiting list. Is newly selected as the BPT, and if the priority of the RT having the highest priority among the RTs waiting in the waiting list is lower than that of the existing CT, the existing CT continues to maintain the BPT. Here, when the RT having the highest priority among the RTs waiting in the waiting list is selected as the BPT, the existing CT becomes RT again.

상기한 과정 S18에서 BPT를 새로 선정한 결과 대기 리스트에서 대기하고 있는 RT들 중에서 우선 순위가 가장 높은 RT가 BPT가 된 경우에는, 새로 선정된 BPT가 CT가 되어 한 틱(Tick)동안 작업을 수행하게 된다(S20, S22).As a result of newly selecting the BPT in the above process S18, if the RT having the highest priority among the RTs waiting in the waiting list becomes the BPT, the newly selected BPT becomes the CT to perform the work for one tick. (S20, S22).

한편, 상기한 과정 S18에서 BPT를 새로 선정한 결과 기존 CT가 BPT를 계속 유지하는 경우에는, 한 틱동안 기존 CT가 작업을 수행하게 된다(S20, S22).On the other hand, as a result of newly selecting the BPT in the process S18, if the existing CT continues to maintain the BPT, the existing CT performs the work for one tick (S20, S22).

한편, 상기한 과정 S16의 판단결과 기존 CT의 작업이 남아 있지 않은 경우에는, 기존 CT를 대기 리스트에서 삭제하고(S26), 대기 리스트에서 대기하고 있던 RT들 중에서 BPT를 선정한다(S28).On the other hand, if the determination of the above step S16 does not remain the operation of the existing CT, the existing CT is deleted from the waiting list (S26), and BPT is selected from the RTs waiting in the waiting list (S28).

이후에는, 상기한 과정 S28에서 새로 선정된 BPT가 CT가 되어 한 틱동안 작업을 수행하고(S30), 상기한 과정 S10으로 진행하여 이후의 과정을 반복 수행한다.Thereafter, the newly selected BPT in step S28 becomes CT to perform a task for one tick (S30), and the process proceeds to step S10 to repeat the subsequent steps.

상기한 과정 S18에서 대기 리스트에서 대기하고 있던 RT들 중에서 우선 순위가 가장 높은 RT의 우선 순위와 기존 CT의 우선 순위가 동일한 경우에는, RR(Round-Robbin;일정 시간을 여러개의 태스크에게 순차적으로 할당해주는 알고리즘) 알고리즘을 적용하여 처리한다.If the priority of the RT having the highest priority among the RTs waiting in the waiting list in step S18 is the same as that of the existing CT, RR (Round-Robbin) is sequentially assigned to several tasks. Algorithm) to apply the algorithm.

이상에서 살펴본 바와 같이, 종래 가장 높은 우선 순위를 갖는 태스크에게 CPU 점유권을 주는 스케쥴링 기법은 우선 순위가 높은 하나의 태스크가 장시간 CPU를 점유하고 작업을 수행하기 때문에 상대적으로 우선 순위가 낮은 태스크들은 오랫동안 대기하게 되는 경우가 발생하게 되어, 점차적으로 여러가지 기능이 추가되고 있는 이동 통신 단말기를 제어함에 있어서 이상적이지 못하게 되는 문제점이 있다.As described above, in the conventional scheduling scheme that gives a CPU to a task having the highest priority, a task having a lower priority waits for a long time because one task having a high priority occupies the CPU and performs a task. In some cases, there is a problem in that it is not ideal for controlling a mobile communication terminal in which various functions are gradually added.

본 발명은 전술한 문제점을 해결하기 위해 안출된 것으로서, REX상에서 태스크의 스케쥴링을 전담하는 새로운 태스크를 추가함으로써, 우선 순위를 이용한 스케쥴링에 라운드 로빈 방식을 적용하여 우선 순위가 낮은 태스크가 오랫동안 작업을 수행하지 못하는 것을 방지하여, 각 태스크들의 실시간 처리를 가능하게 하는 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법을 제공함에 그 목적이 있다.The present invention has been made to solve the above-described problem, by adding a new task dedicated to the scheduling of tasks on REX, by applying a round robin method to scheduling using priorities, low-priority tasks can work for a long time It is an object of the present invention to provide a scheduling method for real-time processing in a mobile communication terminal that prevents failure of the mobile communication terminal.

전술한 목적을 달성하기 위한 본 발명의 일 실시예에 따른 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법은, 우선 순위에 따라 우선 순위가 높은 스케쥴링 태스크가 작업을 수행할 태스크로 선정되면, 상기 스케쥴링 태스크에서 자신의 구조체에 저장되어 있는 태스크 정보를 이용하여 작업을 수행할 태스크를 선정하되, 한 번도 실행된 적이 없는 태스크가 존재하는 경우에는, 우선 순위에 따 라 라운드 로빈 방식으로 작업 태스크를 선정하는 과정과; 상기 선정된 작업 태스크에게 할당된 실행 시간동안 상기 선정된 작업 태스크의 작업을 수행시키고, 상기 작업 태스크의 실행 여부를 나타내는 정보를 '실행'으로 업데이트시키는 과정을 포함하여 이루어지는 것이 바람직하다.In the scheduling method for real-time processing in a mobile communication terminal according to an embodiment of the present invention for achieving the above object, if the scheduling task having a high priority according to the priority is selected as the task to perform the work, the scheduling The task selects a task to perform a task using the task information stored in its structure, but if there is a task that has never been executed, the task task is selected in a round robin manner according to the priority. Process; And performing the work of the selected work task for an execution time allocated to the selected work task, and updating information indicating whether the work task is executed to 'execute'.

나아가, 한 번도 실행된 적이 없는 태스크가 존재하지 않는 경우에는, 대기 리스트에 새로 추가된 대기 태스크가 존재하는 지를 판단하는 과정과; 상기 판단결과 상기 대기 리스트에 새로 추가된 대기 태스크가 존재하는 경우에는 상기 대기 리스트에 저장되어 있는 대기 태스크 목록을 가져와 상기 구조체를 업데이트시키는 과정과; 상기 구조체에 저장되어 있는 모든 태스크 정보에 대해서 실행 여부를 나타내는 정보를 '미실행'으로 초기화시키고, 우선 순위에 따라 라운드 로빈 방식으로 작업 태스크를 선정하는 과정과; 상기 선정된 작업 태스크에게 할당된 실행 시간동안 상기 선정된 작업 태스크의 작업을 수행시키고, 상기 작업 태스크의 실행 여부를 나타내는 정보를 '실행'으로 업데이트시키는 과정과; 상기 선정된 작업 태스크의 작업이 완료되거나, 주어진 실행 시간이 경과하면, 상기 스케쥴링 태스크에게 주어진 실행 시간이 경과했는 지를 판단하는 과정과; 상기 판단결과 상기 스케쥴링 태스크에게 주어진 실행 시간이 경과한 경우에는, 이동 통신 단말기의 운영 체제에서 새로 대기 태스크가 된 태스크가 존재하는 지를 검색하여, 새로 대기 태스크가 된 태스크가 존재하면, 상기 대기 태스크를 우선 순위에 따라 대기 리스트에 추가하고, 우선 순위에 따라 우선 순위가 높은 스케쥴링 태스크를 다시 작업 태스크로 선정하는 과정을 더 포함하여 이루어지는 것이 바람직하다.Furthermore, if there is no task that has never been executed, determining whether a newly added waiting task exists in the waiting list; If there is a waiting task newly added to the waiting list as a result of the determination, obtaining the waiting task list stored in the waiting list and updating the structure; Initializing information indicating whether or not to execute all the task information stored in the structure to 'not executed', and selecting a task task in a round robin manner according to priority; Performing a work of the selected work task for an execution time allocated to the selected work task, and updating information indicating whether the work task is executed to 'execute'; Determining whether the execution time given to the scheduling task has elapsed when the work of the selected work task is completed or a given execution time has elapsed; When the execution time given to the scheduling task elapses as a result of the determination, the operating system of the mobile communication terminal searches whether a task that has been newly waited exists. The method may further include adding to the waiting list according to the priority and selecting the scheduling task having the highest priority according to the priority as a work task again.

그리고, 상기 판단결과 상기 대기 리스트에 새로 추가된 대기 태스크가 존재하지 않는 경우에는, 우선 순위에 따라 라운드 로빈 방식으로 작업 태스크를 선정하는 과정과; 상기 선정된 작업 태스크에게 할당된 실행 시간동안 상기 선정된 작업 태스크의 작업을 수행시키고, 상기 선정된 작업 태스크의 작업이 완료되거나, 주어진 실행 시간이 경과하면, 상기 스케쥴링 태스크에게 주어진 실행 시간이 경과했는 지를 판단하는 과정과; 상기 판단결과 상기 스케쥴링 태스크에게 주어진 실행 시간이 경과한 경우에는, 이동 통신 단말기의 운영 체제에서 새로 대기 태스크가 된 태스크가 존재하는 지를 검색하여, 새로 대기 태스크가 된 태스크가 존재하면, 상기 대기 태스크를 우선 순위에 따라 대기 리스트에 추가하고, 우선 순위에 따라 우선 순위가 높은 스케쥴링 태스크를 다시 작업 태스크로 선정하는 과정을 더 포함하여 이루어지는 것이 바람직하다.If there is no newly added waiting task in the waiting list, selecting a work task in a round robin manner according to a priority order; If the work of the selected work task is performed during the execution time allocated to the selected work task, and the work of the selected work task is completed or a given execution time elapses, the execution time given to the scheduling task has elapsed. Judging it; When the execution time given to the scheduling task elapses as a result of the determination, the operating system of the mobile communication terminal searches whether a task that has been newly waited exists. The method may further include adding to the waiting list according to the priority and selecting the scheduling task having the highest priority according to the priority as a work task again.

그리고, 상기 판단결과 상기 스케쥴링 태스크에게 주어진 실행 시간이 경과하지 않은 경우에는, 상기 스케쥴링 태스크에서 다음 작업 태스크를 선정하여 실행시키는 과정을 반복 수행하는 것이 바람직하다.In addition, when the execution time given to the scheduling task has not elapsed as a result of the determination, it is preferable to repeat the process of selecting and executing the next work task in the scheduling task.

그리고, 상기 선정된 작업 태스크의 작업이 완료된 경우에는, 상기 작업이 완료된 태스크를 상기 대기 리스트에서 삭제시키는 과정을 더 포함하여 이루어지는 것이 바람직하다.In addition, when the work of the selected work task is completed, it is preferable to further include the step of deleting the task is completed in the waiting list.

그리고, 상기 태스크 정보는, 태스크 이름, 우선 순위, 실행 시간, 실행 여부 정보를 구비하여 이루어지는 것이 바람직하다.The task information is preferably provided with a task name, priority, execution time, and execution information.

그리고, 상기 실행 시간은, 상기 스케쥴링 태스크에 의해 할당되는 시간으로 우선 순위가 높을 수록 할당되는 실행 시간이 길어지는 것이 바람직하다.The execution time is a time allocated by the scheduling task. The higher the priority, the longer the execution time.

이하에서는 첨부한 도면을 참조하여 본 발명의 바람직한 실시예에 따른 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법에 대해서 상세하게 설명한다.Hereinafter, a scheduling method for real time processing in a mobile communication terminal according to a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings.

우선, 본 발명에 따른 이동 통신 단말기에서 실시간 처리를 위한 스케쥴링 방법을 설명하기에 앞서 본 발명의 설명에 사용되는 용어들에 대해서 설명하기로 한다.First, prior to describing the scheduling method for real-time processing in the mobile communication terminal according to the present invention will be described terms used in the description of the present invention.

REX(Real Time Executive) : MSM(Mobile Station Modem) 칩 기반의 이동 통신 단말기에 주로 쓰이는 운영 체제REX (Real Time Executive): Operating system mainly used for mobile terminal based on MSM (Mobile Station Modem) chip

작업 태스크(CT;Current Task) : 현재 CPU를 점유하여 작업중인 태스크CT (Current Task): A task that is currently occupying the CPU

대기 태스크(RT;Ready Task) : 대기 리스트에서 대기하고 있는 태스크Ready task (RT): task waiting in the waiting list

BPT(Best Priority Task) : 현재 우선 순위가 가장 높은 태스크Best Priority Task (BPT): The task with the highest priority at this time.

유휴 태스크(IT;Idle Task) : 해야 할 작업없이 다음 작업을 대기하고 있는 상태의 태스크Idle Task (IT): A task waiting for the next task without a task to do

틱(Tick) : CPU(=MSM)가 CT를 실행(Running)하는 시간(틱이 만료될 때마다 스케쥴링을 진행함)Tick: The time the CPU (= MSM) runs the CT (scheduling every time the tick expires)

스케쥴링 태스크(ST;Scheduling Task) : 본 발명을 구현하기 위해 추가된 태스크로, 태스크 간의 스케쥴링을 담당하는 태스크이다.Scheduling Task (ST): A task added to implement the present invention. The task is responsible for scheduling between tasks.

전술한, 스케쥴링 태스크는 대기 리스트 내의 대기 태스크의 태스크 정보를 구조체에 저장하여 관리하는 데, 태스크 정보는 태스크 이름, 우선 순위, 실행 시간(스케쥴링 태스크는 각 태스크들의 우선 순위에 맞게 실행 시간을 할당해 주고, 각 대기 태스크들은 자신에게 할당된 시간만큼만 CPU를 점유하여 작업을 수행하되, 각 대기 태스크에게 할당되는 시간은 수학식 1을 통해 산출된다), 실행 여부 정보를 구비하여 이루어진다.As described above, the scheduling task stores and manages task information of a waiting task in the waiting list in a structure. The task information includes a task name, priority, and execution time (the scheduling task allocates execution time according to the priority of each task. In addition, each waiting task performs a task by occupying the CPU only for a time allocated to itself, but the time allocated to each waiting task is calculated through Equation 1), and execution information is provided.

전술한 구조체에 태스크 정보가 업데이트될 때, 태스크 정보는 각 태스크의 우선 순위에 따라 정렬된다.When task information is updated in the above-described structure, the task information is sorted according to the priority of each task.

(부호없는 정수)×(1000/(Task enum값의 제곱)) (ms)(Unsigned integer) × (1000 / (square of task enum)) (ms)

수학식 1에서 Task enum값은 우선 순위를 나타내는 값으로 우선 순위가 낮을 수록 높은 값을 갖는다. 예를 들어, 감시 태스크의 경우 '0'이고, 스케쥴링 태크스의 경우 '1'이 된다. 이에 따라, 우선 순위가 높은 태스크는 우선 순위가 낮은 태스크에 비해 많은 실행 시간을 할당받게 된다.In Equation 1, a task enum value represents a priority value, and a lower value has a higher value. For example, '0' for the monitoring task and '1' for the scheduling task. Accordingly, the higher priority task is allocated more execution time than the lower priority task.

감시 태스크(Dog Task) : REX 상에서 가장 높은 우선 순위를 가지고 있는 태스크로서, 태스크들을 관리하고, 태스크에 오류가 발생하면 관리자에게 알려주는 기능을 수행하는 태스크Dog Task: A task that has the highest priority on REX. It manages tasks and notifies the administrator when an error occurs.

전술한 스케쥴링 태스크는 전체 태스크들 중에서 감시 태스크 바로 아래의 우선 순위를 가지며, 감시 태스크는 감시의 기능만을 수행하므로 REX가 태스크 스케쥴링대로 동작한다면 스케쥴링 태스크는 항상 실행(Running) 상태를 유지하게 된다. 이는 스케쥴링 태스크가 항상 시스템 리소스를 점유한다는 뜻과 같은 것이다.The aforementioned scheduling task has a priority immediately below the monitoring task among all the tasks, and the monitoring task performs only the monitoring function. Therefore, if the REX operates according to the task scheduling, the scheduling task always remains in a running state. This means that scheduling tasks always occupy system resources.

도 2는 본 발명의 일 실시예에 따른 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법을 설명하기 위한 플로우챠트이다.2 is a flowchart illustrating a scheduling method for real-time processing in a mobile communication terminal according to an embodiment of the present invention.

우선, 우선 순위가 감시 태스크 다음으로 높은 스케쥴링 태스크가 BPT가 되므로, 스케쥴링 태스크가 CT가 되어 작업을 수행하게 된다(S40).First, since the scheduling task with the highest priority next to the monitoring task becomes the BPT, the scheduling task becomes the CT to perform the work (S40).

상기한 과정 S40을 통해 CT가 된 스케쥴링 태스크는 자신의 구조체에 저장되어 있는 태스크 정보를 이용하여 작업을 수행할 CT로 선택하는 데, 자신의 구조체에 저장되어 있는 태스크 정보를 분석하여 한 번도 실행된 적이 없는 태스크가 존재하는 지, 즉, 실행 여부를 나타내는 필드의 값이 'FALSE'로 설정되어 있는 태스크가 존재하는 지를 판단한다(S42).The scheduling task, which is CT through the above process S40, is selected as the CT to perform the work using the task information stored in its structure. The scheduling task is executed once by analyzing the task information stored in the structure. It is determined whether there is a task that has never been executed, that is, if there is a task whose value of a field indicating whether to execute is set to 'FALSE' (S42).

상기한 과정 S42의 판단결과 한 번도 실행된 적이 없는 태스크가 존재하는 경우, 즉, 실행 여부를 나타내는 필드의 값이 'FALSE'로 설정되어 있는 태스크가 존재하는 경우에는, 우선 순위에 따라 라운드 로빈 방식으로 CT를 선정하고(S50), CT로 선정된 태스크가 자신에게 할당된 실행 시간(Tick)만큼 CPU를 점유하여 작업을 수행할 수 있도록 한다(S52).As a result of the determination of step S42, when there is a task that has never been executed, that is, when there is a task whose value of the field indicating execution is set to 'FALSE', the round robin method is used according to the priority. CT is selected (S50), and the task selected by CT allows the task to be occupied by the CPU as much as the execution time (Tick) allocated thereto (S52).

이후에는, 상기한 과정 S50을 통해 CT로 선정되어 작업을 수행하는 태스크의 태스크 정보 중에서 실행 여부를 나타내는 필드의 값이 'FALSE'이면 필드값을 'TRUE'로 설정하고(S54), 상기한 과정 S50에서 CT로 선정된 태스크의 작업이 완료되거나, 주어진 실행 시간이 경과하면(S56), 스케쥴링 태스크에게 주어진 실행 시간이 경과했는 지를 판단한다(S58).Subsequently, if the value of the field indicating whether or not to be executed among the task information of the task that is selected as CT through the process S50 is 'FALSE', the field value is set to 'TRUE' (S54). When the task of the task selected as the CT in S50 is completed or the given execution time elapses (S56), it is determined whether the execution time given to the scheduling task has elapsed (S58).

상기한 과정 S56에서 CPU를 점유하여 작업을 수행한 태스크의 작업이 완전히 완료된 경우에는, 작업이 완료된 태스크를 대기 리스트에서 삭제한다.When the task of the task that has performed the task by occupying the CPU is completely completed in step S56, the task whose task is completed is deleted from the waiting list.

상기한 과정 S58의 판단결과 스케쥴링 태스크에게 주어진 실행 시간이 경과하지 않은 경우에는, 상기한 과정 S50으로 진행하여 이후의 과정을 반복 수행한다.If the execution time given to the scheduling task has not elapsed as a result of the determination of step S58, the process proceeds to step S50 and repeats the subsequent steps.

한편, 상기한 과정 S58의 판단결과 스케쥴링 태스크에게 주어진 실행 시간이 경과한 경우에는, REX에서 새로 RT가 된 태스크가 존재하는 지를 검색하여, 새로 RT가 된 태스크가 존재하면(S60), 새로 RT가 된 태스크의 우선 순위를 검사하여 대기 리스트에 우선 순위를 기준으로 추가한다(S62).On the other hand, if the execution time given to the scheduling task has passed as a result of the determination in step S58, the REX searches for the existence of a newly RT task, and if a newly RT task exists (S60), a new RT is generated. The priority of the task is checked and added to the waiting list based on the priority (S62).

상기한 과정 S60에서 새로운 RT의 발생은 인터럽트를 이용하여 발생하거나 한 틱이 끝나면 진행되게 된다.The generation of a new RT in the above process S60 is generated by using an interrupt or proceeds after a tick is completed.

이후에는, REX가 다시 우선 순위 방식에 따라 스케쥴링을 수행하여 새로 CT를 선정하게 되는 데, 스케쥴링 태스크의 우선 순위가 가장 높으므로, 스케쥴링 태스크가 다시 BPT가 되어 작업을 수행하게 되는 과정을 반복 수행하게 된다.After that, REX performs scheduling according to the priority method again and selects a new CT. Since the scheduling task has the highest priority, the scheduling task becomes BPT again and repeats the process. do.

한편, 상기한 과정 S42의 판단결과 한 번도 실행된 적이 없는 태스크가 존재하지 않는 경우, 즉, 실행 여부를 나타내는 필드의 값이 'FALSE'로 설정되어 있는 태스크가 존재하지 않는 경우에는, 대기 리스트 내에 새로 추가된 RT가 존재하는 지를 판단한다(S44).On the other hand, in the case where there is no task that has never been executed as a result of the determination in step S42 described above, that is, when there is no task whose field value indicating execution is set to 'FALSE', there is no waiting list. It is determined whether the newly added RT exists (S44).

상기한 과정 S44의 판단결과 대기 리스트 내에 새로 추가된 RT가 존재하지 않는 경우에는, 상기한 과정 S50으로 진행하여 우선 순위에 따라 라운드 로빈 방식으로 CT를 선정하고, CT로 선정된 태스크가 자신에게 할당된 실행 시간(Tick)만큼 CPU를 점유하여 작업을 수행할 수 있도록 한다(S52).If there is no newly added RT in the waiting list as a result of the determination of step S44, the process proceeds to step S50 and selects a CT in a round robin manner according to the priority, and the task selected as the CT is assigned to itself. The task can be performed by occupying the CPU for the given execution time (Tick).

한편, 상기한 과정 S44의 판단결과 대기 리스트 내에 새로 추가된 RT가 존재하는 경우에는, 대기 리스트에 저장되어 있는 대기 태스크 목록을 가져와 스케쥴링 태스크 자신의 구조체를 업데이트시키고(S46), 구조체에 저장되어 있는 모든 태스크 정보에 대해서 실행 여부를 나타내는 필드의 값을 'FALSE'로 설정한다(S48).On the other hand, if the newly added RT is present in the wait list as a result of the determination of step S44, the waiting task list stored in the wait list is retrieved, and the structure of the scheduling task itself is updated (S46). For all task information, a value of a field indicating whether to execute is set to 'FALSE' (S48).

이후에는, 상기한 과정 S50으로 진행하여 우선 순위에 따라 라운드 로빈 방식으로 CT를 선정하고, CT로 선정된 태스크가 자신에게 할당된 실행 시간(Tick)만큼 CPU를 점유하여 작업을 수행할 수 있도록 한다(S52).After that, the process proceeds to step S50 and selects a CT in a round robin manner according to the priority, and allows the task selected as the CT to perform a task by occupying the CPU by the execution time (Tick) allocated to the CT. (S52).

그리고, 상기한 과정 S50을 통해 CT로 선정되어 작업을 수행하는 태스크의 태스크 정보 중에서 실행 여부를 나타내는 필드의 값이 'FALSE'이면 필드값을 'TRUE'로 설정하고(S54), 상기한 과정 S50에서 CT로 선정된 태스크의 작업이 완료되거나, 주어진 실행 시간이 경과하면(S56), 스케쥴링 태스크에게 주어진 실행 시간이 경과했는 지를 판단한다(S58).Then, if the value of the field indicating whether to execute in the task information of the task that is selected as CT through the process S50 is 'FALSE' and the field value is set to 'TRUE' (S54), the process S50 If the task of the task selected by the CT is completed or the given execution time elapses (S56), it is determined whether the execution time given to the scheduling task has elapsed (S58).

상기한 과정 S56에서 CPU를 점유하여 작업을 수행한 태스크의 작업이 완전히 완료된 경우에는, 작업이 완료된 태스크를 대기 리스트에서 삭제한다.When the task of the task that has performed the task by occupying the CPU is completely completed in step S56, the task whose task is completed is deleted from the waiting list.

상기한 과정 S58의 판단결과 스케쥴링 태스크에게 주어진 실행 시간이 경과하지 않은 경우에는, 상기한 과정 S50으로 진행하여 이후의 과정을 반복 수행한다.If the execution time given to the scheduling task has not elapsed as a result of the determination of step S58, the process proceeds to step S50 and repeats the subsequent steps.

한편, 상기한 과정 S58의 판단결과 스케쥴링 태스크에게 주어진 실행 시간이 경과한 경우에는, REX에서 새로 RT가 된 태스크가 존재하는 지를 검색하여, 새로 RT가 된 태스크가 존재하면(S60), 새로 RT가 된 태스크의 우선 순위를 검사하여 대기 리스트에 우선 순위를 기준으로 추가한다(S62).On the other hand, if the execution time given to the scheduling task has passed as a result of the determination in step S58, the REX searches for the existence of a newly RT task, and if a newly RT task exists (S60), a new RT is generated. The priority of the task is checked and added to the waiting list based on the priority (S62).

상기한 과정 S60에서 새로운 RT의 발생은 인터럽트를 이용하여 발생하거나 한 틱이 끝나면 진행되게 된다.The generation of a new RT in the above process S60 is generated by using an interrupt or proceeds after a tick is completed.

이후에는, REX가 다시 우선 순위 방식에 따라 스케쥴링을 수행하여 새로 CT를 선정하게 되는 데, 스케쥴링 태스크의 우선 순위가 가장 높으므로, 스케쥴링 태스크가 다시 BPT가 되어 작업을 수행하게 되는 과정을 반복 수행하게 된다.After that, REX performs scheduling according to the priority method again and selects a new CT. Since the scheduling task has the highest priority, the scheduling task becomes BPT again and repeats the process. do.

본 발명의 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법은 전술한 실시예에 국한되지 않고 본 발명의 기술 사상이 허용하는 범위 내에서 다양하게 변형하여 실시할 수 있다.The scheduling method for real-time processing in the mobile communication terminal of the present invention is not limited to the above-described embodiment, and may be modified in various ways within the scope of the technical idea of the present invention.

이상에서 설명한 바와 같은 본 발명의 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법에 따르면, 태스크의 스케쥴링을 전담하는 스케쥴링 태스크를 통해 우선 순위를 이용한 스케쥴링에 라운드 로빈 방식을 적용함으로써, 우선 순위가 낮은 태스크가 오랫동안 작업을 수행하지 못하는 것을 방지하여, 각 태스크들의 실시간 처리가 가능하게 된다.According to the scheduling method for real-time processing in the mobile terminal of the present invention as described above, by applying a round robin method to scheduling using priority through a scheduling task dedicated to the scheduling of the task, a low priority task Prevents the user from performing a task for a long time, thereby enabling real-time processing of each task.

Claims (7)

우선 순위에 따라 우선 순위가 높은 스케쥴링 태스크가 작업을 수행할 태스크로 선정되면, 상기 스케쥴링 태스크에서 자신의 구조체에 저장되어 있는 태스크 정보를 이용하여 작업을 수행할 태스크를 선정하되, 한 번도 실행된 적이 없는 태스크가 존재하는 경우에는, 우선 순위에 따라 라운드 로빈 방식으로 작업 태스크를 선정하는 과정과;If a scheduling task having a higher priority is selected as a task to perform a task according to the priority, the scheduling task selects a task to perform a task using task information stored in its structure, but has never been executed. If there are no tasks, selecting a task task in a round robin manner according to priority; 상기 선정된 작업 태스크에게 할당된 실행 시간동안 상기 선정된 작업 태스크의 작업을 수행시키고, 상기 작업 태스크의 실행 여부를 나타내는 정보를 '실행'으로 업데이트시키는 과정을 포함하여 이루어지는 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법.Performing a task of the selected work task for an execution time allocated to the selected work task, and updating information indicating whether the work task is executed to 'execute'; Scheduling method for. 제 1항에 있어서, 한 번도 실행된 적이 없는 태스크가 존재하지 않는 경우에는, 대기 리스트에 새로 추가된 대기 태스크가 존재하는 지를 판단하는 과정과;The method of claim 1, further comprising: determining whether a newly added waiting task exists in the waiting list when there is no task that has never been executed; 상기 판단결과 상기 대기 리스트에 새로 추가된 대기 태스크가 존재하는 경우에는 상기 대기 리스트에 저장되어 있는 대기 태스크 목록을 가져와 상기 구조체를 업데이트시키는 과정과;If there is a waiting task newly added to the waiting list as a result of the determination, obtaining the waiting task list stored in the waiting list and updating the structure; 상기 구조체에 저장되어 있는 모든 태스크 정보에 대해서 실행 여부를 나타내는 정보를 '미실행'으로 초기화시키고, 우선 순위에 따라 라운드 로빈 방식으로 작업 태스크를 선정하는 과정과;Initializing information indicating whether or not to execute all the task information stored in the structure to 'not executed', and selecting a task task in a round robin manner according to priority; 상기 선정된 작업 태스크에게 할당된 실행 시간동안 상기 선정된 작업 태스크의 작업을 수행시키고, 상기 작업 태스크의 실행 여부를 나타내는 정보를 '실행'으로 업데이트시키는 과정과;Performing a work of the selected work task for an execution time allocated to the selected work task, and updating information indicating whether the work task is executed to 'execute'; 상기 선정된 작업 태스크의 작업이 완료되거나, 주어진 실행 시간이 경과하면, 상기 스케쥴링 태스크에게 주어진 실행 시간이 경과했는 지를 판단하는 과정과;Determining whether the execution time given to the scheduling task has elapsed when the work of the selected work task is completed or a given execution time has elapsed; 상기 판단결과 상기 스케쥴링 태스크에게 주어진 실행 시간이 경과한 경우에는, 이동 통신 단말기의 운영 체제에서 새로 대기 태스크가 된 태스크가 존재하는 지를 검색하여, 새로 대기 태스크가 된 태스크가 존재하면, 상기 대기 태스크를 우선 순위에 따라 대기 리스트에 추가하고, 우선 순위에 따라 우선 순위가 높은 스케쥴링 태스크를 다시 작업 태스크로 선정하는 과정을 더 포함하여 이루어지는 것을 특징으로 하는 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법.When the execution time given to the scheduling task elapses as a result of the determination, the operating system of the mobile communication terminal searches whether a task that has been newly waited exists. Adding to the waiting list according to the priority, and selecting a scheduling task having a high priority according to the priority as a work task again. 제 2항에 있어서, 상기 판단결과 상기 대기 리스트에 새로 추가된 대기 태스크가 존재하지 않는 경우에는, 우선 순위에 따라 라운드 로빈 방식으로 작업 태스크를 선정하는 과정과;The method of claim 2, further comprising: selecting a task task in a round robin manner according to a priority order when there is no newly added standby task in the wait list as a result of the determination; 상기 선정된 작업 태스크에게 할당된 실행 시간동안 상기 선정된 작업 태스크의 작업을 수행시키고, 상기 선정된 작업 태스크의 작업이 완료되거나, 주어진 실행 시간이 경과하면, 상기 스케쥴링 태스크에게 주어진 실행 시간이 경과했는 지를 판단하는 과정과;If the work of the selected work task is performed during the execution time allocated to the selected work task, and the work of the selected work task is completed or a given execution time elapses, the execution time given to the scheduling task has elapsed. Judging it; 상기 판단결과 상기 스케쥴링 태스크에게 주어진 실행 시간이 경과한 경우에는, 이동 통신 단말기의 운영 체제에서 새로 대기 태스크가 된 태스크가 존재하는 지를 검색하여, 새로 대기 태스크가 된 태스크가 존재하면, 상기 대기 태스크를 우선 순위에 따라 대기 리스트에 추가하고, 우선 순위에 따라 우선 순위가 높은 스케쥴링 태스크를 다시 작업 태스크로 선정하는 과정을 더 포함하여 이루어지는 것을 특징으로 하는 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법.When the execution time given to the scheduling task elapses as a result of the determination, the operating system of the mobile communication terminal searches whether a task that has been newly waited exists. Adding to the waiting list according to the priority, and selecting a scheduling task having a high priority according to the priority as a work task again. 제 2항 또는 제 3항에 있어서, 상기 판단결과 상기 스케쥴링 태스크에게 주어진 실행 시간이 경과하지 않은 경우에는,The method of claim 2 or 3, wherein if the execution time given to the scheduling task has not elapsed, as a result of the determination, 상기 스케쥴링 태스크에서 다음 작업 태스크를 선정하여 실행시키는 과정을 반복 수행하는 것을 특징으로 하는 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법.The scheduling method for real-time processing in the mobile terminal, characterized in that for repeating the process of selecting and executing the next work task in the scheduling task. 제 2항 또는 제3항에 있어서, 상기 선정된 작업 태스크의 작업이 완료된 경우에는, 상기 작업이 완료된 태스크를 상기 대기 리스트에서 삭제시키는 과정을 더 포함하여 이루어지는 것을 특징으로 하는 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법.The mobile terminal of claim 2 or 3, further comprising deleting a task from which the task is completed from the waiting list when the task of the selected task task is completed. Scheduling method for processing. 제 1항에 있어서, 상기 태스크 정보는,The method of claim 1, wherein the task information, 태스크 이름, 우선 순위, 실행 시간, 실행 여부 정보를 구비하여 이루어지는 것을 특징으로 하는 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법.A scheduling method for real-time processing in a mobile communication terminal comprising a task name, priority, execution time, execution information. 제 1항, 제 2항, 제 3항 또는 제 6항에 있어서, 상기 실행 시간은,The method of claim 1, 2, 3 or 6, wherein the execution time, 상기 스케쥴링 태스크에 의해 할당되는 시간으로 우선 순위가 높을 수록 할당되는 실행 시간이 길어지는 것을 특징으로 하는 이동 통신 단말기에서의 실시간 처리를 위한 스케쥴링 방법.The scheduling method for real-time processing in a mobile communication terminal, characterized in that the execution time is allocated as the priority is higher as the time allocated by the scheduling task.
KR1020060002271A 2006-01-09 2006-01-09 Scheduling method for real-time processing in mobile communication terminal KR100657139B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060002271A KR100657139B1 (en) 2006-01-09 2006-01-09 Scheduling method for real-time processing in mobile communication terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060002271A KR100657139B1 (en) 2006-01-09 2006-01-09 Scheduling method for real-time processing in mobile communication terminal

Publications (1)

Publication Number Publication Date
KR100657139B1 true KR100657139B1 (en) 2006-12-13

Family

ID=37733187

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060002271A KR100657139B1 (en) 2006-01-09 2006-01-09 Scheduling method for real-time processing in mobile communication terminal

Country Status (1)

Country Link
KR (1) KR100657139B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001142723A (en) 1999-11-11 2001-05-25 Fujitsu Ltd Resource allocating method, computer system, and recording medium
KR20030085355A (en) * 2002-04-30 2003-11-05 엘지전자 주식회사 Method of managing centralizing task

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001142723A (en) 1999-11-11 2001-05-25 Fujitsu Ltd Resource allocating method, computer system, and recording medium
KR20030085355A (en) * 2002-04-30 2003-11-05 엘지전자 주식회사 Method of managing centralizing task

Similar Documents

Publication Publication Date Title
US6560628B1 (en) Apparatus, method, and recording medium for scheduling execution using time slot data
US7234139B1 (en) Computer multi-tasking via virtual threading using an interpreter
JP5405320B2 (en) Virtual machine control device, virtual machine control method, and virtual machine control program
US8392932B2 (en) Information processing device for causing a processor to context switch between threads including storing contexts based on next thread start position
WO2006014354A2 (en) Method and system for concurrent excution of mutiple kernels
JP2010165259A (en) Apparatus and method for processing information
AU2001297946A1 (en) Computer multi-tasking via virtual threading
JP2007018282A (en) Process control system and its control method
US20110016247A1 (en) Multiprocessor system and multiprocessor system interrupt control method
US10248456B2 (en) Method and system for providing stack memory management in real-time operating systems
CN114168352B (en) Multi-core task scheduling method and device, electronic equipment and storage medium
US8555285B2 (en) Executing a general-purpose operating system as a task under the control of a real-time operating system
US9122521B2 (en) Enabling multiple operating systems to run concurrently using barrier task priority
CN106775975B (en) Process scheduling method and device
US5241676A (en) Method for controlling process priority in semaphore operation
US7703103B2 (en) Serving concurrent TCP/IP connections of multiple virtual internet users with a single thread
KR100657139B1 (en) Scheduling method for real-time processing in mobile communication terminal
US10303523B2 (en) Method and apparatus to migrate stacks for thread execution
JP4614239B2 (en) Multitask scheduling function-equipped device and program
US20180270306A1 (en) Coexistence of a synchronous architecture and an asynchronous architecture in a server
CN111241537A (en) Task stack overflow detection method and system
US8095695B2 (en) Control apparatus for process input-output device
JP2011018281A (en) System, method and program for managing job execution
CN114911538A (en) Starting method of running system and computing equipment
WO2002023329A2 (en) Processor resource scheduler and method

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20121130

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20131129

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20141208

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee