KR20080050117A - Method and system for enhancing the reliability of embedded software - Google Patents
Method and system for enhancing the reliability of embedded software Download PDFInfo
- Publication number
- KR20080050117A KR20080050117A KR1020060120953A KR20060120953A KR20080050117A KR 20080050117 A KR20080050117 A KR 20080050117A KR 1020060120953 A KR1020060120953 A KR 1020060120953A KR 20060120953 A KR20060120953 A KR 20060120953A KR 20080050117 A KR20080050117 A KR 20080050117A
- Authority
- KR
- South Korea
- Prior art keywords
- error
- handler
- software
- information
- event
- Prior art date
- Legal status (The legal status 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 status listed.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
본 발명은 임베디드 소프트웨어의 신뢰도를 강화하기 위한 방법 및 시스템에 관한 것이다.The present invention relates to a method and system for enhancing the reliability of embedded software.
본 발명에 따른 임베디드 소프트웨어의 신뢰도를 강화하기 위한 방법은 소프트웨어의 소스 코드에 추가된 에러 검출 구문에 따라 소스 코드의 에러를 검출하고, 검출된 에러 정보를 전달받아, 에러 정보를 기초로 에러를 처리함으로써, 임베디드 컴퓨터 시스템의 운영체제, 미들웨어, 그리고 응용 프로그램의 오류를 인식할 수 있는 효과가 있다.The method for enhancing the reliability of embedded software according to the present invention detects an error of the source code according to an error detection syntax added to the source code of the software, receives the detected error information, and processes the error based on the error information. By doing so, the operating system, middleware, and application programs of the embedded computer system can recognize errors.
Description
도 1은 본 발명의 일 실시예에 따른 임베디드 소프트웨어의 신뢰도 강화 시스템의 전체 구성을 개략적으로 도시한 도면이다.1 is a diagram schematically showing the overall configuration of a system for enhancing the reliability of embedded software according to an embodiment of the present invention.
도 2는 본 발명의 다른 실시예에 따른 에러 검출기의 구성을 개략적으로 도시한 도면이다.2 is a view schematically showing the configuration of an error detector according to another embodiment of the present invention.
도 3은 본 발명의 또 다른 실시예에 따른 에러 검출 방법을 설명하는 흐름도이다.3 is a flowchart illustrating an error detection method according to another embodiment of the present invention.
도 4는 본 발명의 또 다른 실시예에 따른 에러 핸들러 동작 알고리즘을 설명하기 위한 흐름도이다.4 is a flowchart illustrating an error handler operation algorithm according to another embodiment of the present invention.
도 5는 본 발명의 또 다른 실시예에 따른 에러 핸들러 동작 알고리즘을 설명하기 위한 흐름도이다.5 is a flowchart illustrating an error handler operation algorithm according to another embodiment of the present invention.
도 6은 본 발명의 또 다른 실시예에 따른 시뮬레이터를 이용한 신뢰도 강화 시스템의 전체 구성을 개략적으로 도시한 도면이다.6 is a diagram schematically showing the overall configuration of a system for enhancing reliability using a simulator according to another embodiment of the present invention.
<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>
110: 에러 검출기 120: 에러 핸들러110: error detector 120: error handler
130: 이벤트 로거 140: 큐(queue)130: event logger 140: queue
106: 사용자 핸들러 121: 디폴트 핸들러106: user handler 121: default handler
111: 입력 검사부 112: 전 상태 검사부111: input inspection unit 112: all state inspection unit
113: 처리부 114: 출력 검사부 113: processing unit 114: output inspection unit
115: 후 상태 검사부 115: post-state inspection unit
본 발명의 소프트웨어의 에러 검출에 관한 것으로, 더 상세하게는 임베디드 소프트웨어의 에러를 효과적으로 검출하여 임베디드 소프트웨어의 신뢰도를 강화하기 위한 방법 및 시스템에 관한 것이다.The present invention relates to error detection of software of the present invention, and more particularly, to a method and system for effectively detecting an error of embedded software to enhance reliability of embedded software.
임베디드 시스템은 마이크로 프로세서 혹은 마이크로 컨트롤러를 내장(embedded)하여 원래 제작자가 지정한 기능만을 수행하는 장치를 의미하여, 일반적으로 보다 큰 시스템의 일부로서 특별한 업무를 수행하기 위한 하드웨어와 소프트웨어를 포함하고 있는 특정한 응용시스템을 말한다.An embedded system is a device that embeds a microprocessor or microcontroller to perform only the functions specified by the original manufacturer. Generally, an embedded system is a specific application that includes hardware and software to perform special tasks as part of a larger system. Say the system.
이러한 임베디드 시스템은 다양한 응용분야, 예를 들면 공장자동화, 가정자동화, 로봇제어, 공정제어를 포함하는 제어분야, 핸드폰, PDA, 스마트폰, LBS 등을 포함하는 단말기기 분야, 프린터, 인터넷 냉장고, 게임기, HDTV 등을 포함하는 정보가전기기 분야, 교환기, 라우터, 홈서버, 홈 게이트웨이 등을 포함하는 네트워크 기기 분야 등 다양하게 적용되고 있다.Such embedded systems are used in various application fields, such as factory automation, home automation, robot control, process control including process control, terminal device fields including mobile phones, PDAs, smartphones, LBSs, printers, Internet refrigerators, and game machines. , Information including HDTV, etc. are being applied to various fields such as electric appliance field, network device field including exchange, router, home server, home gateway and the like.
최근, 임베디드 컴퓨터 시스템의 하드웨어 사양이 고성능화되어 가고 있으며 다양한 전자제품이 융복합화 되고 있다. 이러한 추세로 인하여 임베디드 소프트웨어의 복잡도는 점점 증가하고 있는 추세이다. 이에 반하여 사용자의 다양한 수요와 빠른 수요의 변화로 인하여 제품의 시장 주기는 짧아지고 있는 실정이다. In recent years, hardware specifications of embedded computer systems have been increasing in performance, and various electronic products have been converged. Due to this trend, the complexity of embedded software is increasing. On the contrary, the market cycle of products is shortened due to various demands of users and rapid changes in demand.
이러한 최근의 추세에 따라 복잡한 소프트웨어를 빠르게 개발하다 보면 소프트웨어의 버그는 증가하고, 소프트웨어의 안정성은 저하하게 된다. As a result of these recent trends, the rapid development of complex software leads to an increase in software bugs and a decrease in software stability.
종래의 소프트웨어의 확인 및 검증은 모델링 검사(Modeling Checking) 기법으로, 소프트웨어 모델을 추출하여 FSM(finite state machine) 형식의 모델을 검증하는 것이다. 하지만, 이러한 기법은 실제 소프트웨어와 모델 사이의 차이로 인한 부정확성, 복잡한 모델링 과정 등의 문제점이 있을 뿐만 아니라, 소프트웨어의 복잡도가 증가하는 상황에 대처하기 어려웠다. Conventional software verification and verification is a modeling checking technique, which extracts a software model and verifies a model in a finite state machine (FSM) format. However, these techniques not only have inaccuracies due to the difference between the actual software and the model, and complicated modeling processes, but also have difficulty coping with increasing software complexity.
또한, Abstract Interpretation 기법은 관심 구문을 가상 기계에 대한 임의의 구문으로 치환하여 컴파일 시점 또는 런 타임 시점에 가상 기계에서 오류의 확인 및 검증을 수행하는 기법이지만, 전술한 것과 마찬가지의 한계를 지니고 있다.In addition, the Abstract Interpretation technique is a technique for checking and verifying an error in a virtual machine at compile time or runtime time by substituting a syntax of interest with an arbitrary syntax for a virtual machine, but has the same limitation as described above.
또한, 종래의 런 타임 체커(Run-Time Checker) 기법은 소스 코드에 오류를 검출하는 루틴을 추가하여, 오류가 검출되면 이를 적절하게 처리하는 것이다. 하지만, 많은 수의 운영체제 중에서 이러한 오류 검출을 지원하는 것과 오류 처리를 지원하는 운영체제는 많지 않으며, 오류 검출과 오류 처리를 지원하는 운영체제라도 자신의 애플리케이션에 대해서만 오류의 검출이 가능하다는 한계가 있었다.In addition, the conventional run-time checker technique adds a routine to detect an error in the source code, and handles it properly when an error is detected. However, there are not many operating systems that support such error detection and error handling among a large number of operating systems, and even operating systems that support error detection and error handling have limitations in that they can detect errors only for their own applications.
한편, 전술한 소프트웨어의 오류를 검출하는 기법들은 많은 종류의 오류에 모두 대처하지는 못하였다. 또한, 애플리케이션의 오류를 유발하는 아주 짧은 시간에 발생하는 예측할 수 없는 오류들, 예를 들면 인터럽트(Interrupt) 등의 비동기 이벤트에 의한 오류와, 테스트 케이스를 통해서 검사하지 못한 부분의 오류 등에 대해서는 대처할 수 없었다.On the other hand, the above-described techniques for detecting errors in software did not cope with all kinds of errors. In addition, it can cope with unpredictable errors that occur in a very short time, such as interrupts caused by an asynchronous event such as an interrupt of an application, and errors that cannot be checked through a test case. There was no.
본 발명은 전술한 종래기술의 문제점 내지 한계를 극복하기 위해 안출된 것으로, 임베디드 소프트웨어의 신뢰도를 강화하기 위한 방법 및 시스템을 제공하는 것을 목적으로 한다.The present invention has been made to overcome the above problems and limitations of the prior art, and an object thereof is to provide a method and system for enhancing the reliability of embedded software.
본 발명의 기술적 과제를 달성하기 위한 임베디드 소프트웨어의 신뢰도를 강화하기 위한 방법은 상기 소프트웨어의 소스 코드에 추가된 에러 검출 구문에 따라 상기 소스 코드의 에러를 검출하는 단계; 및 상기 검출된 에러 정보를 전달받아, 상기 에러 정보를 기초로 에러를 처리하는 단계를 포함한다.According to an aspect of the present invention, there is provided a method for enhancing reliability of embedded software, the method comprising: detecting an error of the source code according to an error detection syntax added to the source code of the software; And receiving the detected error information, and processing an error based on the error information.
본 발명의 다른 기술적 과제를 달성하기 위한 임베디드 소프트웨어의 신뢰도를 강화하기 위한 시스템은 상기 소프트웨어의 소스 코드에 추가된 에러 검출 구문에 따라 상기 소스 코드의 에러를 검출하는 에러 검출기(error detector); 및 상기 에러 검출기로부터 상기 검출된 에러 정보를 전달받아, 상기 에러 정보를 기초로 에러를 처리하는 에러 핸들러(error handler)를 포함한다.A system for enhancing reliability of embedded software for achieving another technical problem of the present invention includes an error detector for detecting an error of the source code according to an error detection syntax added to the source code of the software; And an error handler receiving the detected error information from the error detector and processing an error based on the error information.
본 발명의 또 다른 기술적 과제를 달성하기 위한 에러 검출 방법은 소프트웨 어의 에러에 대한 디버깅 정보 및 하드웨어 정보를 시뮬레이터에 전달하는 단계; 및 상기 전달된 디버깅 정보 및 하드웨어 정보를 기초로 상기 소프트웨어의 에러를 검출하는 단계를 포함한다.An error detection method for achieving another technical problem of the present invention includes the steps of passing debugging information and hardware information on the error of the software to the simulator; And detecting an error of the software based on the transmitted debugging information and hardware information.
본 발명의 또 다른 기술적 과제를 달성하기 위한 상기 방법들을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 기록매체를 포함한다.Another aspect of the present invention includes a recording medium having recorded thereon a program for executing the above methods on a computer.
본 발명의 세부 및 개선 사항은 종속항에 개시된다.Details and improvements of the invention are disclosed in the dependent claims.
이하, 첨부한 도면들을 참조하여 본 발명의 바람직한 실시예들을 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 1은 본 발명의 일 실시예에 따른 임베디드 소프트웨어의 신뢰도 강화 시스템의 전체 구성을 개략적으로 도시한 도면이다.1 is a diagram schematically showing the overall configuration of a system for enhancing the reliability of embedded software according to an embodiment of the present invention.
본 발명의 명세서 전반에 걸쳐서 사용되는 신뢰도(Reliability)는 임베디드 시스템이 안정적으로 동작하는 연속된 시간을 의미하는 것으로 사용된다. 또한, 컴포넌트(component)는 전술한 신뢰도를 강화하기 위한 시스템의 구성요소로 사용되며, 컴포넌트들 전체로 이용될 수 있으며, 또한 선택적으로 사용될 수도 있다. 이러한 시스템은 에러 검출기(Error Detector, 110), 에러 핸들러(Error Handler,120), 이벤트 로거(Event Logger, 130) 및 큐(Queue,140)를 포함한다.Reliability as used throughout the specification of the present invention is used to mean a continuous time for the embedded system to operate stably. In addition, the component is used as a component of the system for enhancing the above-described reliability, may be used as a whole component, and may be optionally used. Such a system includes an
이러한 시스템의 동작 모드(Operation Mode)는 개발 모드(Development Mode)와 출시 모드(Release Mode)로 구분되며, 개발 모드는 프로그램밍 단계를 의미하며, 여기서는 오류의 인식 및 원인 규명을 목적으로 한다. 한편, 출시 모드에서는 프로그램밍된 소프트웨어를 임베디드 시스템에 탑재하여 개개의 사용자에게 배포된 후를 의미하며, 여기서는 오류의 인식 및 복구, 아이솔레이션(Isolation), 즉 오류를 시스템 전체가 아닌 오류가 발생한 해당 함수 등에 한정시키는 것이 목적이다.The operation mode of such a system is divided into a development mode and a release mode. The development mode refers to a programming stage, and is here for the purpose of recognizing an error and identifying a cause. On the other hand, in the release mode, this means that the programmed software is embedded in an embedded system and then distributed to individual users.In this case, error recognition and recovery, isolation (i.e., error) are not related to the entire system, but functions related to the error. The purpose is to limit it.
도 1을 참조하면, 소스 코드(100)에는 소프트웨어 에러(101), 하드웨어 에러(102), 소프트웨어 이벤트(103), 하드웨어 이벤트(104), 디버깅 정보(105) 및 사용자 핸들러(106) 등이 포함된다.Referring to FIG. 1, the
여기서, 하드웨어와 개발도구는 안정적이라고 가정한다. 만약 하드웨어의 버그를 발견한 경우에는 디바이스 드라이버를 사용해 오류가 발생하는 상황의 연출을 막을 수 있고, 또한 개발 도구를 다른 안정적인 도구로 대치하여 대응할 수 있다.It is assumed here that the hardware and development tools are stable. If you find a bug in the hardware, you can use the device driver to prevent the error from happening and replace the development tools with other reliable tools.
소스 코드(100)를 작성하는 경우에 오류의 검출 및 이벤트 기록을 위한 구문을 추가하여 개발한다. 또한, 사용자 핸들러(custom handler, 106)는 사용자가 에러 처리를 위해 소스 코드에 미리 포함시킨 것이다.When the
에러 검출기(110)는 소스 코드(100)에 추가된 오류의 검출을 위한 구문을 인식하여 소프트웨어의 에러(101) 및 하드웨어 에러(102)를 검출한다. 그리고, 소스 코드(100)에 포함된 디버깅 정보(105)를 전달받는다. The
에러 검출기(110)는 크게 다음 4가지 API(Application Programing Interface)로 구성될 수 있다.The
RRM_DETECTOR#(ErrorCond,ErrorType,HandlerParam), RRM_DETECTOR_EXCEPTION(int iType, void *pContext), RRM_DETECTOR_CALLBACK(ErrorCond,ErrorType,HandlerParam,CallbackFunc,CallbackP aram), RRM_DETECTOR_RETURN(ReturnValue)로 구성되며, 여기서 RRM은 신뢰도 강화 모듈(Reliability Reinforcement Module)을 의미한다.RRM_DETECTOR # (ErrorCond, ErrorType, HandlerParam), RRM_DETECTOR_EXCEPTION (int iType, void * pContext), RRM_DETECTOR_CALLBACK (ErrorCond, ErrorType, HandlerParam, CallbackFunc, CallbackP aram), RRM_DETECTOR_RETURN (ReturnValue), where the reliability is Rm Reinforcement Module).
RRM_DETECTOR#(ErrorCond,ErrorType,HandlerParam)는 소스 코드(101)에서 소프트웨어적인 오류, 즉 소프트웨어 에러(101)를 인식하는 루틴이며, #은 임의의 자연수이다. 에러 조건(ErrorCond)이 참 또는 거짓인 경우에 에러 타입(ErrorType)에 해당하는 오류가 발생한 것으로 인식하게 된다. 그리고, 에러 핸들러(120)에 핸들러 파라미터(HandlerParam)를 전달한다.RRM_DETECTOR # (ErrorCond, ErrorType, HandlerParam) is a routine for recognizing a software error, that is, a
RRM_DETECTOR_EXCEPTION(int iType, void *pContext)는 하드웨어 에러(102)를 인식하는 루틴으로서, 하드웨어적으로 오류 상태에 진입한 경우, 예를 들면 예외 처리(exception)를 인식하는 루틴이다. 이 구문이 수행되면 항상 iType에 해당하는 오류가 발생한 것으로 인식하고, 에러 핸들러(120)에 pContext 변수가 가리키는 하드웨어 오류 발생시의 문맥을 전달한다.RRM_DETECTOR_EXCEPTION (int iType, void * pContext) is a routine for recognizing the
RRM_DETECTOR_CALLBACK(ErrorCond,ErrorType,HandlerParam,CallbackFunc,CallbackParam)은 전술한 Error_DETECTOR#에 기본 기능은 동일하고, 콜백함수(CallbackFunc)와 콜백 파라미터(CallbackParam)인 콜백 함수 포인터와 파라미터를 받아서, 오류가 발생하고 이를 복구하지 못한 경우 콜백 함수를 불러서 함수 내에서 기 할당받은 자원을 해제하고 리턴하는 기능을 수행한다. 콜백 함수의 자원해제하는 기능에 대해서는 도 5를 참조하여 후술한다.RRM_DETECTOR_CALLBACK (ErrorCond, ErrorType, HandlerParam, CallbackFunc, CallbackParam) has the same basic function as the above-mentioned Error_DETECTOR #, and receives callback function pointers and parameters that are callback functions (CallbackFunc) and callback parameters (CallbackParam), and an error occurs and recovers it. If not, the callback function is called to release the allocated resources and return the function. The function of releasing the resource of the callback function will be described later with reference to FIG. 5.
RRM_DETECTOR_RETURN(ReturnValue)은 리턴 값(ReturnValue)을 검사해 함수의 수행 결과의 오류 유무를 검사하고, 오류가 있는 경우 해당 에러 핸들러를 호출한 다.RRM_DETECTOR_RETURN (ReturnValue) checks the return value to check whether there is an error in the execution result of the function, and if there is an error, calls the error handler.
에러 핸들러(120)는 에러 검출기(110)로부터 에러 타입 및 디버깅 정보를 전달받고, 이벤트 로거(130)로부터 기록된 에러 로그 정보 및 로그 정보를 큐(140)와 로그 해석기(150)로부터 전달받아, 이를 기초로 에러 복구를 수행한다. The
이러한 에러 핸들러(Error Handler)는 다음과 같은 API를 가지는데, RRM_HANDLER_TRY(FaultType,FaultHandler,QueueSize) 및 RRM_HANDLER_CATCH( )를 포함한다. 전술한 두 함수의 사이에 코딩된 루틴은 FaultType에 해당하는 오류가 발생하면 FaultHandler를 사용자 핸들러로 사용한다. 이때 QueueSize는 부가적인 자료 구조를 나타낸다. This error handler has the following API, and includes RRM_HANDLER_TRY (FaultType, FaultHandler, QueueSize) and RRM_HANDLER_CATCH (). The routine coded between the above two functions uses the FaultHandler as a user handler when an error corresponding to the FaultType occurs. Where QueueSize represents an additional data structure.
에러 핸들러(120)는 소스 코드에 오류의 검출 및 이벤트 기록을 위한 구문을 추가하여, 이 추가 구문과 연동된 에러 검출기(110)와 이벤트 로거(130)를 이용하여 오류를 복구한다. 또한, 에러 핸들러(120)는 시스템의 동작 모드를 개발 모드와 출시 모드로 구분하여 수행될 수 있다. 에러 핸들러(120)의 자세한 동작 알고리즘은 도 4 및 5를 참조하여 후술한다.The
이벤트 로거(130)는 소스 코드(100)로부터 소프트웨어 이벤트(103) 및 하드웨어 이벤트(104)를 전달받아 이를 기록한다. 즉, 오류의 원인을 알기 위해서, 소스 코드가 처리되어온 과정을 전달받는다. 이러한 이벤트는 소프트웨어 이벤트와 비동기 이벤트를 포함하며, 비동기 이벤트는 하드웨어 및 소프트웨어 인터럽트를 가리킨다. 여기서 하드웨어 인터럽트들은 CPU 외의 다른 장치들에서 발생한다. 예를 들면, 키보드, 디스크 드라이브, CD-ROM, 사운드 카드, 마우스와 같은 장치들이 이에 포함된다. 내부 인터럽트는 CPU로부터 발생하는 운영오류 등을 포함하고, 소프트웨어 인터럽트들은 프로그램에서 필요에 따라 발생시키는 인터럽트들로 고유의 API를 이용해서 발생시킨다. 유닉스와 윈도우즈 같은 대부분의 운영체제들은 소프트웨어 인터럽트 인터페이스를 가진다. The
이벤트 로거(130)는 RRM_LOGGER_FUNC(), RRM_LOGGER_EVENT(ucName,pHandler,uiLR), int RrmLoggerPrintCallstack(Task *pTask), int RrmLoggerPrintSystemEvent( ), int RrmLoggerGetHead( ), int RrmLoggerGetTail( ), int RrmLoggerPrint(int iIndex) 등의 API를 포함한다.The
RRM_LOGGER_FUNC( )는 함수의 시작 부분에 위치하며 해당 함수가 호출되었음을 기록한다. 이는 시간에 따른 함수의 콜 스택(Call Stack)으로 관리된다. RRM_LOGGER_EVENT(ucName,pHandler,uiLR)는 ucName을 명칭으로 갖는 하드웨어 이벤트, 예를 들면 인터럽트가 발생한 경우이고, 이 이벤트의 운영체제상의 핸들러의 주소는 pHandler이고, 이 이벤트가 발생한 시점은 gpCurrentTask 변수가 가리키는 테스크의 uiLR 주소에 위치한 명령어가 실행되는 시점이다.RRM_LOGGER_FUNC () is located at the beginning of the function and records that the function is called. This is managed by the call stack of the function over time. RRM_LOGGER_EVENT (ucName, pHandler, uiLR) is a hardware event named ucName, for example, when an interrupt has occurred, the address of the handler on the operating system of this event is pHandler, and when this event occurs, the task pointed to by the gpCurrentTask variable This is the point when the instruction located at uiLR address is executed.
int RrmLoggerPrintCallstack(Task *pTask)는 위의 API를 통해서 취합한 콜스택(Callstack)을 출력하는 함수로 pTask가 가리키는 태스크의 콜 스택(Callstack) 만을 출력한다. int RrmLoggerPrintSystemEvent( )는 시스템상의 발생한 모든 하드웨어 이벤트를 출력하는 기능을 하고, int RrmLoggerPrint(int iIndex)는 현재까지 발생한 오류에 대한 기록을 출력하는 기능을 한다.int RrmLoggerPrintCallstack (Task * pTask) is a function that prints the call stack collected through the above API. It prints only the call stack of the task indicated by pTask. int RrmLoggerPrintSystemEvent () prints out all the hardware events that occurred on the system, and int RrmLoggerPrint (int iIndex) prints a record of the errors that have occurred so far.
또한, 이벤트 로거(130)는 에러 검출기(110)와 유사하게 디버깅 정보를 자동 으로 에러 핸들러에 전달한다. 여기서, 이벤트는 소프트웨어 이벤트와 비동기 이벤트로 나뉜다. 비동기 이벤트는 하드웨어 및 소프트웨어 인터럽트를 가리킨다. 각 이벤트 타입별로 저장하는 로그 정보는 소프트웨어 에러 로그와 하드웨어 에러 로그를 포함한다.In addition, the
소프트웨어 에러 로그(Software Error Log)는 Task ID, File, Line, Function 등을 포함하는 에러 포인트(Fault Point), Fault Type, Condition (String) 등을 포함하는 핸들러(Handler), Function Name, System Tick, SP 등을 포함하는 함수 콜스택(Function Callstack), Event Type, Handler, Task ID, PC 등을 포함하는 시스템 이벤트(System Event)로 구성된다.The software error log includes a handler including a task ID, a file, a line, a function, a fault point, a fault type, a condition string, a handler, a function name, a system tick, It consists of System Calls including Function Callstack including SP, Event Type, Handler, Task ID, PC and so on.
하드웨어 에러 로그는 예외 로그(Exception Log)를 의미하며, Task ID, Fault Type 등을 포함하는 에러 포인트(Fault Point), 레지스터 세트, Callstack without symbol로 구성된다.The hardware error log refers to an exception log, which consists of a fault point including a task ID, a fault type, a register set, and a call without a call symbol.
이벤트 로거(130)는 에러 로그를 포함하는 디버깅 정보를 에러 핸들러(120)에 전달한다. 디버깅 정보는 에러 핸들러(120)의 호출시에 파라미터로 전달되거나 컴파일러 내장 메크로 __FILE__ 등을 통해서 전달된다. 또한, 선택적으로, 에러 핸들러(120)의 호출 자체만으로 호출 시점의 시간 등을 활용하여 묵시적으로 전달될 수도 있다. The
큐(140)는 시스템 큐(141), 태스크 큐(142) 및 로그 큐(143) 및 에러 로그 큐(144)를 포함한다.The
큐(queue)는 이벤트 로거(130)로부터 이벤트들을 전달받아 이를 메시지 형태 로 저장하고 있는 장소이다. 각각의 이벤트 타입별로 시스템 큐(141), 태스크 큐(142)에 기록하고, 에러 로그 정보를 에러 로그 큐(144)로 전달하여 에러 핸들러(120)에 제공한다. 또한, 로그 정보를 기록하고 있는 로그 큐(143)는 로그 정보를 로그 해석기(150)에 제공하여 에러 핸들러(120)의 디폴트 핸들러(121)에 전달한다.A queue is a place that receives events from the
큐(140)는 QueueCreate( ), QueueDestroy( ), QueueIn( ), QueueOut( ), QueueGetHead( ), QueueGetTail( ) 등의 API를 가진다. The
이하, 본 발명의 바람직한 실시예에 따른 예시적인 소스 코드를 참조하여 설명한다. Hereinafter, a description will be given with reference to exemplary source code according to a preferred embodiment of the present invention.
<예시적인 소스 코드><Example source code>
int function( )int function ()
{{
RRM_LOGGER_FUNC( );RRM_LOGGER_FUNC ();
RRM_DETECTOR1(RrmCheckStack(), RRM_FAULT_STACK, NULL);RRM_DETECTOR1 (RrmCheckStack (), RRM_FAULT_STACK, NULL);
RRM_DETECTOR2(RrmIsConstant(Param, 1, 5), RRM_FAULT_..., ;RRM_DETECTOR2 (RrmIsConstant (Param, 1, 5), RRM_FAULT _...,;
RRM_HANDLER_TRY(RRM_FAULT_A, myHandler, 10);RRM_HANDLER_TRY (RRM_FAULT_A, myHandler, 10);
/* User Code *// * User Code * /
RRM_HANDLER_CATCH();RRM_HANDLER_CATCH ();
}}
먼저, 함수의 시작 부분에 위치한 RRM_LOGGER_FUNC( )는 해당 함수가 호출되었음을 기록한다. 그리고, 소프트웨어 에러를 인식하는 루틴인 RRM_DETECTOR1이 수행되는데, 에러 조건으로 RrmCheckStack()을 수행하여 참 또는 거짓인 경우에 에러 타입으로 FAULT_STACK에 해당하는 오류가 발생한 것으로 인식하게 된다. 그리고, 에러 핸들러에 핸들러 파라미터로 NULL을 전달한다.First, RRM_LOGGER_FUNC () at the beginning of the function records that the function is called. In addition, the routine RRM_DETECTOR1, which recognizes a software error, is executed. When RrmCheckStack () is executed as an error condition, an error corresponding to FAULT_STACK is recognized as an error type when it is true or false. Then, NULL is passed as the handler parameter to the error handler.
RRM_HANDLER_TRY()와 RRM_HANDLER_CATCH(), 두 함수의 사이에 코딩된 사용자코드는 Fault_A에 해당하는 오류가 발생하면 myHandler를 사용자 핸들러로 사용한다. 이때, QueueSize는 "10"으로 전달한다.User code coded between RRM_HANDLER_TRY () and RRM_HANDLER_CATCH (), two functions, uses myHandler as a user handler when an error corresponding to Fault_A occurs. At this time, QueueSize is delivered as "10".
요약하면, 전술한 시스템은 소스 코드에 오류의 검출 및 이벤트 기록을 위한 구문을 추가하고, 이 추가 구문과 연동된 에러 검출기와 이벤트 로거를 활용하고, 에러 검출기와 이벤트 로거는 다시 에러 핸들러에 의해 오류를 복구하는 과정에 이용된다. 여기서, 에러 검출기가 오류를 인식하고 에러 핸들러가 이를 복구하지 못하면, 오류로 간주한다. 또한, 선택적으로 후술할 동작 모드를 활용하여 개발 모드와 출시 모드에 따라 각각의 컴포넌트들은 다른 형태로 동작할 수 있으며, 컴포넌트를 재구성하여 선택적으로 사용함으로써 다양한 규모의 시스템에 적용 가능하다.In summary, the system described above adds syntax for event detection and event recording to the source code, utilizes error detectors and event loggers associated with these additional syntaxes, and error detectors and event loggers, in turn, are error-prone by error handlers. It is used in the process of recovering. Here, if the error detector recognizes an error and the error handler cannot recover it, it is considered an error. In addition, by selectively using the operation mode to be described later, each component can operate in a different form according to the development mode and the release mode, and can be applied to systems of various sizes by reconfiguring and selectively using the component.
도 1에 도시된 전체 시스템의 구성은 선택적으로 구성될 수 있다. 예를 들면, 에러 검출기 레벨(Error Detector Level)1 은 Enable/Disable, 에러 검출기 레 벨(Error Detector Level)#은 Enable/Disable, 하드웨어 에러 검출기(Hardware Error Detector)는 Enable/Disable로 설정될 수 있다. 또한, 에러 검출기가 인에이블 된 경우, 에러 핸들러의 최대 에러 타입(Max Error Type)은 [5, 128], 동작 모드는 개발 모드 또는 출시 모드로 선택될 수 있다. The configuration of the entire system shown in FIG. 1 may be optionally configured. For example, Error Detector Level 1 may be set to Enable / Disable, Error Detector Level # may be Enable / Disable, and Hardware Error Detector may be set to Enable / Disable. . In addition, when the error detector is enabled, the maximum error type (Max Error Type) of the error handler may be selected as the development mode or the release mode.
또한, 이벤트 로거 중에서, 시스템 이벤트 로그(System Event Log)는 Enable/Disable로, 함수 콜백 로그(Function Callstack Log)는 Enable/Disable로, 로그 큐 사이즈(Log Queue Size)는 [1,100]으로 설정될 수 있다.Also, among the event loggers, the System Event Log can be set to Enable / Disable, the Function Callstack Log to Enable / Disable, and the Log Queue Size can be set to [1,100]. have.
도 2는 본 발명의 다른 실시예에 따른 에러 검출기의 구성을 개략적으로 도시한 도면이다.2 is a view schematically showing the configuration of an error detector according to another embodiment of the present invention.
도 2를 참조하면, 에러 검출기(110)의 구체적인 구성과 에러 핸들러(120)가 도시되어 있다. 에러 검출기(110)는 입력 검사부(111), 전 상태 검사부(Pre-Condition State Checker, 112), 처리부(113), 출력 검사부(114), 및 후 상태 검사부(Post-Condition State Checker, 115)를 포함한다.Referring to FIG. 2, a detailed configuration of the
일반적인 에러 검출기는 입력, 처리, 결과의 순서로 진행된다. 본 발명의 바람직한 실시예에서, 입력 검사부(111)는 함수의 입력 파라미터를 검사하여 디버깅 정보를 에러 핸들러(120)에 전달한다. 또한, 전 상태 검사부(112)는 함수 호출시의 소프트웨어 및 하드웨어의 상태를 검사하여 디버깅 정보를 에러 핸들러(120)에 전달한다.Typical error detectors proceed in the order of input, processing, and result. In a preferred embodiment of the present invention, the
처리부(113)는 함수의 입력 파라미터를 특정의 함수 수행에 따라 처리하여 출력 검사부(114) 및 후 상태 검사부(115)에 제공한다.The
출력 검사부(114)는 함수 수행에 따른 결과값을 검사하여 에러 핸들러(120)에 디버깅 정보를 전달하고, 후 상태 검사부(115)는 함수 종료 시점의 소프트웨어 및 하드웨어의 상태를 검사하여 디버깅 정보를 에러 핸들러(120)에 전달한다.The
후 상태 검사부(115)는 내부 상태(Internal States)들을 거쳐 다시 전 상태 검사부(112)로 입력된다. 여기서, 내부 상태들은 메모리 상의 변수들의 값뿐만 아니라 하드웨어 장치의 레지스터 값 등을 포함하는 포괄적인 소프트웨어와 하드웨어의 상태를 의미한다.The post
예시적으로, 검사 구문은 상수(Constant), 문자열(String), 메모리 포인터(Memory Pointer), 제어블록 및 스택(Control Block and Stack)을 포함한다.In an exemplary embodiment, the check syntax includes a constant, a string, a memory pointer, a control block, and a stack.
상수는 int RrmIsConstant(int iVar, int iFrom, int iTo), 즉 정수 값의 범위를 검사하는 구문으로, 예를 들면, 5보다 크고 10보다 작은지 이다. Constants are int RrmIsConstant (int iVar, int iFrom, int iTo), a syntax for checking the range of integer values, for example, greater than 5 and less than 10.
문자열은 int RrmIsString(uint8 *pString, int iFrom, int iTo), 즉 문자열의 길이의 범위를 검사하는 구문으로, 예를 들면 길이가 3 바이트보다 크고 10 바이트보다 작은지 이다. A string is an int RrmIsString (uint8 * pString, int iFrom, int iTo), a syntax for checking the length of a string, for example, if it is greater than 3 bytes and less than 10 bytes.
메모리 포인터는 int RrmIsMemory(void *pPointer), int RrmIsCodeMemory(void *pPointer), int RrmIsDataMemory(void *pPointer), 즉 메모리 포인터가 코드 메모리, 데이터 메모리, ROM 또는 RAM을 가리키는지 등을 검사하는 구문이다.A memory pointer is a syntax that checks for int RrmIsMemory (void * pPointer), int RrmIsCodeMemory (void * pPointer), int RrmIsDataMemory (void * pPointer), that is, whether the memory pointer points to code memory, data memory, ROM, or RAM.
제어 블록 및 스택은 int RrmIsObject(void *pObject, int iType) 및 int RrmCheckStack(), 즉 오브젝트인지 여부와 스택을 검사하는 구문이다. 여기서, 특 정 종류의 커널 오브젝트를 식별하는 방법으로서, 마스크(Mask)를 사용하거나 또는 상대 거리(Relative Distance)를 사용할 수 있다.Control blocks and stacks are int RrmIsObject (void * pObject, int iType) and int RrmCheckStack (), that is, statements that check whether they are objects and the stack. Here, as a method of identifying a kernel object of a specific type, a mask or a relative distance may be used.
각각의 검사부에서 오류의 조건을 검사하는데 있어서, 단순히 메모리의 주소만을 활용하여 특정 종류의 커널 오브젝트인지 여부를 식별할 수 있다. In each inspection unit, it is possible to identify whether a particular kind of kernel object is used by simply using an address of a memory.
예를 들면, 다음과 같은 구문에서,For example, in the following syntax:
: struct Task {: struct Task {
int id;int id;
......
};};
struct Task t1;struct Task t1;
Task라는 객체가 있을 때, 이 객체의 메모리 상의 주소만을 사용해서, 해당 메모리 주소가 Task 객체를 가리키고 있는지 여부를 확인하는 것이다. 종래에는 t1.id = &t1으로 id 변수와 같은 식별 변수를 두고 이곳에 해당 객체의 시작주소를 저장해 두었으나, 이는 객체를 식별할 수는 있지만 서로 다른 객체를 식별할 수 없었다.When there is an object called Task, it uses only the memory address of this object to determine whether the memory address points to a Task object. Conventionally, an identification variable such as an id variable is stored as t1.id = & t1, and the start address of the object is stored there, but this can identify the objects but not different objects.
따라서, 본 발명의 바람직한 실시예에서, 서로 다른 객체를 식별하는 방법을 설명한다. 아래와 같은 구문에서,Thus, in a preferred embodiment of the present invention, a method of identifying different objects is described. In the syntax below,
t1.id = &t1 XOR mask;t1.id = & t1 XOR mask;
이때 마스크(mask)는 객체별로 고유하게 부여되고, 이후 t1이 mask1을 사용하는 객체인지 여부는 t1.id XOR mask1 == &t1 인지 여부를 확인해 알 수 있고, 또 한, 선택적으로, XOR 연산을 다른 논리 연산으로 대치하여 확인할 수 있다.In this case, a mask is uniquely assigned to each object, and then whether or not t1 is an object using mask1 can be checked by checking whether t1.id XOR mask1 == & t1, and, optionally, another XOR operation Can be verified by replacing with logical operation.
또한, 아래와 같은 구문에서, 식별 변수인 id의 구조체 내의 위치를 객체 간에 다르게 하여 이를 사용해 식별할 수 있다.In addition, in the following syntax, the position in the structure of id, which is an identification variable, can be identified by using it differently between objects.
struct Task {struct Task {
int id;int id;
......
}}
struct Task t1;struct Task t1;
struct Mem {struct Mem {
int a;int a;
int id;int id;
......
}}
struct Mem t2;struct Mem t2;
예를 들면, &(t2.id) - &t2 == sizeof(int) 이면 메모리 객체이다.For example, if & (t2.id)-& t2 == sizeof (int) it is a memory object.
도 3은 본 발명의 또 다른 실시예에 따른 에러 검출 방법을 설명하는 흐름도이다.3 is a flowchart illustrating an error detection method according to another embodiment of the present invention.
도 3을 참조하면, 에러 검출기(110)는 소스 코드로부터 함수의 입력값인 파라미터를 입력받는다. 단계 300에서, 함수 입력 값인 파라미터와 함수 호출 시의 소프트웨어 및 하드웨어 상태를 검사한다. 단계 302에서, 사용자 정의 매크로 또 는 컴파일러 내장 매크로를 이용하여 입력 파라미터의 검사 결과와 함수 호출 시의 소프트웨어 및 하드웨어 상태 검사 결과에 대한 디버깅 정보를 에러 핸들러에 전달한다. Referring to FIG. 3, the
여기서, 디버깅 정보는 에러 핸들러의 호출시에 파라미터로 전달되거나 컴파일러 내장 메크로 __FILE__ 등을 통해서 전달된다. 또한, 선택적으로, 에러 핸들러의 호출 자체만으로 호출 시점의 시간 등을 활용하여 묵시적으로 전달될 수도 있다. Here, debugging information is passed as a parameter when calling an error handler or through a compiler built-in macro __FILE__. Also, optionally, the call may be implicitly delivered by utilizing the time at the time of invocation, etc., only by the call of the error handler itself.
단계 304에서, 입력 파라미터에 따라 함수가 처리되고, 함수 수행이 종료되면 결과값을 검사하고, 종료 시점의 소프트웨어 및 하드웨어 상태를 검사한다. 단계 306에서 단계 302와 마찬가지로, 사용자 정의 매크로 또는 컴파일러 내장 매크로를 이용하여 검사 결과에 대한 디버깅 정보를 에러 핸들러에 전달한다.In step 304, the function is processed according to the input parameter, and when the execution of the function is finished, the result value is checked, and the software and hardware states at the end point are checked. In step 306, as in step 302, debugging information about the test result is passed to the error handler using a user-defined macro or a compiler built-in macro.
도 4는 본 발명의 또 다른 실시예에 따른 에러 핸들러 동작 알고리즘을 설명하기 위한 흐름도이다.4 is a flowchart illustrating an error handler operation algorithm according to another embodiment of the present invention.
도 4를 참조하면, 에러 검출기와 이벤트 로거로부터 전달받은 디버깅 정보와 에러 타입 등의 정보를 기초로 에러 핸들러에서 에러 처리를 수행하는 알고리즘이 도시되어 있다.Referring to FIG. 4, an algorithm for performing error processing in an error handler based on debugging information and an error type received from an error detector and an event logger is illustrated.
먼저, 단계 400에서 소스 코드에 포함되어 있는 사용자 핸들러(Custom Handler)가 존재하는지 판단한다. 단계 402에서, 사용자 핸들러가 존재한다고 판단하면, 단계 404로 진행하여 사용자 핸들러를 호출하여 에러 처리를 수행한다. 단계 402에서 사용자 핸들러가 존재하지 않는다고 판단하면, 단계 406에서 소프트 웨어의 동작 모드(Operation Mode)를 판단한다. 여기서 동작 모드는 개발 모드와 출시 모드로 구분된다. 단계 408, 410 및 416에서, 개발 모드인 경우 개발 모드용 디폴트 핸들러를 호출하여 에러 처리를 수행하고, 단계 412, 414 및 416에서 출시 모드인 경우 출시 모드용 디폴트 핸들러를 호출하여 에러 처리를 수행한다. 여기서 사용자 핸들러는 사용자가 소스 코드 상에 정의한 에러 처리 핸들러를 의미하고, 디폴트 핸들러는 에러 핸들러에 포함되어 있는, 즉 원래 운영체제에 있는 핸들러를 의미하며, 디폴트 핸들러는 개발 모드용과 출시 모드용으로 구분된다.First, in step 400 it is determined whether there is a custom handler included in the source code. If it is determined in step 402 that the user handler exists, the flow proceeds to step 404 to call the user handler to perform error processing. If it is determined in step 402 that the user handler does not exist, in step 406 it is determined the operation mode (operation mode) of the software. Operation mode is divided into development mode and release mode. In steps 408, 410, and 416, in the development mode, the default handler for development mode is called to perform error handling, and in steps 412, 414, and 416, the release mode is called by the default handler for the release mode to perform error processing. . Here, the user handler refers to an error handling handler defined by the user in the source code, and the default handler is included in the error handler, that is, a handler in the original operating system, and the default handler is divided into development mode and release mode. .
개발 모드는 프로그램밍 단계를 의미하며, 개발 모드용 디폴트 핸들러는 오류의 인식 및 원인 규명을 위한 처리를 수행하며, 출시 모드는 프로그램밍된 소프트웨어를 임베디드 시스템에 탑재하여 개개의 사용자에게 배포된 후를 의미하며, 출시 모드용 디폴트 핸들러는 오류의 인식 및 복구, 아이솔레이션(Isolation), 즉 오류를 시스템 전체가 아닌 오류가 발생한 해당 함수 등에 한정시키는 처리를 한다. The development mode refers to the programming phase, the default handler for development mode performs the processing of error recognition and cause identification, and the release mode refers to after the programmed software is deployed to the embedded system and distributed to individual users. The default handler for release mode handles the recognition, recovery, and isolation of an error, that is, to limit the error to the corresponding function where the error occurred, rather than to the system as a whole.
예를 들면, 인터럽트 핸들러에서 태스크 의존적 함수 호출 오류를 처리하는 경우, 인터럽트 핸들러의 시작과 끝에서 특정 변수에 값을 설정 또는 해제하고, 모든 태스크 의존적인 함수의 시작 부분에 오류 검출 구문 추가한다. 만약, 오류가 검출되면 개발 모드에서는 오류 정보를 출력하고, 출시 모드에서는 해당 인터럽트 핸들러를 등록한 태스크의 문맥에서 시그널과 같은 방법으로 처리한다.For example, if your interrupt handler handles a task-dependent function call error, you can set or unset values for specific variables at the beginning and end of the interrupt handler, and add error detection statements at the beginning of every task-dependent function. If an error is detected, error information is output in development mode. In release mode, the interrupt handler is processed in the same way as a signal in the context of the task that registered the interrupt handler.
또한, 스타베이션(Starvation) 오류는 많은 수의 동시에 수행되는 태스크로 인한 경우, 인터럽트로 인한 경우, 대용량 메모리 또는 대용량 IPC 사용하는 경우 에 발생한다.In addition, a starvation error occurs when a large number of concurrent tasks are performed, an interrupt, a large memory, or a large IPC.
먼저, 많은 수의 동시에 수행되는 태스크로 인한 경우는 대기 상태의 테스크의 개수 및 특정 태스크의 두 번의 스케줄링 사이의 시간을 바탕으로 판별하고, 개발 모드에서는 성능이 저하될 수 있음을 경고하고, 출시 모드에서는 일부 태스크를 블록킹한다.First, the case of a large number of concurrently executed tasks is determined based on the number of tasks in the waiting state and the time between two scheduling of a specific task, and warns that performance may be degraded in development mode. Blocks some tasks.
인터럽트로 인한 경우는 인터럽트의 일부 인터럽트를 끄고, 이때 각 인터럽트 채널별로 인터럽트의 발생 횟수를 고려하고, 또한 우선순위가 낮으며 인터럽트는 걸리지만 실제로 처리가 되지 않은 인터럽트를 일정한 주기를 가지고 끈다.In case of an interrupt, turn off some interrupts of the interrupt. In this case, consider the number of interrupts generated by each interrupt channel, and also turn off interrupts having a low priority and interrupted but not processed at regular intervals.
대용량 메모리 또는 대용량 IPC 사용하는 경우는 개발 모드에서는 성능이 저하될 수 있음을 경고하고, 출시 모드에서는 정책에 따라서 처리한다. 예를 들면 우선순위가 낮은 태스크는 블록킹하고, 메모리를 요구한 태스크 종료하고, IPC를 공유 메모리로 처리한다.In case of using large memory or large IPC, it warns that the performance may be degraded in the development mode. In the release mode, it is processed according to the policy. For example, lower priority tasks block, terminate tasks that require memory, and treat IPC as shared memory.
데드 락(Deadlock) 오류인 경우, 자원 할당 그래프를 그려서 데드 락을 인지한다. 예를 들면, IntDisable(), IntEnable(), MutexLock()와 같은 API를 포함한다. 여기서 데드 락은 프로그램들이 자료 처리를 위해 자료를 확보할 때 경쟁이 일어나서 자료를 확보하지 못하고 서로 상대방이 자료의 록을 해제하기를 기다리는 상태를 의미하며, 응용 프로그램에서 데드 락이 발생하지 않으면 운영체제 내부에서는 데드 락이 발생하지 않는다고 가정한다. 응용 프로그램이 BPI를 사용하는 경우, 개발 모드에서는 데드 락이 발생할 수 있음을 경고하고, 출시 모드에서는 데드 락을 인식하여 시스템을 재시작할 경우에 해당 태스크에 강제로 IIP를 적용한다.In the case of a deadlock error, the deadlock is recognized by drawing a resource allocation graph. For example, it includes APIs such as IntDisable (), IntEnable (), and MutexLock (). Here, deadlock refers to a state in which a competition occurs when programs acquire data for data processing and cannot wait for data to be released from each other. Assume no deadlock occurs. If an application uses BPI, it warns that a deadlock may occur in development mode. In release mode, it recognizes the deadlock and applies IIP to the task when the system is restarted.
도 5는 본 발명의 또 다른 실시예에 따른 에러 핸들러 동작 알고리즘을 설명하기 위한 흐름도이다.5 is a flowchart illustrating an error handler operation algorithm according to another embodiment of the present invention.
도 5를 참조하면, 단계 500에서, 에러가 복구되었는지 판단한다. 단계 502에서, 에러가 복구되었다면 종료한다. 에러의 복구 여부의 판단은 에러 핸들러에서 함수를 수행한 후의 리턴 값을 판단함으로써 수행된다. 단계 502에서, 에러가 복구되지 않았다고 판단한 경우에는 에러 처리를 수행한 자원(resource), 예를 들면 오류 복구를 위한 자료 구조 등을 정리할 필요가 있다. 따라서, 단계 504에서, 콜백(Callback) 핸들러가 존재하는지 판단한다. 여기서 콜백 함수는 자동으로 호출되는 함수이며, 사용자가 명시적으로 호출하지 않아도 실행되는 함수이다. 즉 종래에는 에러를 검출하고 자원 해제를 직접 코딩하여 수행하였으나, 콜백 핸들러를 호출함으로써 자원해제를 자동으로 수행할 수 있다. 단계 506에서, 콜백 핸들러가 존재하지 않는다고 판단하면 결과 값을 리턴하고, 즉 자원 해제 처리를 수행하지 않는다. 콜백 핸들러가 존재한다면, 단계 508, 510 및 512에서, 콜백 핸들러를 호출하고, 자원해제를 수행한 후 결과 값을 리턴한다.Referring to FIG. 5, in step 500, it is determined whether the error has been recovered. In step 502, if the error is recovered, terminate. The determination of whether the error is recovered is performed by determining the return value after executing the function in the error handler. In step 502, if it is determined that the error has not been recovered, it is necessary to clean up the resource that performed the error processing, for example, a data structure for error recovery. Therefore, in step 504, it is determined whether a callback handler exists. Here, the callback function is a function that is called automatically and executed without the user's explicit call. That is, in the past, an error was detected and the resource release was coded directly, but the resource release can be automatically performed by calling a callback handler. In step 506, if it is determined that the callback handler does not exist, a result value is returned, that is, no resource release processing is performed. If there is a callback handler, then at steps 508, 510 and 512, the callback handler is invoked, the resource release is performed and the result value is returned.
도 6은 본 발명의 또 다른 실시예에 따른 시뮬레이터(Simulator)를 이용하여 오류를 검사하는 방법을 설명하는 도면이다.6 is a view for explaining a method for checking an error using a simulator according to another embodiment of the present invention.
도 6에 도시된 시뮬레이터(600)는 소프트웨어에 명시적인 오류 검출 및 이벤트 로깅 루틴을 추가하지 않고 오류 인지 및 이벤트 로깅을 수행할 수 있다. 예를 들면, 스택(stack) 검사의 경우, 모든 분기 명령어의 분기 조사가 심볼 테이블(Symbol Table)에 있다면 함수 호출로 간주하고, 함수의 스택 프레임 크기와 태 스크의 스택 포인터(Stack Pointer)를 활용해 스택 오류 검사를 수행하는 것이다.The
시스템 시뮬레이터 또는 플랫폼 시뮬레이터가 하드웨어 정보와 디버깅 정보를 인지하여 오류를 검사하는 것이다. The system simulator or platform simulator checks for hardware errors and debugging information to check for errors.
본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다.The invention can also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disks, optical data storage devices, and the like, which are also implemented in the form of carrier waves (for example, transmission over the Internet). Include.
이상 본 발명의 바람직한 실시예들을 기초로 설명되었지만, 당업자들은 본 발명이 속하는 기술분야의 기술적 사상이나 필수적 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아닌 것으로서 이해되어야 한다. 본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 한정되며, 특허청구범위의 의미 및 범위 그리고 그 등가 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.Although described above based on the preferred embodiments of the present invention, those skilled in the art will understand that the present invention may be implemented in other specific forms without changing the technical spirit or essential features of the technical field to which the present invention belongs. Therefore, the embodiments described above are to be understood as illustrative in all respects and not as restrictive. The scope of the present invention is defined by the appended claims rather than the foregoing description, and all changes or modifications derived from the meaning and scope of the claims and their equivalent concepts should be construed as being included in the scope of the present invention. do.
본 발명에 따른 임베디드 소프트웨어의 신뢰도를 강화하기 위한 방법으로 소프트웨어의 소스 코드에 추가된 에러 검출 구문에 따라 소스 코드의 에러를 검출하 고, 검출된 에러 정보를 전달받아, 에러 정보를 기초로 에러를 처리함으로써, 임베디드 컴퓨터 시스템의 운영체제, 미들웨어, 그리고 응용 프로그램의 오류를 인식 할 수 있는 효과가 있다.In order to enhance the reliability of embedded software according to the present invention, an error of the source code is detected according to an error detection syntax added to the source code of the software, the detected error information is received, and the error is detected based on the error information. By doing so, it is possible to recognize errors in the operating system, middleware, and application programs of the embedded computer system.
또한, 종래의 오류 검출 방법에 비하여 보다 다양한 지점에서 오류를 인식할 수 있으며, 개발 시점에는 오류가 발생한 경우에 이벤트를 비롯한 로깅 정보를 활용하여 오류와 관련된 디버깅 정보를 충분히 제공할 수 있다.In addition, the error can be recognized at more various points than in the conventional error detection method, and when the error occurs, the debugging information related to the error can be sufficiently provided by utilizing logging information including an event.
또한, 제품 출시 이후에는 오류가 발생한 경우에 오류를 오류의 발생 부분에 한정시키거나 오류로부터 시점을 복구하는 작업을 수행하여. 오류의 복구가 이뤄지지 않은 경우에 기 할당한 자원을 해제하고 프로그램의 제어 흐름을 변경할 수 있다.In addition, after the product is released, if an error occurs, the operation is limited to the occurrence of the error or recovery from the error. If the error is not recovered, the allocated resources can be released and the control flow of the program can be changed.
Claims (20)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020060120953A KR20080050117A (en) | 2006-12-01 | 2006-12-01 | Method and system for enhancing the reliability of embedded software |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020060120953A KR20080050117A (en) | 2006-12-01 | 2006-12-01 | Method and system for enhancing the reliability of embedded software |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| KR20080050117A true KR20080050117A (en) | 2008-06-05 |
Family
ID=39805623
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR1020060120953A Withdrawn KR20080050117A (en) | 2006-12-01 | 2006-12-01 | Method and system for enhancing the reliability of embedded software |
Country Status (1)
| Country | Link |
|---|---|
| KR (1) | KR20080050117A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101012108B1 (en) * | 2009-07-21 | 2011-02-07 | 한국원자력연구원 | Embedded system defect detection rate evaluation device and method |
| KR20110052904A (en) * | 2009-11-13 | 2011-05-19 | 삼성전자주식회사 | Computing system and how debug information is processed by the computing system |
-
2006
- 2006-12-01 KR KR1020060120953A patent/KR20080050117A/en not_active Withdrawn
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101012108B1 (en) * | 2009-07-21 | 2011-02-07 | 한국원자력연구원 | Embedded system defect detection rate evaluation device and method |
| KR20110052904A (en) * | 2009-11-13 | 2011-05-19 | 삼성전자주식회사 | Computing system and how debug information is processed by the computing system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12093398B2 (en) | Vulnerability analysis and reporting for embedded systems | |
| Desai et al. | P: safe asynchronous event-driven programming | |
| US8782607B2 (en) | Contract failure behavior with escalation policy | |
| KR100868762B1 (en) | Error detection method of embedded software | |
| EP2368189B1 (en) | Debugging pipeline | |
| CN100590604C (en) | Breakpoint debugging on pluggable components | |
| US9519495B2 (en) | Timed API rules for runtime verification | |
| CN107526625B (en) | Java intelligent contract security detection method based on bytecode inspection | |
| CN102419729B (en) | Parallel test execution | |
| CN101667154A (en) | Apparatus and method for improving emulation speed of high-level languages in on-chip emulation systems | |
| US20180189167A1 (en) | Methods, circuits, apparatus, systems and associated software modules for evaluating code behavior | |
| Gotovos et al. | Test-driven development of concurrent programs using concuerror | |
| CN120256314B (en) | GUI program fuzz testing method, system, computer device and storage medium | |
| CN118409751B (en) | AI accelerator card calculation error automatic analysis method, system, device and equipment | |
| CN105446886A (en) | Computer program debugging method and device | |
| Clements et al. | Is your firmware real or re-hosted?. | |
| CN110781081B (en) | A mobile application callback forced triggering method, system and storage medium | |
| KR20080050117A (en) | Method and system for enhancing the reliability of embedded software | |
| Li et al. | {LR-Miner}: Static race detection in {OS} kernels by mining locking rules | |
| Mu et al. | Colafuze: Coverage-guided and layout-aware fuzzing for android drivers | |
| Thomm et al. | Automated application of fault tolerance mechanisms in a component-based system | |
| Ferdinand et al. | Integration of code-level and system-level timing analysis for early architecture exploration and reliable timing verification | |
| US20250103391A1 (en) | Non-invasive progress-awareness for real-time tasks | |
| Menrad et al. | Improving TinyOS developer productivity with statecharts | |
| CN110531986B (en) | Method, device, equipment and medium for generating management software upgrading package |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20061201 |
|
| PG1501 | Laying open of application | ||
| PC1203 | Withdrawal of no request for examination | ||
| WITN | Application deemed withdrawn, e.g. because no request for examination was filed or no examination fee was paid |