KR20020087189A - Method to embody software timer - Google Patents

Method to embody software timer Download PDF

Info

Publication number
KR20020087189A
KR20020087189A KR1020010026190A KR20010026190A KR20020087189A KR 20020087189 A KR20020087189 A KR 20020087189A KR 1020010026190 A KR1020010026190 A KR 1020010026190A KR 20010026190 A KR20010026190 A KR 20010026190A KR 20020087189 A KR20020087189 A KR 20020087189A
Authority
KR
South Korea
Prior art keywords
timer
list
software
lists
message
Prior art date
Application number
KR1020010026190A
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 KR1020010026190A priority Critical patent/KR20020087189A/en
Publication of KR20020087189A publication Critical patent/KR20020087189A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/14Time supervision arrangements, e.g. real time clock

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

PURPOSE: A method for realizing a software timer is provided, which can generate a number of software timers using one hardware timer. CONSTITUTION: The method includes an initialization step(ST1) of initializing a value of a list to scan when an interrupt of a hardware time is detected, and a list judgement step(ST2) of judging whether a present list number is equal to or lower than the number of lists, and a timer checking step(ST3) of judging whether a time of the software time is expired if there is a software timer registered in a corresponding list of a timer block if the present list number is equal to or lower than the number of lists. In a timer expiration step(ST4), if there is a software timer whose time is expired, related information of the corresponding timer is stored and the corresponding timer is deleted from the timer block, and then the method is recurred to the timer checking step. In an end step(ST6), if the present list number is larger than the number of lists, a message is transferred to a specific work related with the corresponding timer stored in the timer expiration step.

Description

소프트웨어 타이머의 구현 방법{METHOD TO EMBODY SOFTWARE TIMER}How to implement a software timer {METHOD TO EMBODY SOFTWARE TIMER}

본 발명은 타이머에 관한 것으로, 특히 하나의 하드웨어 타이머를 사용하여 다수의 소프트웨어 타이머를 생성하는 소프트웨어 타이머의 구현 방법에 관한 것이다.The present invention relates to a timer, and more particularly to a method of implementing a software timer for generating a plurality of software timers using one hardware timer.

종래의 타이머는 하드웨어 타이머로서 각 프로세서의 종류에 따라 4개에서 8개가 지원 된다. 종래의 하드웨어 타이머에 있어서, 프로세서의 레지스터에 타이머를 등록시키면 프로세서는 상기 타이머에 하나의 하드웨어 타이머를 할당 한다.Conventional timers are hardware timers, 4 to 8, depending on the type of processor. In a conventional hardware timer, when a timer is registered in a register of a processor, the processor allocates one hardware timer to the timer.

프로세서는 상기 타이머가 종료 될때까지 상기 하드웨어 타이머가 주기적으로 발생시키는 인터럽터를 카운터하여 타이머가 종료 되었을때 특정 작업으로 인터럽터를 발생시켜 특정 작업이 수행되게 한다.The processor counters an interrupter periodically generated by the hardware timer until the timer expires, and generates an interrupter for a specific task when the timer expires so that the specific task is performed.

따라서, 종래에는 하나의 특정 작업에 하나의 하드웨어 타이머를 할당하여 특정 작업을 수행 한다.Therefore, conventionally, one hardware timer is assigned to one specific task to perform a specific task.

그러나, 상기와 같은 종래의 기술에 있어서, 특정 작업에 있어서 필요한 타이머의 수가 실제 하드웨어 타이머의 갯수보다 많을때 작업을 용이하게 수행할수 없는 문제점이 있다.However, in the prior art as described above, there is a problem in that the task cannot be easily performed when the number of timers required for a specific task is larger than the number of actual hardware timers.

따라서, 상기와 같은 문제점을 감안하여 창안한 본 발명은, 하나의 하드웨어 타이머를 사용하여 다수의 소프트웨어 타이머를 생성하여 사용하는 소프트웨어 타이머의 구현 방법을 제공함에 그 목적이 있다.Accordingly, an object of the present invention is to provide a method of implementing a software timer that generates and uses a plurality of software timers using one hardware timer.

도 1은 본 발명 새로운 소프트웨어 타이머를 등록하는 방법을 보인 예시도.1 is an exemplary view showing a method of registering a new software timer of the present invention.

도 2는 본 발명 소프트웨어 타이머의 구현 방법을 보인 순서도.2 is a flowchart illustrating a method of implementing the software timer of the present invention.

*** 도면의 주요 부분에 대한 부호의 설명 ****** Explanation of symbols for the main parts of the drawing ***

10 : 제1리스트 11, 12, 13 : 제1리스트에 등록된 소프트웨어 타이머10: First list 11, 12, 13: Software timer registered in the first list

20 : 제2리스트 21, 22 : 제2리스트에 등록된 소프트웨어 타이머20: 2nd list 21, 22: Software timer registered in 2nd list

30 : 제3리스트 31, 32 : 제3리스트에 등록된 소프트웨어 타이머30: 3rd list 31, 32: Software timer registered in 3rd list

23 : 새로 등록된 만료시간이 6인 타이머23: timer with newly registered expiration time of 6

상기와 같은 목적을 달성하기 위한 본 발명은, 인터럽트를 감지하면 리스트의 값을 초기화하는 초기화단계와, 현재 리스트 번호가 리스트의 갯수보다 작거나 같은가를 판단하는 리스트 판단단계와, 상기 리스트 판단단계에서 현재 리스트 번호가 리스트의 갯수보다 작거나 같으면 해당 리스트에 등록된 소프트웨어 타이머가 있는가를 판단하여 소프트웨어 타이머가 있으면 그 타이머의 시간이 만료되었는가를 판단하는 타이머 확인단계와, 상기 타이머 확인단계에서 소프트웨어 타이머의 시간이 만료되었다면 타이머 관리부는 해당 메시지 및 관련정보를 메시지 라우터에게 전달하고 상기 타이머 확인단계로 회귀하는 타이머 만료단계와, 상기 리스트 판단단계에서 현재 리스트 번호가 리스트의 갯수보다 크다면 메시지 라우터가 특정 작업에게 전달해야할 메시지가 있느가를 판단하여 전달해야할 메시지가 있으면 메시지 라우터는 특정 작업에게 메시지를 전달하고 종료하는 종료단계로 구성한 것을 특징으로 한다.In order to achieve the above object, the present invention provides an initialization step of initializing a value of a list when an interrupt is detected, a list determination step of determining whether a current list number is less than or equal to the number of lists, and in the list determination step. If the current list number is less than or equal to the number of lists, a timer checking step of judging whether there is a software timer registered in the corresponding list, and if there is a software timer, determining whether the timer has expired, and the time of the software timer in the timer checking step. If the timer expires, the timer manager delivers the message and related information to the message router, and the timer expires step of returning to the timer checking step. If the current list number is greater than the number of lists in the list determining step, the message router sends a message to the specific job. relay If there is a message, the message need yahal transmission determines the itneu message router is characterized in that it is configured to terminate step of delivering a message to a particular work and shut down.

이하, 본 발명에 의한 소프트웨어 타이머의 구현 방법의 작용 및 효과를 첨부한 도 1 및 도 2를 참조하여 설명한다.Hereinafter, the operation and effect of the method of implementing the software timer according to the present invention will be described with reference to FIGS. 1 and 2.

도 1은 본 발명 새로운 소프트웨어 타이머를 등록하는 방법을 보인 예시도로서, 이에 도시된 바와 같이 소프트웨어 타이머 블럭은 세개의 리스트(10, 20, 30)와, 상기 리스트(10, 20, 30)에 만료시간 오름차순으로 연결된 각 소프트웨어 타이머(11, 12, 13, 21, 22, 31, 32)가 등록 되어 있다. 상기 소프트웨어 타이머(11,12, 13, 21, 22, 31, 32)는 해당 타이머의 아이디, 만료시간, 작업아이디, 메시지버퍼 및 연결정보로 구성 된다. 또한, 상기 각 소프트웨어 타이머 내부의 숫자는 만료시간을 표시 한다.1 is an exemplary view showing a method for registering a new software timer of the present invention. As shown in the drawing, a software timer block expires in three lists (10, 20, 30) and the lists (10, 20, 30). Each software timer (11, 12, 13, 21, 22, 31, 32) connected in ascending order of time is registered. The software timers 11, 12, 13, 21, 22, 31, and 32 are composed of a corresponding ID, expiration time, work ID, message buffer, and connection information. In addition, a number inside each software timer indicates an expiration time.

