KR100347518B1 - Method of Generating Periodic Time Signals - Google Patents

Method of Generating Periodic Time Signals Download PDF

Info

Publication number
KR100347518B1
KR100347518B1 KR1019990062280A KR19990062280A KR100347518B1 KR 100347518 B1 KR100347518 B1 KR 100347518B1 KR 1019990062280 A KR1019990062280 A KR 1019990062280A KR 19990062280 A KR19990062280 A KR 19990062280A KR 100347518 B1 KR100347518 B1 KR 100347518B1
Authority
KR
South Korea
Prior art keywords
time
time signal
value
operating system
periodic
Prior art date
Application number
KR1019990062280A
Other languages
Korean (ko)
Other versions
KR20010064146A (en
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 KR1019990062280A priority Critical patent/KR100347518B1/en
Publication of KR20010064146A publication Critical patent/KR20010064146A/en
Application granted granted Critical
Publication of KR100347518B1 publication Critical patent/KR100347518B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q3/00Selecting arrangements
    • H04Q3/42Circuit arrangements for indirect selecting controlled by common circuits, e.g. register controller, marker
    • H04Q3/54Circuit arrangements for indirect selecting controlled by common circuits, e.g. register controller, marker in which the logic circuitry controlling the exchange is centralised
    • H04Q3/545Circuit arrangements for indirect selecting controlled by common circuits, e.g. register controller, marker in which the logic circuitry controlling the exchange is centralised using a stored programme
    • H04Q3/54575Software application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2213/00Indexing scheme relating to selecting arrangements in general and for multiplex systems
    • H04Q2213/13214Clock signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2213/00Indexing scheme relating to selecting arrangements in general and for multiplex systems
    • H04Q2213/214Phase shifted impulses; Clock signals; Timing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Debugging And Monitoring (AREA)

Abstract

본 발명은 교환기시스템에서 주기적인 통계 기능과 같은 응용프로그램의 주기적인 수행을 위하여 운영체제에서 응용프로그램으로 지정된 시간에 주기적인 시간신호를 발생시키는 방법에 관한 것이다.The present invention relates to a method for generating a periodic time signal at a time designated as an application program in an operating system for periodic execution of an application program such as a periodic statistical function in an exchange system.

이러한 본 발명은, 응용프로그램이 주기적인 시간신호에 대한 시작 시각과, 시간신호간의 시간 간격, 및 반복 횟수 카운터를 지정하여 운영체제로 주기적 시간신호를 등록하는 제 1 단계와; 상기 운영체제가 절대 시간으로 지정된 시작 시각을 운영체제 내부의 기준 시각에 대한 상대값을 64비트 타이머 레지스터의 값으로 변환하고, 상기 변환된 주기적 시작 시각의 64비트 정수값과 주기값 및 반복 횟수 카운터를 시간신호 목록에 삽입 정렬하고, 상기 시간신호의 식별자를 응용프로그램으로 반환하는 제 2 단계; 상기 운영체제가 틱(tick)마다 발생하는 타이머 인터럽트에 대해 시간신호 처리데먼을 구동시키면, 상기 시간신호 처리데먼이 상기 64비트 타이머 레지스터에 저장된 현재 시각에 대한 64비트 정수값보다 작거나 같은 시간신호 목록의 시간신호들을 응용프로그램으로 발생시키는 제 3 단계; 및 상기 시간신호 처리데먼이 한 응용프로그램으로 시간신호를 반복 횟수 카운터만큼 발생시키고, 상기 시간신호를 목록에서 삭제하는 제 4 단계를 포함한다.The present invention includes a first step in which an application program registers a periodic time signal to an operating system by designating a start time for a periodic time signal, a time interval between time signals, and a repetition number counter; The operating system converts a start time designated as an absolute time into a value of a 64-bit timer register relative to a reference time inside the operating system, and sets a 64-bit integer value, a periodic value, and a repetition counter of the converted periodic start time. Inserting and sorting into a signal list and returning an identifier of the time signal to an application program; If the operating system drives a time signal processing daemon for a timer interrupt that occurs every tick, the time signal processing daemon is less than or equal to a 64-bit integer value for the current time stored in the 64-bit timer register. Generating a time signal of an application program; And a fourth step in which the time signal processing daemon generates a time signal by the number of repetition counters to one application program and deletes the time signal from the list.

Description

주기적인 시간신호 발생방법 {Method of Generating Periodic Time Signals}Periodic Time Signals {Method of Generating Periodic Time Signals}

본 발명은 교환기시스템에서 주기적인 통계 기능과 같은 응용프로그램의 주기적인 수행을 위하여 운영체제에서 응용프로그램으로 지정된 시간에 주기적인 시간신호를 발생시키는 방법에 관한 것이다.The present invention relates to a method for generating a periodic time signal at a time designated as an application program in an operating system for periodic execution of an application program such as a periodic statistical function in an exchange system.

종래에는 응용프로그램이 현재의 시각을 읽어들여 원하는 시각과의 델타값을 구한 후 운영체제로 상대 시간 타이머를 걸어 지정된 시간이 지난 후에 시간신호를 수신하였다. 이러한 방법은 상대 시간 타이머를 동작시킨 후에 시스템의 현재 시각이 변경될 경우에는 시간신호가 발생되는 시각이 원래 응용프로그램이 희망하였던 시간신호 발생시각과 상이하게 되는 문제점이 있었다.Conventionally, an application program reads a current time, obtains a delta value from a desired time, and receives a time signal after a specified time has elapsed by setting a relative time timer to the operating system. This method has a problem in that when the current time of the system is changed after operating the relative time timer, the time when the time signal is generated is different from the time signal generation time originally desired by the application program.

예를 들어, 교환기시스템의 Y2K 시험을 위하여 시스템의 현재 시각을 2000년 이후로 변경할 경우나, 교환기시스템의 현재 시각이 표준시간과 일치하지 않아 운용자가 이를 변경하는 경우에, 응용프로그램이 시간신호를 수신하는 시각이 원래 생각되었던 시각과 일치하지 않게 되어 주기적 통계 기능과 같은 응용프로그램이 엉뚱한 시간에 통계 데이터를 출력하게 되는 문제가 발생되었다.For example, if the current time of the system is changed after 2000 for the Y2K test of the exchange system, or if the operator changes it because the current time of the exchange system does not correspond to the standard time, the application signals the time signal. The received time did not match the originally expected time, causing applications such as periodic statistics to output statistical data at the wrong time.

따라서, 본 발명은 상기와 같은 종래기술의 문제점을 해결하기 위하여 안출된 것으로서, 교환기시스템에서 주기적인 통계 기능과 같은 응용프로그램의 주기적인 수행을 위하여 운영체제에서 응용프로그램으로 지정된 시간에 주기적인 시간신호를 발생시키는 방법을 제공하기 위한 것이다.Accordingly, the present invention has been made to solve the above problems of the prior art, the periodic time signal at the time specified as the application program in the operating system for the periodic execution of the application program, such as the periodic statistics function in the exchange system It is to provide a method for generating.

도 1은 본 발명의 한 실시예에 따른 주기적인 시간신호 발생방법의 소프트웨어 구조도,1 is a software structural diagram of a method for generating a periodic time signal according to an embodiment of the present invention;

도 2는 본 발명의 한 실시예에 따른 주기적인 시간신호 발생방법의 동작 흐름도이다.2 is a flowchart illustrating a method of generating a periodic time signal according to an embodiment of the present invention.

상기한 목적을 달성하기 위하여 본 발명에 따른 주기적인 시간신호 발생방법은, 교환기시스템에서 운영체제가 응용프로그램에게 주기적인 시간신호를 발생시키는 방법에 있어서,교환기 시스템 가동시 운영체제가 시간신호 처리데먼을 생성하고, 응용프로그램이 주기적인 시간신호에 대한 시작시각과 ,시간신호간의 시간간격, 및 반복횟수카운터를 지정하여 운영체제로 주기적 시간신호를 등록하는 제 1단계와;상기 운영체제가 절대 시간으로 지정된 시작 시각을 운영체제 내부의 기준 시각에 대한 상대값이고 64비트 정수값인 64비트 상대 시간값으로 변환하고, 상기 변환된 주기적 시작 시각의 64비트 정수값과 주기값 및 반복횟수카운터를 시간신호 목록에 삽입 하고 상기 64비트 정수값의 크기 순서대로 정렬하여 상기 시간신호목록을 응용프로그램으로 반환하는 제 2단계;상기 운영체제가 틱(tick)마다 발생하는 타이머 인터럽트에 대해 시간신호 처리데먼을 구동시키면, 상기 시간신호 처리데먼이 중앙처리장치의 64비트 타이머 레지스터 값을 읽어 운영체제내의 기준시각에 대한 상대값으로 변환한 현재 시간값보다 작거나 같은 시간신호 목록의 시간신호들을 응용프로그램으로 발생시키는 제 3단계; 및발생횟수가 반복횟수 카운터보다 작으면 상기 시간신호 처리데먼은 주기값을 64비트 값으로 변환하고 이 값을 64비트 값으로 변환한 현재 시각에 더하여 상기 목록에 재 저장하고 반복횟수 카운터를 감소시키며, 반복횟수 카운터만큼 발생시킨 다음에는 시간신호를 상기 목록에서 삭제하는 제 4단계를 포함하는 것을 특징으로 한다.In order to achieve the above object, the method for generating a periodic time signal according to the present invention is a method for generating a periodic time signal to an application program by an operating system in an exchange system, wherein the operating system generates a time signal processing daemon when the exchange system is operating. And a first step in which the application program registers the periodic time signal to the operating system by specifying a start time for the periodic time signal, a time interval between the time signals, and a repetition count counter; Is converted into a 64-bit relative time value that is a relative value to the reference time of the internal operating system and a 64-bit integer value, and the 64-bit integer value, the periodic value, and the repeat count counter of the converted periodic start time are inserted into the time signal list. An application program for sorting the time signal list in order of magnitude of the 64-bit integer value; The second step of returning to the; If the operating system drives the time signal processing daemon for a timer interrupt generated every tick, the time signal processing daemon reads the 64-bit timer register value of the central processing unit reference time in the operating system Generating, by an application program, time signals of a time signal list less than or equal to a current time value converted into a relative value for; And if the number of occurrences is less than the repetition counter, the time signal processing daemon converts the period value to a 64-bit value, stores it in the list in addition to the current time converted to the 64-bit value, and decreases the repetition counter. And a fourth step of deleting the time signal from the list after generating the number of repetition counters.

양호하게는, 상기 응용프로그램이 등록한 시간신호의 취소를 요청하는 제 5 단계와; 상기 응용프로그램으로부터 최소 요청이 수신되면 상기 운영체제가 상기 해당 시간신호를 목록에서 삭제하는 제 6 단계를 더 포함한 것을 특징으로 한다.Preferably, the fifth step of requesting the cancellation of the time signal registered by the application program; And if the minimum request is received from the application program, the operating system deletes the corresponding time signal from the list.

양호하게는, 상기 제 1 단계에서 상기 응용프로그램이 시작 시각을 "년월일시분초" 형태로 등록하면, 제 2 단계는 입력된 시작 시각을 현재 시각과 비교하여 과거일 경우에는 64비트 타이머 레지스터의 값을 0으로 설정하고 미래일 경우에는 지정된 시각을 운영체제 내부의 기준 시각으로 뺀 상대 시간을 64비트 정수의 값으로 변환하는 것을 특징으로 한다.Preferably, if the application registers the start time in the form of "year, month, date, minute, second" in the first step, the second step compares the input start time with the current time and, in the past, the value of the 64-bit timer register. Is set to 0 and in the future, the relative time obtained by subtracting the specified time from the reference time inside the operating system is converted into a 64-bit integer value.

양호하게는, 상기 제 1 단계에서 상기 응용프로그램이 시작 시각을 "시분초" 형태로 등록하면, 상기 제 2 단계는 현재 시각과 가장 가까운 미래의 년월일시분초를 선택하여 해당 시각을 운영체제 내부의 기준 시각으로 뺀 상대 시간을 64비트 정수의 값으로 변환하는 것을 특징으로 한다.Preferably, when the application registers the start time in the form of "hours and minutes" in the first step, the second step selects a future year, month, date, minute and second that is closest to the current time, and sets the corresponding time within the operating system. The relative time subtracted by time is converted into a 64-bit integer value.

보다 양호하게는, 상기 제 2 단계는, 상기 년월일시분초를 초-마이크로초의 형태로 변환하고, 상기 초와 마이크로초를 클럭값으로 곱한 후 1,000,000으로 나눈 값을 더하는 것을 특징으로 한다.More preferably, the second step is characterized by converting the year, month, date, time, seconds, seconds into microseconds, multiplying the seconds and microseconds by a clock value, and adding the value divided by 1,000,000.

보다 양호하게는, 운용자나 시간 동기화장치 또는 프로그램에 의해서 시스템의 현재 시각이 변경되면, 현재 시각의 변경에 대한 보정치를 등록된 시간신호 목록에 반영하는 제 7 단계를 더 포함한 것을 특징으로 한다.More preferably, when the current time of the system is changed by the operator or the time synchronization device or the program, a seventh step of reflecting the correction value for the change of the current time to the registered time signal list is further included.

또한, 본 발명에 따르면 상술한 바와 같은 주기적인 시간신호 발생방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체가 제공된다.According to the present invention, there is also provided a computer-readable recording medium having recorded thereon a program for executing the method of generating a periodic time signal as described above.

이하, 첨부된 도면을 참조하면서 본 발명의 한 실시예에 따른 "주기적인 시간신호 발생방법"을 보다 상세하게 설명하면 다음과 같다.Hereinafter, with reference to the accompanying drawings will be described in more detail the "periodical time signal generation method" according to an embodiment of the present invention.

도 1은 본 발명의 한 실시예에 따른 주기적인 시간신호 발생방법의 소프트웨어 구조도이다. 교환기시스템에는 실시간 운영체제로 SROS(Scalable Real-time Operating System)(11)가 실행되고, 그 상위에서 시간신호 처리 데먼(timesigd)(12)과 응용프로그램(13)들이 동작한다. 응용프로그램(13)이 주기적인 시간신호를 운영체제(11)로 등록하고, 운영체제(11)는 주기적으로 시간신호 처리데먼(12)을 수행시키며, 시간신호 처리데먼(12)은 운영체제(11)에 등록된 정보에 따라 응용프로그램(13)에게 시간신호를 발생시킨다.1 is a software structural diagram of a method for generating a periodic time signal according to an embodiment of the present invention. In the switch system, a scalable real-time operating system (SROS) 11 is executed as a real-time operating system, and a time signal processing daemon 12 and an application program 13 operate thereon. The application program 13 registers the periodic time signal to the operating system 11, the operating system 11 performs the time signal processing daemon 12 periodically, the time signal processing daemon 12 is provided to the operating system 11 The time signal is generated to the application program 13 according to the registered information.

도 2는 본 발명의 한 실시예에 따른 주기적인 시간신호 발생방법의 동작 흐름도이다. 응용프로그램은 주기적인 시간신호에 대한 시작 시각을 년월일시분초 혹은 시분초의 형태로 지정하고, 시간신호간의 시간 간격 즉 주기와 반복 횟수 카운터를 지정하여 운영체제로 주기적 시간신호를 등록한다(S21).2 is a flowchart illustrating a method of generating a periodic time signal according to an embodiment of the present invention. The application program registers the periodic time signal to the operating system by specifying a start time for the periodic time signal in the form of year, month, day, hour, minute, hour, and hour, and specifying a time interval between time signals, that is, a cycle and a repetition count counter (S21).

다음, 운영체제는 지정된 시작 시각을 운영체제 내부의 기준 시각에 대한 상대값을 표현하는 64비트 타이머 레지스터의 값으로 변환한다. 이는 지정된 시각을 형태 변경없이 등록할 경우 매번 조회할 때마다 많은 시간이 소요되기 때문에 지정된 시각을 64비트 정수의 형태로 변환하여 저장하는 것이다. 이때, 지정된 시작 시각이 년월일시분초일 경우에는 현재 시각과 비교하여 과거일 경우에는 64비트 타이머 레지스터의 값을 0으로 설정하고 미래일 경우에는 지정된 시각을 운영체제 내부의 기준 시각으로 뺀 상대 시간을 64비트 정수의 값으로 변환한다. 지정된 시작 시각이 시분초일 경우에는 현재 시각과 가장 가까운 미래의 년월일시분초를 선택하여 해당 시각을 운영체제 내부의 기준 시각으로 뺀 상대 시간을 64비트 정수의 값으로 변환한다. 변환식은 적용시스템의 중앙처리장치에 의존적이며 중앙처리장치 하드웨어에서 정의되는 클럭값을 대입하여 변환하는데, 먼저 년월일시분초를 초-마이크로초의 형태로 변환하고 여기에서 초를 클럭값으로 곱하고, 마이크로초를 클럭 값으로 곱한 후 1,000,000으로 나눈 값을 더한다. 운영체제는 이렇게 변환된 주기적 시간신호의 시작 시각에 대한 64비트 정수값과 주기 및 반복 횟수 카운터를 시간신호 목록에 등록하는데, 목록은 시작 시각에 대한 64비트 정수값으로 정렬되므로, 정렬 순서에 맡게 새로운 시간신호를 목록에 삽입한다. 운영체제는 새로이 삽입한 시간신호에 대한 시간신호 아이디를 응용프로그램으로 반환한다(S22).The operating system then converts the specified start time into a value of a 64-bit timer register representing a relative value to a reference time within the operating system. This means that if a registered time is registered without changing its shape, it takes a lot of time every time it is inquired, so that the specified time is converted into a 64-bit integer and stored. At this time, if the specified start time is year, month, date, minute, second, it is compared with the current time. In the past, the value of the 64-bit timer register is set to 0. In the future, the relative time obtained by subtracting the specified time from the internal time of the operating system is 64. Convert to a bit integer value. If the specified start time is hour and minute seconds, then the year, month, and day of the future closest to the current time are selected, and the relative time obtained by subtracting the time from the internal time of the operating system is converted to a 64-bit integer value. The conversion equation is dependent on the central processing unit of the application system and is converted by substituting the clock value defined in the central processing unit hardware, first converting the year, month, date, minute, and second into microseconds, and multiplying the seconds by the clock value, then the microseconds. Multiply by the clock value and divide by 1,000,000. The operating system registers the 64-bit integer value for the start time of the converted periodic time signal and the period and repeat count counter in the time signal list. The list is sorted by the 64-bit integer value for the start time. Insert a time signal into the list. The operating system returns the time signal ID for the newly inserted time signal to the application program (S22).

다음, 운영체제는 통상적으로 틱(tick)이라고 부르는 1/60초 혹은 1/100초 마다 발생하는 타이머 인터럽트에 대해 인터럽트 서비스 루틴에서 시간신호 처리 데먼을 구동시킨다. 이는 운영체제가 직접 시간신호를 처리할 경우 이것이 타이머 인터럽트에 의한 인터럽트 서비스 루틴이므로 인터럽트 마스킹 시간이 길어져서 전체 시스템의 성능이 저하되고, 시스템의 무응답 시간이 발생하기 때문에 그 작업을 시스템 데먼에게 맡기는 것이다. 이렇게 매 틱마다 구동되는 시간신호 처리데먼은 하드웨어적으로 구동되는 중앙처리장치의 64비트 타이머 레지스터의 값을 읽고, 이 64비트 정수값은 운영체제 내의 기준 시각에 대한 상대값으로서 현재 시각을 표시한다. 시간신호 처리데먼은 이렇게 현재 시각을 나타내는 64비트 정수값을 등록된 시간신호 목록의 64비트 정수값과 대소 비교를 수행한다. 대소 비교의 결과, 목록의 64비트 정수값이 더 작거나 같을 경우에는 시그널 발생 시간이 된 것이므로 시간신호 처리 데먼이 응용프로그램으로 시간신호를 발생시킨다(S23).The operating system then runs a time signal processing daemon in an interrupt service routine for timer interrupts that occur every 1/60 or 1/100 second, commonly called ticks. This is because when the operating system processes the time signal directly, it is an interrupt service routine by timer interrupt, so the interrupt masking time becomes longer and the performance of the whole system is degraded and the system non-response time is left to the system daemon. In this way, the time signal processing daemon driven every tick reads the value of the 64-bit timer register of the hardware processor, and the 64-bit integer value represents the current time as a relative value of the reference time in the operating system. The time signal processing daemon compares the 64-bit integer value representing the current time with the 64-bit integer value of the registered time signal list. As a result of the large and small comparison, when the 64-bit integer value of the list is smaller than or equal to the list, the signal generation time is reached, so the time signal processing daemon generates a time signal to the application program (S23).

다음, 시간신호 처리데먼이 목록상의 한 시간신호에 대해 응용프로그램으로 시그널을 발생시킨 후에, 반복 횟수 카운터를 참조하여 반복을 완료한 경우에는 해당 시간신호를 목록에서 삭제한다. 아직 더 반복하여야 할 경우에는 주기값을 현재의 64비트 정수값에 더하여 이를 목록에 재삽입한다. 이때도 목록은 시작 시각에 대한 64비트 정수값으로 정렬되므로, 정렬 순서에 맡게 해당 시간신호를 목록에 재삽입하고, 반복 횟수 카운터를 감소시킨다(S24).Next, after the time signal processing daemon generates a signal to the application program for a time signal on the list, the time signal is deleted from the list when the repetition is completed by referring to the repetition counter. If you still need to repeat it further, add the period value to the current 64-bit integer value and reinsert it into the list. In this case, since the list is sorted by a 64-bit integer value for the start time, the corresponding time signal is reinserted into the list so as to be sorted, and the number of repetition counters is decreased (S24).

만약 임의의 시간에 응용프로그램이 이전에 등록한 시간신호의 취소를 요청할 경우에, 응용프로그램은 최초 등록시에 반환된 시간신호 아이디와 함께 운영체제로 취소를 요청한다(S25). 이때, 운영체제는 이러한 응용프로그램의 최소 요청에 대해 시간신호 목록에서 해당 시간신호를 삭제한다(S26).If at any time the application program requests cancellation of a previously registered time signal, the application program requests cancellation to the operating system with the time signal ID returned at the time of initial registration (S25). At this time, the operating system deletes the corresponding time signal from the time signal list for the minimum request of the application program (S26).

또한, 만약 임의의 시간에 운용자에 의해서나 혹은 시간 동기화장치나 프로그램에 의해서 시스템의 현재 시각이 변경되면(S27), 현재 시각의 변경에 대한 보정치를 등록된 시간신호 목록에 반영한다. 이때, 이전의 시스템 시각이 tod_old라 하고 새로운 시스템 시각이 tod_new라고 하며, 시스템의 시각 변경에 대한 델타값을 tod_delta = abs(tod_new - tod_old)로 정의한다. 이 델타 값을 64비트 정수로 변환한 값을 tod_delta_rtc라고 할 때, 지정된 시작 시각이 년월일시분초이었을 경우에는 시작 시각에 해당하는 64비트 정수의 값을 tod_delta_rtc 만큼 (tod_new - tod_old) 의 부호값에 따라 더하거나 빼주는 보정을 한다. 지정된 시작 시각이 시분초이었을 경우에는 현재 시각과 가장 가까운 미래의 년월일시분초를 선택하여 해당 시각을 운영체제 내부의 새로운 기준 시각(tod_new)으로 뺀 상대 시간을 64비트 정수의 값으로 변환하여 해당 시간신호의 시작 시각에 대한 64비트 정수값으로 변경한다. 이렇게 현재 시각의 변경에 대한 보정치를 등록된 시간신호 목록에 반영하면, 시작 시간에 대해 순차적으로 정렬되었던 시간신호 목록의 정렬 순서가 시분초로 지정되었던 시간신호의 변경에 의해 어긋나게 된다. 그러므로 등록된 시간신호 목록 전체를 다시 시작 시간에 대해 순차적으로 정렬한다(S28).In addition, if the current time of the system is changed by the operator at any time or by a time synchronization device or a program (S27), the correction value for the change of the current time is reflected in the registered time signal list. At this time, the old system time is called tod_old and the new system time is called tod_new, and the delta value for the time change of the system is defined as tod_delta = abs (tod_new-tod_old). When tod_delta_rtc converts this delta value to a 64-bit integer, if the specified start time is year, month, date, time, seconds, the 64-bit integer value corresponding to the start time is based on the signed value of (tod_new-tod_old) by tod_delta_rtc. Make corrections to add or subtract. If the specified start time was hour and minute seconds, the date and time of the future nearest to the current time are selected, and the relative time obtained by subtracting the time by the new reference time (tod_new) inside the operating system is converted to a 64-bit integer value. Change to a 64-bit integer for the start time of. When the correction value for the change of the current time is reflected in the registered time signal list, the sorting order of the time signal list sequentially sorted with respect to the start time is shifted due to the change of the time signal designated as the hour and minute seconds. Therefore, the entire registered time signal list is sorted sequentially with respect to the start time (S28).

위에서 양호한 실시예에 근거하여 이 발명을 설명하였지만, 이러한 실시예는 이 발명을 제한하려는 것이 아니라 예시하려는 것이다. 이 발명이 속하는 분야의 숙련자에게는 이 발명의 기술사상을 벗어남이 없이 위 실시예에 대한 다양한 변화나 변경 또는 조절이 가능함이 자명할 것이다. 그러므로, 이 발명의 보호범위는 첨부된 청구범위에 의해서만 한정될 것이며, 위와 같은 변화예나 변경예 또는 조절예를 모두 포함하는 것으로 해석되어야 할 것이다.While the invention has been described above based on the preferred embodiments thereof, these embodiments are intended to illustrate rather than limit the invention. It will be apparent to those skilled in the art that various changes, modifications, or adjustments to the above embodiments can be made without departing from the spirit of the invention. Therefore, the protection scope of the present invention will be limited only by the appended claims, and should be construed as including all such changes, modifications or adjustments.

이상과 같이 본 발명에 의하면, 교환기시스템에서 주기적인 통계기능과 같은 응용프로그램의 주기적인 수행을 위하여 운영체제에서 응용프로그램으로 지정된 시간에 주기적인 시간신호를 발생시키는 방법이 제공되는 바, 교환기시스템의 현재 시각 변경과 관계없이 주기적인 시간신호가 정확하게 발생하여 응용프로그램이 정확하게 동작하는 효과가 있다.As described above, the present invention provides a method for generating a periodic time signal at a time designated as an application program in an operating system for periodic execution of an application program such as a periodic statistical function in an exchange system. Regardless of the time change, the periodic time signal is generated accurately, so that the application can operate correctly.

Claims (7)

교환기시스템에서 운영체제가 응용프로그램에게 주기적인 시간신호를 발생시키는 방법에 있어서,In a method in which an operating system generates a periodic time signal to an application program in an exchange system, 교환기 시스템 가동시 운영체제가 시간신호 처리데먼을 생성하고, 응용프로그램이 주기적인 시간신호에 대한 시작시각과 ,시간신호간의 시간간격, 및 반복횟수카운터를 지정하여 운영체제로 주기적 시간신호를 등록하는 제 1단계와;The operating system generates a time signal processing daemon when the exchange system is running, and the application program registers the periodic time signal to the operating system by specifying a start time for the periodic time signal, a time interval between the time signals, and a repetition count counter. Steps; 상기 운영체제가 절대 시간으로 지정된 시작 시각을 운영체제 내부의 기준 시각에 대한 상대값이고 64비트 정수값인 64비트 상대 시간값으로 변환하고, 상기 변환된 주기적 시작 시각의 64비트 정수값과 주기값 및 반복횟수카운터를 시간신호 목록에 삽입 하고 상기 64비트 정수값의 크기 순서대로 정렬하여 상기 시간신호목록을 응용프로그램으로 반환하는 제 2단계;The operating system converts a start time designated as an absolute time into a 64-bit relative time value which is a relative value to a reference time inside the operating system and is a 64-bit integer value, and the 64-bit integer value, the periodic value, and the repetition of the converted periodic start time. Inserting a count counter into a time signal list and sorting in order of magnitude of the 64-bit integer value to return the time signal list to an application program; 상기 운영체제가 틱(tick)마다 발생하는 타이머 인터럽트에 대해 시간신호 처리데먼을 구동시키면, 상기 시간신호 처리데먼이 중앙처리장치의 64비트 타이머 레지스터 값을 읽어 운영체제내의 기준시각에 대한 상대값으로 변환한 현재 시간값보다 작거나 같은 시간신호 목록의 시간신호들을 응용프로그램으로 발생시키는 제 3단계; 및When the operating system drives the time signal processing daemon for a timer interrupt generated every tick, the time signal processing daemon reads the 64-bit timer register value of the central processing unit and converts it into a relative value with respect to the reference time in the operating system. Generating a time signal of a time signal list of less than or equal to a current time value to an application program; And 발생횟수가 반복횟수 카운터보다 작으면 상기 시간신호 처리데먼은 주기값을 64비트 값으로 변환하고 이 값을 64비트 값으로 변환한 현재 시각에 더하여 상기 목록에 재 저장하고 반복횟수 카운터를 감소시키며, 반복횟수 카운터만큼 발생시킨 다음에는 시간신호를 상기 목록에서 삭제하는 제 4단계를 포함하는 주기적인 시간신호 발생방법.If the number of occurrences is less than the repetition counter, the time signal processing daemon converts the period value to a 64-bit value, adds it to the current time converted to the 64-bit value, and stores it in the list and decrements the repetition counter. And a fourth step of deleting the time signal from the list after generating the number of repetition counters. 제 1 항에 있어서, 상기 응용프로그램이 등록한 시간신호의 취소를 요청하는 제 5 단계와;The method of claim 1, further comprising: a fifth step of requesting cancellation of a time signal registered by the application program; 상기 응용프로그램으로부터 최소 요청이 수신되면 상기 운영체제가 상기 해당 시간신호를 목록에서 삭제하는 제 6 단계를 더 포함한 것을 특징으로 하는 주기적인 시간신호 발생방법.And a sixth step of deleting, by the operating system, the corresponding time signal from the list when a minimum request is received from the application program. 제 1 항에 있어서, 상기 제 1 단계에서 상기 응용프로그램이 시작 시각을 "년월일시분초" 형태로 등록하면,The method of claim 1, wherein, in the first step, when the application program registers a start time in the form of "year month date hour minute second", 제 2 단계는, 입력된 시작 시각을 현재 시각과 비교하여 과거일 경우에는 64비트 타이머 레지스터의 값을 0으로 설정하고 미래일 경우에는 지정된 시각을 운영체제 내부의 기준 시각으로 뺀 상대 시간을 64비트 정수의 값으로 변환하는 것을 특징으로 하는 주기적인 시간신호 발생방법.The second step is to compare the input start time with the current time and set the value of the 64-bit timer register to 0 in the past, and in the future, the relative time obtained by subtracting the specified time from the reference time inside the operating system. Periodic time signal generation method characterized in that the conversion to the value of. 제 1 항에 있어서, 상기 제 1 단계에서 상기 응용프로그램이 시작 시각을 "시분초" 형태로 등록하면, 현재 시각과 가장 가까운 미래의 년월일시분초를 선택하여 해당 시각을 운영체제 내부의 기준 시각으로 뺀 상대 시간을 64비트 정수의 값으로 변환하는 것을 특징으로 하는 주기적인 시간신호 발생방법.The method of claim 1, wherein, in the first step, when the application registers a start time in the form of "hour, minute, second", the date, time, and second of the future closest to the current time are selected and the corresponding time is subtracted from the internal time of the operating system. A periodic time signal generation method, characterized by converting a relative time into a 64-bit integer value. 제 3 항 또는 제 4 항에 있어서, 상기 제 2 단계는,The method of claim 3 or 4, wherein the second step, 상기 년월일시분초를 초-마이크로초의 형태로 변환하고, 상기 초와 마이크로초를 클럭값으로 곱한 후 1,000,000으로 나눈 값을 더하는 것을 특징으로 하는 주기적인 시간신호 발생방법.And converting the year, month, date, minute, and second into seconds and microseconds, multiplying the seconds and microseconds by a clock value, and dividing by 1,000,000. 제 1 항에 또는 제 2 항에 있어서, 운용자나 시간 동기화장치 또는 프로그램에 의해서 시스템의 현재 시각이 변경되면, 현재 시각의 변경에 대한 보정치를 등록된 시간신호 목록에 반영하는 제 7 단계를 더 포함한 것을 특징으로 하는 주기적인 시간신호 발생방법.The method according to claim 1 or 2, further comprising the seventh step of reflecting a correction value for the change of the current time in the registered time signal list when the current time of the system is changed by an operator, a time synchronization device, or a program. Periodic time signal generation method characterized in that. 교환기시스템,Exchange system, 교환기 시스템 가동시 운영체제가 시간신호 처리데먼을 생성하고, 응용프로그램이 주기적인 시간신호에 대한 시작시각과 ,시간신호간의 시간간격, 및 반복횟수카운터를 지정하여 운영체제로 주기적 시간신호를 등록하는 제 1단계와;The operating system generates a time signal processing daemon when the exchange system is running, and the application program registers the periodic time signal to the operating system by specifying a start time for the periodic time signal, a time interval between the time signals, and a repetition count counter. Steps; 상기 운영체제가 절대 시간으로 지정된 시작 시각을 운영체제 내부의 기준 시각에 대한 상대값이고 64비트 정수값인 64비트 상대 시간값으로 변환하고, 상기 변환된 주기적 시작 시각의 64비트 정수값과 주기값 및 반복횟수카운터를 시간신호 목록에 삽입 하고 상기 64비트 정수값의 크기 순서대로 정렬하여 상기 시간신호목록을 응용프로그램으로 반환하는 제 2단계;The operating system converts a start time designated as an absolute time into a 64-bit relative time value which is a relative value to a reference time inside the operating system and is a 64-bit integer value, and the 64-bit integer value, the periodic value, and the repetition of the converted periodic start time. Inserting a count counter into a time signal list and sorting in order of magnitude of the 64-bit integer value to return the time signal list to an application program; 상기 운영체제가 틱(tick)마다 발생하는 타이머 인터럽트에 대해 시간신호 처리데먼을 구동시키면, 상기 시간신호 처리데먼이 중앙처리장치의 64비트 타이머 레지스터 값을 읽어 운영체제내의 기준시각에 대한 상대값으로 변환한 현재 시간값보다 작거나 같은 시간신호 목록의 시간신호들을 응용프로그램으로 발생시키는 제 3단계; 및When the operating system drives the time signal processing daemon for a timer interrupt generated every tick, the time signal processing daemon reads the 64-bit timer register value of the central processing unit and converts it into a relative value with respect to the reference time in the operating system. Generating a time signal of a time signal list of less than or equal to a current time value to an application program; And 발생횟수가 반복횟수 카운터보다 작으면 상기 시간신호 처리데먼은 주기값을 64비트 값으로 변환하고 이 값을 64비트 값으로 변환한 현재 시각에 더하여 상기 목록에 재 저장하고 반복횟수 카운터를 감소시키며, 반복횟수 카운터만큼 발생시킨 다음에는 시간신호를 상기 목록에서 삭제하는 제 4단계를 포함하는 주기적인 시간신호 발생방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.If the number of occurrences is less than the repetition counter, the time signal processing daemon converts the period value to a 64-bit value, adds it to the current time converted to the 64-bit value, and stores it in the list and decrements the repetition counter. A computer-readable recording medium having recorded thereon a program for executing a periodic time signal generating method comprising the step of deleting the time signal from the list after generating the number of repetition counters.
KR1019990062280A 1999-12-24 1999-12-24 Method of Generating Periodic Time Signals KR100347518B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019990062280A KR100347518B1 (en) 1999-12-24 1999-12-24 Method of Generating Periodic Time Signals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019990062280A KR100347518B1 (en) 1999-12-24 1999-12-24 Method of Generating Periodic Time Signals

Publications (2)

Publication Number Publication Date
KR20010064146A KR20010064146A (en) 2001-07-09
KR100347518B1 true KR100347518B1 (en) 2002-08-07

Family

ID=19629830

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019990062280A KR100347518B1 (en) 1999-12-24 1999-12-24 Method of Generating Periodic Time Signals

Country Status (1)

Country Link
KR (1) KR100347518B1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4284854A (en) * 1979-06-29 1981-08-18 Northern Telecom Limited Universal signal generator for generating telephone system high level signals
JPH05119170A (en) * 1991-10-29 1993-05-18 Nec Corp Method for generating time signal
JPH06189353A (en) * 1992-12-22 1994-07-08 Nec Corp Command control system for period ic program starting at predetermined time
JPH07234290A (en) * 1994-02-24 1995-09-05 Nec Corp Time signal servicing device
KR19990043756A (en) * 1997-11-29 1999-06-15 정선종 How to create and run a real-time task that runs periodically

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4284854A (en) * 1979-06-29 1981-08-18 Northern Telecom Limited Universal signal generator for generating telephone system high level signals
JPH05119170A (en) * 1991-10-29 1993-05-18 Nec Corp Method for generating time signal
JPH06189353A (en) * 1992-12-22 1994-07-08 Nec Corp Command control system for period ic program starting at predetermined time
JPH07234290A (en) * 1994-02-24 1995-09-05 Nec Corp Time signal servicing device
KR19990043756A (en) * 1997-11-29 1999-06-15 정선종 How to create and run a real-time task that runs periodically

Also Published As

Publication number Publication date
KR20010064146A (en) 2001-07-09

Similar Documents

Publication Publication Date Title
US5826066A (en) Method for keeping accurate time in a computer system
JP4856503B2 (en) System and method for steering a TOD clock
EP0892335B1 (en) System and method for mapping processor clock values in a multiprocessor system
JP2006079625A (en) System and method for coordinating actions of a plurality of devices
CN111831056A (en) Real-time clock calibration module and method and real-time clock chip
Hary et al. On the performance and stability of human metronome‐synchronization strategies
JP2000339058A (en) Clock resolution extending device
KR100347518B1 (en) Method of Generating Periodic Time Signals
EP0681272A2 (en) Apparatus and method for determining a time that a system's main power was inactive
JP2003207586A (en) Electronic equipment and its internal time information control method
EP1014234A3 (en) Clock or watch having accuracy-improving function
CN111614428A (en) Method and device for improving synchronization precision among multiple clocks
JP3457416B2 (en) Timer correction device for computer system
JP2005121396A (en) Device and method for preparing time information
JPH06232699A (en) Pulse generator
CN116736935A (en) Event time calibration method, system, equipment and medium
US20240048469A1 (en) Circuit and Method for Timestamp Jitter Reduction
JPH10253778A (en) Time exchanging clock system
US20240039822A1 (en) Circuit and Method for Timestamp Filtering with RLS Filter
KR960035396A (en) Color signal sampling method
KR102388889B1 (en) Time synchronizing device, time synchronizing method, and time synchronizing program stored in recording medium
CN101166184B (en) Measurement method and device for NTP software time hardware
KR100475435B1 (en) Method for correcting clock of processor
JP2001195265A (en) Job scheduling method and recording medium
CN117826934A (en) Clock combination processing method, device, equipment and medium based on Linux system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee