KR20060066341A - Method and apparatus for controlling access shared memory in a unix system - Google Patents
Method and apparatus for controlling access shared memory in a unix system Download PDFInfo
- Publication number
- KR20060066341A KR20060066341A KR1020040104917A KR20040104917A KR20060066341A KR 20060066341 A KR20060066341 A KR 20060066341A KR 1020040104917 A KR1020040104917 A KR 1020040104917A KR 20040104917 A KR20040104917 A KR 20040104917A KR 20060066341 A KR20060066341 A KR 20060066341A
- Authority
- KR
- South Korea
- Prior art keywords
- memory
- access
- processor
- flag
- semaphore flag
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1416—Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
- G06F12/145—Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being virtual, e.g. for virtual blocks or segments before a translation mechanism
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/34—Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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
- G06F9/46—Multiprogramming arrangements
- G06F9/468—Specific access rights for resources, e.g. using capability register
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
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 Security & Cryptography (AREA)
- Multi Processors (AREA)
Abstract
본 발명은 유닉스 시스템에서 이중화된 공유메모리 접근 제어 방법 및 장치에 관한 것으로, 유닉스 시스템에 대한 수집 데이터를 저장하는 제 1 메모리와 제 2 메모리로 이중화된 공유메모리부; 상기 제 1 메모리에 접근을 허용하거나 금지하는 제 1 세마포어 플래그; 상기 제 2 메모리에 접근을 허용하거나 금지하는 제 2 세마포어 플래그; 상기 제 1 세마포어 플래그와 상기 제 2 세마포어 플래그 중 어느 하나의 세마포어 플래그의 상태를 검색하여 접근허용 상태인 경우 상기 수집 데이터를 상기 검색된 세마포어 플래그가 접근을 허용하는 메모리에 저장되도록 하고, 상기 검색된 세마포어 플래그의 상태가 접근금지 상태인 경우 상기 수집 데이터를 상기 검색되지 않은 세마포어 플래그가 접근을 허용하는 메모리에 저장되도록 하는 수집 프로세서; 및 상기 제 1 메모리와 상기 제 2 메모리에 주기적으로 접근하여 상기 제 1 세마포어 플래그와 상기 제 2 세마포어 플래그 중에서 접근허용 상태인 세마포어 플래그가 접근을 허용하는 메모리에서 상기 수집 데이터를 읽고 보고하는 보고 프로세서;로 구성된다. 따라서, 지연시간을 줄여 공유메모리에 접근할 수 있음으로 보다 신속하게 데이터를 얻을 수 있다. The present invention relates to a shared memory access control method and apparatus duplexed in a Unix system, comprising: a shared memory unit dualized into a first memory and a second memory configured to store collection data for a Unix system; A first semaphore flag to allow or prohibit access to the first memory; A second semaphore flag to allow or prohibit access to the second memory; When the state of any one semaphore flag of the first semaphore flag and the second semaphore flag is retrieved and the access state is allowed, the collected data is stored in a memory that allows the retrieved semaphore flag to access the retrieved semaphore flag. A collection processor configured to store the collected data in a memory allowing the undetected semaphore flag to access when the state of the access state is prohibited from access; And a reporting processor periodically accessing the first memory and the second memory to read and report the collected data from a memory to which a semaphore flag that is accessible among the first semaphore flag and the second semaphore flag allows access. It consists of. Therefore, it is possible to obtain data more quickly by accessing the shared memory by reducing the delay time.
Description
도 1은 종래의 유닉스 시스템에서 단일 공유메모리 접근 제어 장치의 블럭도이다.1 is a block diagram of a single shared memory access control device in a conventional Unix system.
도 2는 본 발명의 일실시예에 따른 유닉스 시스템에서 이중화된 공유메모리 접근 제어 장치의 블럭도이다.2 is a block diagram of a dual shared memory access control device in a Unix system according to an embodiment of the present invention.
도 3은 본 발명의 다른 일실시예에 따른 유닉스 시스템에서 이중화된 공유메모리 접근 제어 장치의 블럭도이다.3 is a block diagram of a dual shared memory access control device in a Unix system according to another embodiment of the present invention.
도 4는 도 2와 도 3의 수집 프로세서에서 이중화된 공유메모리에 접근하는 방법에 대한 흐름도이다.4 is a flowchart illustrating a method of accessing a redundant shared memory in the acquisition processor of FIGS. 2 and 3.
도 5는 도 2와 도 3의 보고 프로세서에서 이중화된 공유메모리에 접근하는 방법에 대한 흐름도이다.5 is a flowchart illustrating a method of accessing a redundant shared memory in the report processor of FIGS. 2 and 3.
본 발명은 유닉스 시스템에서 이중화된 공유메모리 접근 제어 방법 및 장치에 관한 것으로, 더욱 상세하게는 비동기적으로 공유메모리에 접근하여 데이터를 저장하는 수집 프로세서와 주기적으로 공유메모리에 접근하여 데이터를 읽고 제거하는 보고 프로세서로 이루어진 유닉스 시스템에서 지연시간을 줄이며 공유메모리에 접근하는 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for dually controlling shared memory access in a Unix system. More particularly, the present invention relates to an acquisition processor for asynchronously accessing a shared memory and to storing and accessing the shared memory. A method and apparatus for reducing latency and accessing shared memory in a Unix system with a reporting processor.
도 1은 종래의 유닉스 시스템에서 단일 공유메모리 접근 제어 장치의 블럭도이다.1 is a block diagram of a single shared memory access control device in a conventional Unix system.
도 1을 참조하면, 수집 프로세서(100)는 공유메모리(120)에 접근하기 위하여 유닉스 시스템상의 레지스터(Register)인 세마포어 플래그(160)를 잠그고(Lock) 수집된 데이터를 공유메모리(120)에 쓴다(Write). 수집 프로세서(100)는 쓰기 동작을 마친 후에 보고 프로세서(140)에 공유메모리(120)에 관한 동작이 종료되었음을 알려주기 위하여 잠그었던 세마포어 플래그(160)를 해제(Unlock)한다. Referring to FIG. 1, the
보고 프로세서(140)는 타이머 또는 인터럽트와 같은 신호에 의하여 일정한 간격으로 공유메모리(120)로부터 데이터를 읽고 보고하는 프로세서로써, 공유메모리(120)에 접근하기 전에 현재 수집 프로세서(100)에서 공유메모리(120)를 사용중인지 확인하기 위하여 세마포어 플래그(160)의 잠금 여부를 확인하게 된다. 보고 프로세서(140)는 세마포어 플래그(160)의 잠금 여부 확인을 통하여 잠김 상태가 확인되면 해제될 때 까지 대기하고, 해제 상태가 확인되면 세마포어 플래그(160)를 잠그고 공유메모리(120)의 데이터를 읽고(Read) 제거(Clear)한다.The
그러나, 이와 같은 종래의 유닉스 시스템에서 단일 공유메모리 접근 제어 장치는 다수개의 프로세서가 하나의 공유메모리에 접근할 때 세마포어 플래그의 상태를 확인하고 다른 프로세서가 공유메모리에 대한 동작중인 경우 지연시간이 발생하 는 문제점이 있다. 또한, 상기 지연은 수집하고자 하는 성능 항목의 개수에 비례하는바 수집 프로세서의 공유메모리에 접근 횟수가 늘어나면 그에 비례하여 지연시간이 늘어난다는 문제점이 있다. 이와 같은 지연시간으로 인하여 측정하고자 하는 시간의 정확한 성능 정보를 수집할 수 없다는 문제점이 있다.However, in such a conventional Unix system, a single shared memory access control device checks the state of the semaphore flag when multiple processors access one shared memory, and delay occurs when another processor is operating on the shared memory. There is a problem. In addition, the delay is proportional to the number of performance items to be collected. As the number of accesses to the shared memory of the acquisition processor increases, the delay time increases in proportion to the delay. Due to such a delay time, there is a problem in that accurate performance information of the time to be measured cannot be collected.
본 발명이 이루고자 하는 기술적 과제는, 이중화된 공유메모리를 사용하여 다수개의 프로세서가 데이터를 수집 및 보고하는 유닉스 시스템에서 프로세서간의 경합 지연으로 인한 프로세서의 지연시간을 줄이는 접근 제어 방법 및 장치를 제공한다.An object of the present invention is to provide an access control method and apparatus for reducing processor latency caused by contention delay between processors in a Unix system in which a plurality of processors collect and report data using redundant shared memory.
상기 기술적 과제를 이루기 위한 본 발명의 공유메모리 접근 제어 장치는, 유닉스 시스템에 대한 수집 데이터를 저장하는 제 1 메모리와 제 2 메모리로 이중화된 공유메모리부; 상기 제 1 메모리에 접근을 허용하거나 금지하는 제 1 세마포어 플래그; 상기 제 2 메모리에 접근을 허용하거나 금지하는 제 2 세마포어 플래그; 상기 제 1 세마포어 플래그와 상기 제 2 세마포어 플래그 중 어느 하나의 세마포어 플래그의 상태를 검색하여 접근허용 상태인 경우 상기 수집 데이터를 상기 검색된 세마포어 플래그가 접근을 허용하는 메모리에 저장되도록 하고, 상기 검색된 세마포어 플래그의 상태가 접근금지 상태인 경우 상기 수집 데이터를 상기 검색되지 않은 세마포어 플래그가 접근을 허용하는 메모리에 저장되도록 하는 수집 프로세서; 및 상기 제 1 메모리와 상기 제 2 메모리에 주기적으로 접근하여 상기 제 1 세마포어 플래그와 상기 제 2 세마포어 플래그 중에서 접근허용 상태인 세마포어 플래그가 접근을 허용하는 메모리에서 상기 수집 데이터를 읽고 보고하는 보고 프로세서;를 포함하는 것을 특징으로 가진다.The shared memory access control apparatus of the present invention for achieving the above technical problem, the shared memory unit dualized into a first memory and a second memory for storing the collection data for the Unix system; A first semaphore flag to allow or prohibit access to the first memory; A second semaphore flag to allow or prohibit access to the second memory; When the state of any one semaphore flag of the first semaphore flag and the second semaphore flag is retrieved and the access state is allowed, the collected data is stored in a memory that allows the retrieved semaphore flag to access the retrieved semaphore flag. A collection processor configured to store the collected data in a memory allowing the undetected semaphore flag to access when the state of the access state is prohibited from access; And a reporting processor periodically accessing the first memory and the second memory to read and report the collected data from a memory to which a semaphore flag that is accessible among the first semaphore flag and the second semaphore flag allows access. It characterized in that it comprises a.
상기 기술적 과제를 이루기 위한 본 발명의 공유메모리 접근 제어 방법은, 유닉스 시스템에서 수집 프로세서가 비동기적으로 데이터를 수집하여 상기 수집된 데이터를 제 1 메모리와 제 2 메모리로 이루어진 이중화된 공유메모리에 저장되도록 상기 공유메모리 접근을 제어하는 방법에 있어서, (a) 상기 수집 프로세서는 수집지역 변수플래그의 값을 읽어 상기 공유메모리중 접근하여야 할 메모리의 위치를 판단하는 단계; (b) 상기 (a)단계에서 판단된 상기 수집 프로세서가 접근하여야 할 소정 메모리의 세마포어 플래그가 잠금 상태인지 해제 상태인지 여부를 판단하는 단계; (c) 상기 (b)단계에서 상기 소정 메모리의 세마포어 플래그가 해제 상태인 경우 상기 수집 프로세서가 접근하여야 할 소정 메모리에 상기 데이터를 저장하는 단계; 및 (d) 상기 (b)단계에서 상기 소정 메모리의 세마포어 플래그가 잠금 상태인 경우 상기 수집 프로세서가 접근하여야 할 소정 메모리와 다른 메모리에 접근하여 시간지연없이 상기 데이터를 저장하는 단계;를 포함하는 것을 특징으로 가진다.In the shared memory access control method of the present invention for achieving the above technical problem, the collection processor in the Unix system to collect the data asynchronously so that the collected data is stored in a redundant shared memory consisting of a first memory and a second memory A method of controlling access to the shared memory, the method comprising: (a) the collecting processor determining a location of a memory to be accessed in the shared memory by reading a value of a collection area variable flag; (b) determining whether a semaphore flag of a predetermined memory to be accessed by the collection processor determined in step (a) is locked or released; (c) storing the data in a predetermined memory to be accessed by the collection processor when the semaphore flag of the predetermined memory is released in step (b); And (d) accessing a memory different from a predetermined memory to be accessed by the collection processor when the semaphore flag of the predetermined memory is locked in step (b), and storing the data without time delay. Have as characteristic.
또한, 상기 기술적 과제를 이루기 위한 본 발명의 공유메모리 접근 제어 방법은, 유닉스 시스템에서 보고 프로세서에 의하여 제 1 메모리와 제 2 메모리로 이루어진 이중화된 공유메모리에 주기적으로 접근하여 상기 공유메모리에 저장되어 있는 데이터를 주기적으로 보고하도록 상기 공유메모리 접근을 제어하는 방법에 있어서, (a) 상기 보고 프로세서는 보고지역 변수 플래그의 값을 읽어 상기 공유메모 리중 접근하여야 할 메모리의 위치를 판단하는 단계; (b) 상기 (a)단계에서 판단된 상기 보고 프로세서가 접근하여야 할 소정 메모리의 세마포어 플래그가 잠금 상태인지 해제 상태인지 여부를 판단하는 단계; 및 (c) 상기 (b)단계에서 상기 보고 프로세서가 접근하여야 할 소정 메모리의 세마포어 플래그가 해제 상태인 경우에 상기 소정 메모리에 저장된 데이터를 읽고 제거하는 단계상기 데이터를 읽고 제거한 후 보고하는 단계;를 포함하는 것을 특징으로 가진다.In addition, the shared memory access control method of the present invention for achieving the above technical problem, in the Unix system is periodically stored in the shared memory by periodically accessing the redundant shared memory consisting of the first memory and the second memory by the report processor A method of controlling access to the shared memory to report data periodically, the method comprising: (a) determining, by the reporting processor, a location of a memory to be accessed in the shared memory by reading a value of a report area variable flag; (b) determining whether a semaphore flag of a predetermined memory to be accessed by the report processor determined in step (a) is locked or released; And (c) reading and removing data stored in the predetermined memory when the semaphore flag of the predetermined memory to be accessed by the reporting processor is released in step (b). It is characterized by including.
이하 첨부된 도면을 참조하여 본 발명의 실시 예를 상세히 설명하면 다음과 같다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 2는 본 발명의 일실시예에 따른 유닉스 시스템에서 이중화된 공유메모리 접근 제어 장치의 블럭도이다.2 is a block diagram of a dual shared memory access control device in a Unix system according to an embodiment of the present invention.
도 2를 참조하면, 수집 프로세서(200)는 비동기적으로 데이터를 수집하고 수집한 데이터를 공유메모리(220)에 저장하기 위하여 현재 접근해야 할 공유메모리(220) 위치를 수집지역 변수 플래그(210)에서 할당받아 공유메모리(220)에 접근한다. 여기에서 수집하는 데이터에는 대량의 트래픽 정보와 시스템 성능 정보를 포함한다.Referring to FIG. 2, the
공유메모리(220)는 제 1 메모리(221)와 제 2 메모리(222)로 구성되어 있는데 각각의 메모리는 수집 프로세서(200)에서 수집한 데이터를 저장하게 된다.The shared
제 1 세마포어 플래그(250)는 공유메모리(220)의 제 1 메모리(221)의 접근을 허용하거나 금지하는 역할을 수행한다. 즉, 수집 프로세서(200)에서 제 1 메모리(221)를 사용하고 있는 경우에는 보고 프로세서(240)에서 제 1 메모리(221)에 접근 을 금지하고, 보고 프로세서(240)에서 제 1 메모리(221)를 사용하고 있는 경우에는 수집 프로세서(200)에서 제 1 메모리(221)에 접근을 금지하게 된다.The
제 2 세마포어 플래그(260)는 공유메모리(220)의 제 2 메모리(222)의 접근을 허용하거나 금지하는 역할을 수행한다. 즉, 수집 프로세서(200)에서 제 2 메모리(222)를 사용하고 있는 경우에는 보고 프로세서(240)에서 제 2 메모리(222)에 접근을 금지하고, 보고 프로세서(240)에서 제 2 메모리(222)를 사용하고 있는 경우에는 수집 프로세서(200)에서 제 2 메모리(222)에 접근을 금지하게 된다.The
수집지역 변수 플래그(210)는 유닉스 시스템상의 레지스터(Register)로써 수집 프로세서(200)가 현재 수집한 데이터를 저장할 수 있는 공유메모리(220)의 지역을 할당해 주게 된다. 즉, 수집지역 변수 플래그(210)는 공유메모리(220)의 제 1 메모리(221)가 해제 상태인지 공유메모리(220)의 제 2 메모리(222)가 해제 상태인지 여부를 판단하여 접근이 허용된 메모리에 수집 프로세서(200)에서 수집된 데이터를 저장할 수 있도록 한다.The collection
도 2에서는 수집지역 변수 플래그(210)가 수집 프로세서(200)에 현재 데이터를 저장할 수 있는 지역을 제 1 메모리(221)로 할당한 경우이다.In FIG. 2, the collection
수집 프로세서(200)는 수집된 데이터를 공유메모리(220)의 제 1 메모리(221)에 쓰고자 할 때 제 1 세마포어 플래그(250)를 잠근 후에 데이터를 쓰게 된다.The
보고 프로세서(240)는 공유메모리(220)에서 주기적으로 데이터를 읽어와서 제거한 후 보고하는 프로세서이다. 보고 프로세서(240)는 공유메모리(220)를 주기적으로 번갈아 가면서 데이터를 읽고 그 데이터를 제거한다.The
보고 프로세서(240)에서 공유메모리(220) 중에서 어느 메모리에 접근할지 여부는 보고지역 변수 플래그(230)에 의하여 결정된다. 보고지역 변수 플래그(230)는 보고 프로세서(240)에 의하여 제 2 메모리(222)에 대한 데이터를 읽고 그 데이터를 제거하며 보고하는 동작이 종료되면, 제 1 메모리(221)에 대한 데이터를 읽고 그 데이터를 제거하며 보고하는 동작이 수행되도록 한다.Which memory of the shared
도 3은 본 발명의 다른 일실시예에 따른 유닉스 시스템에서 이중화된 공유메모리 접근 제어 장치의 블럭도이다.3 is a block diagram of a dual shared memory access control device in a Unix system according to another embodiment of the present invention.
도 3을 참조하면, 도 3에서는 수집지역 변수 플래그(210)가 수집 프로세서(200)에 현재 데이터를 저장할 수 있는 지역을 제 2 메모리(222)로 할당한 경우이다. 그리고, 보고지역 변수 플래그(230)는 보고 프로세서(240)에 현재 데이터를 읽고 제거하며 보고할 수 있는 지역을 제 1 메모리(221)로 할당한 경우이다.Referring to FIG. 3, in FIG. 3, the collection
도 3에서 미설명된 부분을 도 2를 참조하기로 한다.A part not described in FIG. 3 will be referred to FIG. 2.
도 4는 도 2와 도 3의 수집 프로세서에서 이중화된 공유메모리에 접근하는 방법에 대한 흐름도이다.4 is a flowchart illustrating a method of accessing a redundant shared memory in the acquisition processor of FIGS. 2 and 3.
도 4를 참조하면, 먼저, 수집지역 변수 플래그(210)의 값을 읽는다(S400).Referring to FIG. 4, first, the value of the collection
다음으로, 접근할 수 있는 공유메모리(220)의 위치가 제 1 메모리(221)인지 여부를 판단한다(S410).Next, it is determined whether the location of the accessible shared
단계S410에서의 판단결과, 제 1 메모리(221)로 판단되는 경우에는 단계S420으로 진행한다. 한편, 단계S410에서의 판단결과, 제 1 메모리(221)로 판단되지 않는 경우에는 단계S425로 진행한다.If it is determined in step S410 that the
단계S420에서는, 제 1 세마포어 플래그(250)의 값을 읽는다.In step S420, the value of the
한편, 단계S425에서는, 제 2 세마포어 플래그(260)의 값을 읽는다.On the other hand, in step S425, the value of the
단계S420 다음으로는 제 1 세마포어 플래그(250)가 해제 상태인지 여부를 판단한다(S430). 단계S430에서의 판단결과, 해제 상태라고 판단된 경우에는 단계S440으로 진행한다. 한편, 단계S430에서의 판단결과, 잠금 상태라고 판단된 경우에는 단계S445로 진행한다.In operation S420, it is determined whether the
한편, 단계S425 다음으로는 제 2 세마포어 플래그(260)가 해제 상태인지 여부를 판단한다(S435). 단계S435에서의 판단결과, 해제 상태라고 판단된 경우에는 단계S445로 진행한다. 한편, 단계S435에서의 판단결과, 잠금 상태라고 판단된 경우에는 단계S440으로 진행한다.Meanwhile, after step S425, it is determined whether the
단계S440에서 수집 프로세서(200)는 수집된 데이터를 제 1 메모리(221)에 쓰기 위하여 제 1 세마포어 플래그(250)를 잠근다.In operation S440, the
단계S445에서 수집 프로세서(220)는 수집된 데이터를 제 2 메모리(222)에 쓰기 위하여 제 2 세마포어 플래그(260)를 잠근다.In operation S445, the
단계S440 다음으로, 수집 프로세서(200)는 수집된 데이터를 제 1 메모리(221)에 쓰게된다(S450).Next, the
한편, 단계S445 다음으로, 수집 프로세서(200)는 수집된 데이터를 제 2 메모리(222)에 쓰게된다(S455).Meanwhile, after step S445, the
단계S450 다음으로, 수집 프로세서(200)는 수집된 데이터를 제 1 메모리(221)에 다 쓰고난 후 제 1 세마포어 플래그(250)를 해제한다(S460).In operation S450, the
한편, 단계S455 다음으로, 수집 프로세서(200)는 수집된 데이터를 제 2 메모리(222)에 다 쓰고난 후 제 2 세마포어 플래그(260)를 해제한다(S465).Meanwhile, after step S455, the
이후에, 수집 프로세서(200)는 상기와 같은 동작을 반복 수행함으로써 수집된 데이터를 공유메모리(220)에 쓰게 된다.Thereafter, the
상기와 같은 방법으로 수집 프로세서(240)는 보고 프로세서(200)가 공유메모리(220)를 점유하고 있는 시간에도 지연시간 없이 수집된 트래픽과 성능 정보를 공유메모리(220)에 저장 할 수 있다.In this manner, the
도 5는 도 2와 도 3의 보고 프로세서에서 이중화된 공유메모리에 접근하는 방법에 대한 흐름도이다.5 is a flowchart illustrating a method of accessing a redundant shared memory in the report processor of FIGS. 2 and 3.
도 5를 참조하면, 먼저, 보고지역 변수 플래그(230)의 값을 읽는다(S500).Referring to FIG. 5, first, the value of the reporting area
다음으로, 접근할 수 있는 공유메모리(220)의 위치가 제 1 메모리(221)인지 여부를 판단한다(S510).Next, it is determined whether the accessible location of the shared
단계S510에서의 판단결과, 제 1 메모리(221)로 판단되는 경우에는 단계S520으로 진행한다. 한편, 단계S510에서의 판단결과, 제 1 메모리(221)로 판단되지 않는 경우에는 단계S525로 진행한다.If it is determined in step S510 that the
단계S520에서는 제 1 세마포어 플래그(250)의 값을 읽는다.In step S520, the value of the
단계S525에서는 제 2 세마포어 플래그(260)의 값을 읽는다.In step S525, the value of the
단계S520 다음으로는 제 1 세마포어 플래그(250)가 해제 상태인지 여부를 판단한다(S530). 단계S530에서의 판단결과, 해제 상태라고 판단된 경우에는 단계S540으로 진행한다. 한편, 단계S530에서의 판단결과, 잠금 상태라고 판단된 경우에는 단계S520으로 복귀한다.In operation S520, it is determined whether the
한편, 단계S525 다음으로는 제 2 세마포어 플래그(260)가 해제 상태인지 여부를 판단한다(S535). 단계S535에서의 판단결과, 해제 상태라고 판단된 경우에는 단계S545로 진행한다. 한편, 단계S535에서의 판단결과, 잠금 상태라고 판단된 경우에는 단계S525로 복귀한다.On the other hand, after step S525 it is determined whether the
단계S540에서 보고 프로세서(240)는 제 1 메모리(221)에 저장되어 있는 데이터를 읽고 제거하기 위하여 제 1 세마포어 플래그(250)를 잠근다.In operation S540, the reporting
단계S545에서 보고 프로세서(240)는 제 2 메모리(222)에 저장되어 있는 데이터를 읽고 제거하기 위하여 제 2 세마포어 플래그(260)를 잠근다.In step S545, the reporting
단계S540 다음으로, 보고 프로세서(240)는 제 1 메모리(221)에 저장되어 있는 데이터를 읽고 제거한다(S550).Next, the
한편, 단계S545 다음으로, 보고 프로세서(240)는 제 2 메모리(222)에 저장되어 있는 데이터를 읽고 제거한다(S555).Meanwhile, after step S545, the
단계S550 다음으로, 보고 프로세서(240)는 제 1 메모리(221)에 저장되어 있는 데이터를 제거한 후 제 1 세마포어 플래그(250)를 해제한다(S560).In operation S550, the
한편, 단계S555 다음으로, 보고 프로세서(240)는 제 2 메모리(222)에 저장되어 있는 데이터를 제거한 후 제 2 세마포어 플래그(260)를 해제한다(S565).Meanwhile, after step S555, the reporting
단계S560 다음으로, 보고지역 변수 플래그(230)를 변경한다(S570).In step S560, the reporting area
한편, 단계S565 다음으로, 보고지역 변수 플래그(230)를 변경한다(S575).On the other hand, after step S565, the reporting area
이후에, 보고 프로세서(240)는 상기와 같은 동작을 반복 수행함으로써 공유 메모리(220)에 저장되어 있는 데이터를 읽고 제거한 후 이를 보고한다.Thereafter, the
상기와 같은 방법으로 보고 프로세서(240)는 수집 프로세서(200)가 공유메모리(220)를 점유하고 있는 시간에도 정확한 모니터링 주기에 따라서 데이터를 읽고 보고할 수 있게 된다.In this manner, the
이상에서와 같이 도면과 명세서에서 최적 실시예가 개시되었다. 여기서 특정한 용어들이 사용되었으나, 이는 단지 본 발명을 설명하기 위한 목적에서 사용된 것이지 의미한정이나 특허청구범위에 기재된 본 발명의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 특허청구범위의 기술적 사상에 의해 정해져야 할 것이다.As described above, optimal embodiments have been disclosed in the drawings and the specification. Although specific terms have been used herein, they are used only for the purpose of describing the present invention and are not intended to limit the scope of the invention as defined in the claims or the claims. Therefore, those skilled in the art will understand that various modifications and equivalent other embodiments are possible from this. Therefore, the true technical protection scope of the present invention will be defined by the technical spirit of the appended claims.
본 발명은 유닉스 시스템에서 이중화된 공유메모리 접근 제어 방법 및 장치에 관한 것으로, 데이터를 수집하는 수집 프로세서와 수집된 데이터를 공유메모리에서 읽고 제거한 후에 보고하는 보고 프로세서로 이루어진 유닉스 시스템에서 상호 프로세서간의 공유메모리 접근 지연시간을 줄여서 주기적인 트래픽 및 성능 감시의 효율을 높일 수 있다.The present invention relates to a method and apparatus for dually controlling shared memory access in a Unix system. The present invention relates to a shared memory between mutual processors in a Unix system comprising a collecting processor for collecting data and a reporting processor for reading and removing the collected data from the shared memory. By reducing access latency, you can increase the efficiency of periodic traffic and performance monitoring.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020040104917A KR100596394B1 (en) | 2004-12-13 | 2004-12-13 | Method and apparatus for controlling access shared memory in a UNIX system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020040104917A KR100596394B1 (en) | 2004-12-13 | 2004-12-13 | Method and apparatus for controlling access shared memory in a UNIX system |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20060066341A true KR20060066341A (en) | 2006-06-16 |
KR100596394B1 KR100596394B1 (en) | 2006-07-04 |
Family
ID=37161194
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020040104917A KR100596394B1 (en) | 2004-12-13 | 2004-12-13 | Method and apparatus for controlling access shared memory in a UNIX system |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100596394B1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101110550B1 (en) * | 2009-04-08 | 2012-02-08 | 한양대학교 산학협력단 | Processor, Multi-processor System And Method For Controlling Access Authority For Shared Memory In Multi-processor System |
KR20140068909A (en) * | 2011-09-29 | 2014-06-09 | 오라클 인터내셔날 코포레이션 | System and method for supporting a self-tuning locking mechanism in a transactional middleware machine environment |
KR20190094778A (en) * | 2018-02-06 | 2019-08-14 | 엘에스산전 주식회사 | Dual memory structure and method for processing message of PLC using thereof |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5179665A (en) | 1987-06-24 | 1993-01-12 | Westinghouse Electric Corp. | Microprocessor information exchange with updating of messages by asynchronous processors using assigned and/or available buffers in dual port memory |
KR970012196A (en) * | 1995-08-24 | 1997-03-29 | 김광호 | System redundancy implementing device including shared memory |
KR20000003010A (en) * | 1998-06-25 | 2000-01-15 | 윤종용 | Duplication device of processor using two common memorys and method thereof |
-
2004
- 2004-12-13 KR KR1020040104917A patent/KR100596394B1/en not_active IP Right Cessation
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101110550B1 (en) * | 2009-04-08 | 2012-02-08 | 한양대학교 산학협력단 | Processor, Multi-processor System And Method For Controlling Access Authority For Shared Memory In Multi-processor System |
KR20140068909A (en) * | 2011-09-29 | 2014-06-09 | 오라클 인터내셔날 코포레이션 | System and method for supporting a self-tuning locking mechanism in a transactional middleware machine environment |
KR20190094778A (en) * | 2018-02-06 | 2019-08-14 | 엘에스산전 주식회사 | Dual memory structure and method for processing message of PLC using thereof |
Also Published As
Publication number | Publication date |
---|---|
KR100596394B1 (en) | 2006-07-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101013266B1 (en) | Transient cache storage | |
US7191272B2 (en) | Adaptive reader-writer lock | |
CN102222015B (en) | Detect the method and system of the deadlock in multithread programs | |
CN101253483B (en) | Method and system for managing a resource lock | |
US20090172686A1 (en) | Method for managing thread group of process | |
JPH0689221A (en) | Method and apparatus for controlling memory in computer system | |
US8682850B2 (en) | Method of enhancing de-duplication impact by preferential selection of master copy to be retained | |
US20100287203A1 (en) | Partitioning of contended synchronization objects | |
CN103488563A (en) | Data race detection method and device for parallel programs and multi-core processing system | |
CN107783908B (en) | Linux kernel memory leakage detection method | |
EP2936313B1 (en) | System and method for implementing numa-aware statistics counters | |
CN113778338A (en) | Distributed storage data reading efficiency optimization method, system, device and medium | |
KR20100004605A (en) | Method for selecting node in network system and system thereof | |
KR100596394B1 (en) | Method and apparatus for controlling access shared memory in a UNIX system | |
CN106055281A (en) | Data writing method and device | |
JP2009015509A (en) | Cache memory device | |
JP2000029776A (en) | Memory request canceling method | |
CN110865869B (en) | Method and system for extracting memory access characteristics of virtual machine on Shenwei architecture | |
US6757785B2 (en) | Method and system for improving cache performance in a multiprocessor computer | |
CN112947851A (en) | NUMA system and page migration method in NUMA system | |
CN103218285A (en) | Method and device for monitoring memory performance based on CPU (Central Processing Unit) register | |
EP0352462A2 (en) | Method and apparatus for calculating disk-access footprints | |
CN106775450B (en) | A kind of data distribution method in mixing storage system | |
CN106155923B (en) | The method and apparatus of memory sharing | |
CN111221658B (en) | System deadlock detection method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20110609 Year of fee payment: 6 |
|
LAPS | Lapse due to unpaid annual fee |