제1리스트(10)에 만료시간이 1인 소프트웨어 타이머(11), 만료시간이 2인 소프트웨어 타이머(12) 및 만료시간이 11인 소프트웨어 타이머(13)가, 제2리스트(20)에는 만료시간이 4인 소프트웨어 타이머(21) 및 만료시간이 7인 소프트웨어 타이머(22)가, 제3리스트(30)에는 만료시간이 3인 소프트웨어 타이머(31) 및 만료시간이 9인 소프트웨어 타이머(32)가 각각 만료시간 오름차순으로 등록되어 관리되고 있다.The first list 10 includes a software timer 11 having an expiration time of 1, a software timer 12 having an expiration time of 2, and a software timer 13 having an expiration time of 11, and an expiration time in a second list 20. The four-timer software timer 21 and the software timer 22 with an expiration time of seven are included. The third list 30 includes a software timer 31 with an expiration time of three and a software timer 32 with an expiration time of nine. Each is registered and managed in ascending order of expiration time.

상기의 상태에 만료시간이 6인 새로운 소프트웨어 타이머(23)를 등록하면 제1리스트(10)에는 3개의 소프트웨어 타이머(11, 12, 13)가, 제2리스트(20)에는 2개의 소프트웨어 타이머(21, 22)가, 제3리스트(30)에는 2개의 소프트웨어 타이머(31, 32)가 등록되어 있기 때문에 새로운 소프트웨어 타이머(23)는 소프트웨어 타이머가 가장 적게 등록된 리스트중에서 가장 빠른 제2리스트(20)에 등록 된다. 또한, 만료시간이 6이기 때문에 만료시간이 4인 소프트웨어 타이머(21)와 만료시간이 7인 소프트웨어 타이머(22)의 사이에 등록 된다.When the new software timer 23 having an expiration time of 6 is registered in the above state, three software timers 11, 12, and 13 are included in the first list 10, and two software timers (2) are registered in the second list 20. Since 21 and 22 have two software timers 31 and 32 registered in the third list 30, the new software timer 23 is the fastest second list 20 in the list with the lowest registered software timer. ) Is registered. In addition, since the expiration time is 6, it is registered between the software timer 21 with the expiration time 4 and the software timer 22 with the expiration time 7.

상기 각 리스트에 등록된 소프트웨어 타이머들을 관리하기 위해 필요한 구성요소는 사용자가 특정 작업에게 전달할 메시지를 소프트웨어 타이머에 등록 및 삭제하는 타이머 입출력부와, 하드웨어 타이머로 부터 주기적인 인터럽트를 받아 사용자에 의해 등록된 소프트웨어 타이머들을 관리하고 특정 소프트웨어 타이머가 종료되었을 경우 해당 메시지 및 관련정보들을 출력하는 타이머 관리부와, 상기 타이머 관리부로 부터 전달된 정보들을 이용하여 현재 동작하고 있는 특정 작업에게 사용자가 등록한 메시지를 전달하는 메시지 라우터로 구성 된다.The components necessary to manage the software timers registered in the respective lists include a timer input / output unit for registering and deleting a message to be delivered to a specific task by the user to the software timer, and receiving the periodic interruption from the hardware timer. A timer manager that manages software timers and outputs a corresponding message and related information when a specific software timer expires, and a message that transmits a message registered by a user to a specific job currently operating using information transmitted from the timer manager. It consists of a router.

도 2는 본 발명 소프트웨어 타이머의 구현 방법을 보인 순서도로서, 이에 도시된 바와 같이 하드웨어 타이머에서 주기적으로 발생되는 인터럽트를 감지하면 리스트의 값을 초기화하는 초기화단계(ST1)와, 현재 리스트 번호가 리스트의 갯수보다 작거나 같은가를 판단하는 리스트 판단단계(ST2)와, 상기 리스트 판단단계(ST2)에서 현재 리스트 번호가 리스트의 갯수보다 작거나 같으면 해당 리스트에 등록된 소프트웨어 타이머가 있는가를 판단하여 소프트웨어 타이머가 있으면 그 타이머의 시간이 만료되었는가를 판단하는 타이머 확인단계(ST3)와, 상기 타이머 확인단계(ST3)에서 소프트웨어 타이머의 시간이 만료되었다면 타이머 관리부는 해당 메시지 및 관련정보를 메시지 라우터에게 전달하여 저장하고, 해당 리스트에서 소프트웨어 타이머를 삭제 한 후 상기 타이머 확인단계(ST3)로 회귀하는 타이머 만료단계(ST4)와, 상기 타이머 확인단계(ST3)에서 해당 리스트에 등록된 소프트웨어 타이머가 없거나, 해당 리스트에 등록된 소프트웨어 타이머의 시간이 만료되지 않았다면 리스트의 숫자를 하나 증가시키고 상기 리스트 판단단계(ST2)로 회귀하는 리스트 증가단계(ST5)와, 상기 리스트 판단단계(ST2)에서 현재 리스트 번호가 리스트의 갯수보다 크다면 메시지 라우터가 특정 작업에게 전달해야할 메시지가 있느가를 판단하여 전달해야할 메시지가 있으면 메시지 라우터는 특정 작업에게 메시지를 전달하고 종료하고 전달해야할 메시지가 없으면 종료하는 종료하는 종료단계(ST6)로 구성되어 동작 된다.2 is a flowchart illustrating a method of implementing a software timer of the present invention. As shown in FIG. 2, an initialization step (ST1) of initializing a value of a list upon detecting an interrupt generated periodically by a hardware timer, and a current list number of A list determination step (ST2) for determining whether the number is less than or equal to the number; and if the current list number is less than or equal to the number of lists in the list determination step (ST2), it is determined whether there is a software timer registered in the list. Timer check step (ST3) to determine whether the time of the timer has expired, and if the time of the software timer has expired in the timer check step (ST3), the timer management unit delivers the message and related information to the message router, After deleting the software timer from the list If there is no software timer registered in the list in the timer expiration step (ST4) and the timer checking step (ST3), or if the time of the software timer registered in the list has not expired, the list is returned. If the current list number is greater than the number of lists in the list increasing step ST5 and the list determining step ST2 returns to the list determining step ST2, the message router should deliver the specific job to the specific job. If there is a message to be delivered by determining whether there is a message, the message router is configured and operated by a termination step (ST6) of delivering a message to a specific task, terminating, and terminating if there is no message to be delivered.

이상에서 상세히 설명한 바와 같이 본 발명은 하나의 하드웨어 타이머를 사용하여 다수의 소프트웨어 타이머를 생성할수 있으므로 많은 수의 타이머를 필요로하는 작업이나 멀티태스킹 작업을 용이하게 할수 있게 하는 효과가 있다.As described in detail above, the present invention can generate a plurality of software timers using one hardware timer, thereby facilitating a task requiring a large number of timers or a multitasking task.

Claims (4)

하드웨어 타이머의 인터럽트를 감지하면 검색할 리스트의 값을 초기화하는 초기화단계와, 현재 리스트 번호가 리스트의 갯수보다 작거나 같은가를 판단하는 리스트 판단단계와, 상기 리스트 판단단계에서 현재 리스트 번호가 리스트의 갯수보다 작거나 같으면 타이머 블럭의 해당 리스트에 등록된 소프트웨어 타이머가 있는가를 판단하여 소프트웨어 타이머가 있으면 그 소프트웨어 타이머의 시간이 만료되었는가를 판단하는 타이머 확인단계와, 상기 타이머 확인단계에서 시간이 만료된 소프트웨어 타이머가 있다면 해당 타이머의 관련정보를 저장하고 해당 타이머를 타이머 블럭에서 삭제한 후 상기 타이머 확인단계로 회귀하는 타이머 만료단계와, 상기 리스트 판단단계에서 현재 리스트 번호가 리스트의 갯수보다 크다면 상기 타이머 만료단계에서 저장된 해당 타이머와 관련된 특정 작업에게 메시지를 전달하는 종료단계로 구성된 것을 특징으로 하는 소프트웨어 타이머의 구현 방법.An initialization step of initializing the value of the list to be searched upon detecting an interrupt of the hardware timer, a list determination step of determining whether the current list number is less than or equal to the number of lists, and a number of lists of the current list number in the list determination step. If less than or equal to the timer check step of determining whether there is a software timer registered in the corresponding list of the timer block, and if there is a software timer, the timer check step of determining whether the time of the software timer has expired, A timer expiration step of storing the relevant information of the timer and deleting the timer from the timer block, and returning to the timer confirmation step; and if the current list number is greater than the number of lists in the list determination step, the timer expires step. And a termination step of delivering a message to a specific task associated with the stored timer. 제1항에 있어서, 타이머 확인단계에서 시간이 만료된 소프트웨어 타이머가 없다면 다음 리스트를 체크하기위해 리스트의 수를 하나 증가시키고 상기 리스트 판단단계로 회귀하는 것을 특징으로 하는 소프트웨어 타이머의 구현 방법.The method of claim 1, wherein if there is no software timer expired in the timer checking step, the number of lists is increased by one to check the next list, and the method returns to the list determining step. 제1항에 있어서, 타이머 블럭은 두 개 이상의 리스트로 이루어지고, 상기 각 리스트는 다수의 소프트웨어 타이머가 만료시간이 빠른 순서로 연결 될수 있도록이루어진 것을 특징으로 하는 소프트웨어 타이머의 구현 방법.The method of claim 1, wherein the timer block is composed of two or more lists, wherein each list is configured so that a plurality of software timers can be connected in a fast order of expiration time. 제1항 내지 제3항 중 어느 한 항에 있어서, 소프트웨어 타이머는 해당 타이머의 아이디와, 만료시간과, 작업 아이디와, 메시지 버퍼 및 연결정보를 포함하는 것을 특징으로 하는 소프트웨어 타이머의 구현 방법.4. The method according to any one of claims 1 to 3, wherein the software timer includes an ID of the timer, an expiration time, a job ID, a message buffer and connection information.
KR1020010026190A 2001-05-14 2001-05-14 Method to embody software timer KR20020087189A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020010026190A KR20020087189A (en) 2001-05-14 2001-05-14 Method to embody software timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020010026190A KR20020087189A (en) 2001-05-14 2001-05-14 Method to embody software timer

Publications (1)

Publication Number Publication Date
KR20020087189A true KR20020087189A (en) 2002-11-22

Family

ID=27704800

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020010026190A KR20020087189A (en) 2001-05-14 2001-05-14 Method to embody software timer

Country Status (1)

Country Link
KR (1) KR20020087189A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104040695A (en) * 2011-12-13 2014-09-10 朗姆研究公司 Electroless copper deposition
CN108874375A (en) * 2018-06-01 2018-11-23 深圳市茁壮网络股份有限公司 A kind of implementation method and device of timer

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104040695A (en) * 2011-12-13 2014-09-10 朗姆研究公司 Electroless copper deposition
CN108874375A (en) * 2018-06-01 2018-11-23 深圳市茁壮网络股份有限公司 A kind of implementation method and device of timer
CN108874375B (en) * 2018-06-01 2022-01-04 深圳市茁壮网络股份有限公司 Timer implementation method and device

Similar Documents

Publication Publication Date Title
CN108415811B (en) Method and device for monitoring business logic
CN109542718A (en) Monitoring method, device, storage medium and the server of service call
CN111970339A (en) Request control method and device and electronic equipment
CN106254537A (en) Interface interchange method and apparatus
KR20020087189A (en) Method to embody software timer
CN112351042B (en) Attack flow calculation method and device, electronic equipment and storage medium
JP5050432B2 (en) Client device and program
CN111221662B (en) Task scheduling method, system and device
CN111371558B (en) Block chain data processing method and device, electronic equipment and medium
CN107291757B (en) Pattern matching method and pattern matching device
JPH1153201A (en) Method and device for processing plural interruptions
JPH1157183A (en) Pachinko machine
CN111338937A (en) Method, device, equipment and medium for off-line intervention of applet
JP2003296289A (en) System, method, and program for load distribution
US7865643B2 (en) Communication system and protocol
JP2001297016A (en) Instruction execution system
JP5938740B2 (en) Determination apparatus, determination method, and computer program
KR100612455B1 (en) apparatus and method of Software Timer working management
JPH0628273A (en) Input telegraphic message distribution system
CN105100297A (en) Resource processing method and device
JPH1157184A (en) Pachinko machine
JP2848172B2 (en) I / O controller
CN115495675A (en) Query method, device and system for network service
CN112994707A (en) SAS scrambling code circuit
JP2002373035A (en) Method and device for generating reset signal

Legal Events

Date Code Title Description
N231 Notification of change of applicant
WITN Withdrawal due to no request for examination