KR20010041295A - Leasing for failure detection - Google Patents
Leasing for failure detection Download PDFInfo
- Publication number
- KR20010041295A KR20010041295A KR1020007009395A KR20007009395A KR20010041295A KR 20010041295 A KR20010041295 A KR 20010041295A KR 1020007009395 A KR1020007009395 A KR 1020007009395A KR 20007009395 A KR20007009395 A KR 20007009395A KR 20010041295 A KR20010041295 A KR 20010041295A
- Authority
- KR
- South Korea
- Prior art keywords
- server
- lease
- client
- resource
- call
- 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
- 238000001514 detection method Methods 0.000 title claims description 15
- 238000011084 recovery Methods 0.000 claims abstract description 56
- 230000004044 response Effects 0.000 claims abstract description 7
- 238000000034 method Methods 0.000 claims description 83
- 238000012545 processing Methods 0.000 claims description 37
- 238000007726 management method Methods 0.000 description 32
- 230000015654 memory Effects 0.000 description 17
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 9
- 230000007246 mechanism Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 230000002028 premature Effects 0.000 description 2
- 238000005096 rolling process Methods 0.000 description 2
- 239000011800 void material Substances 0.000 description 2
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 229910052710 silicon Inorganic materials 0.000 description 1
- 239000010703 silicon Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3006—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
-
- 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/465—Distributed object oriented systems
-
- 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/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Multimedia (AREA)
- Mathematical Physics (AREA)
- Quality & Reliability (AREA)
- Computer And Data Communications (AREA)
- Multi Processors (AREA)
Abstract
리스를 이용하여 고장(failure)을 검출하고 고장 복구를 수행하는 시스템이 제공된다. 본 시스템을 사용하는데 있어서, 클라이언트는 서버로부터의 리스를 요청하여, 시간 기간 동안 서버에 의해 관리되는 자원을 이용한다. 이 요청에 응답해서, 서버는 리스를 허용하고, 클라이언트는 계속해서 리스의 갱신을 요청한다. 만일 클라이언트가 리스를 갱신하기를 실패하면, 서버는, 클라이언트에 에러가 발생하였다는 것을 검출한다. 이와 유사하게, 만일 서버가 갱신 요청에 응답하지 못하면, 클라이언트는 서버에 에러가 발생하였다는 것을 검출한다. 리스 수립의 일부로서, 클라이언트와 서버는, 각각이 상호 고장났는 지를 호출하는 고장 복구 루틴을 교환한다.A system is provided that uses leases to detect failures and perform fault recovery. In using the system, the client requests a lease from the server, using the resources managed by the server for a period of time. In response to this request, the server allows the lease and the client continues to request an update of the lease. If the client fails to update the lease, the server detects that an error has occurred in the client. Similarly, if the server does not respond to the update request, the client detects that an error has occurred in the server. As part of the lease establishment, the client and server exchange fault recovery routines that call if each has failed.
Description
적당한 자원 관리는 컴퓨터의 효율적이고도 효과적인 사용에 중요한 특징이다. 일반적으로, 자원 관리는 적당한 시간, 예를 들어, 요청자가 더 이상 자원을 요청하지 않을 때 자원을 재할당하는 것은 물론 요청에 응답해서 자원(즉, 메모리)을 할당하는 것을 포함한다. 일반적으로, 자원은 컴퓨터를 실행하는 연산 엔터티(즉, 어플리케이션, 프로그램, 애플릿 등)이라는 데이터를 포함한다.Proper resource management is an important feature for the efficient and effective use of computers. In general, resource management involves allocating resources (ie, memory) in response to a request as well as reallocating resources at a suitable time, for example, when the requestor no longer requests them. Generally, resources include data called computational entities (ie, applications, programs, applets, etc.) running a computer.
실제로, 컴퓨터 상에서 실행하는 어플리케이션이 자원을 참조하기를 원하면, 컴퓨터는 먼저 어플리케이션이 적절히 이들을 참조할 수 있도록 자원을 할당하거나 또는 지정하여야 한다. 어플리케이션이 자원을 더 이상 참조하지 않으면, 컴퓨터는 재사용을 위해 자원을 회수(deallocating or reclaim)할 수 있다. 어드레스, 어레이 인덱스, 독특한 값, 포인터 등과 같은 다양한 방법으로 처리가 실시될 수 있다.Indeed, if an application running on a computer wants to refer to a resource, the computer must first assign or assign resources so that the application can refer to them appropriately. When an application no longer references a resource, the computer can deallocate or reclaim it for reuse. Processing can be performed in a variety of ways, such as addresses, array indexes, unique values, pointers, and the like.
자원 관리는, 단일 컴퓨터의 경우에는, 어플리케이션이 더 이상 자원을 참조하지 않거나 또는 전력 고장 후와 같이 자원이 회수될 때를 가리키는 이벤트가 판정되기 쉽기 때문에 비교적 간단한다. 다수의 컴퓨터를 연결하는 분산 시스템에 대한 자원 관리는, 몇몇 서로 다른 컴퓨터 내의 어플리케이션들이 동일한 자원을 사용하기 때문에 보다 힘들다.Resource management is relatively simple because, in the case of a single computer, an event is likely to be determined when the application no longer references the resource or when the resource is reclaimed, such as after a power failure. Resource management for distributed systems that connect multiple computers is more difficult because applications within several different computers use the same resources.
분산 시스템에서의 단란으로 자원을 부적절하고 조숙하게 회수하게 되는 결과가 되거나 또는 자원을 회수하지 못하는 결과가 될 수 있다. 예를 들어, 분산 시스템 내의 서로 다른 컴퓨터들 상에서 실행하는 다수의 어플리케이션들은 다른 머신에 위치된 자원을 참조할 수 있다. 만일 자원이 위치한 컴퓨터와 이와 같은 자원을 참조하는 어플리케이션 간의 접속이 중단되면, 이때 컴푸터는 보다 빨리 자원을 회수할 수 있다. 선택적으로, 컴퓨터는 어플리케이션이 자원을 액세스하는데 실패한 연장된 시간 기간에도 불구하고, 자원을 영구히 유지할 수 있다.Disruption in distributed systems can result in inappropriate and premature recovery of resources or failure to recover resources. For example, multiple applications running on different computers in a distributed system may refer to resources located on different machines. If the connection between the computer where the resource is located and an application that references such a resource is interrupted, then the computer can retrieve the resource more quickly. Optionally, the computer can keep the resource permanent, despite an extended time period during which the application failed to access the resource.
이와 같은 문제점으로, "분산 가비지 콜렉션(distributed garbage collection)"이라고 하는, 네트워크 자원을 관리하는 시스템을 개발하게 되었다. 이 용어는 어플리케이션 또는 네트워크 내의 서로 다른 컴퓨터 상에서 실행하는 어플리케이션의 그룹에 의해 사용되는 자원을 자동적으로 관리하는 분산 시스템에 대해 언어 또는 런타임 시스템에 의해 제공되는 시설을 가리킨다.This problem led to the development of a system for managing network resources called "distributed garbage collection." The term refers to a facility provided by a language or runtime system for a distributed system that automatically manages resources used by an application or a group of applications running on different computers in a network.
일반적으로, 가비지 콜렉션은 어플리케이션의 임의의 일부에 의해 더 이상 참조되지 않을 때 장래에 사용하기 위해 자원이 자유로워(freed)질 수 있는 개념을 이용하고 있다. 분산 가비지 콜렉션은 이 개념을 임의의 컴퓨터 상의 어떠한 어플리케이션도 자원을 참조하지 않을 때 자원을 회수하는 분산 컴퓨팅의 영역에서 연장시켜 적용하고 있다.In general, garbage collection makes use of the concept that resources can be freed for future use when they are no longer referenced by any part of the application. Distributed garbage collection extends this concept in the area of distributed computing where resources are recovered when no application on any computer references the resource.
분산 가비지 콜렉션은 할당된 자원과 자원에의 참조 간의 무결성(integrity)을 유지하여야 한다. 다른 말로 표현해서, 네트워크 내의 임의의 컴퓨터 상에서 실행하는 어플리케이션이 해당 자원을 계속 참조할 때 시스템이 자원을 회수하거나 또는 자원을 자유롭게(freed)하는 것이 허용되어서는 안된다. "참조 무결성(referential integrity)"이라고 하는 자원 참조 결속(reference-to-resource binding)은, 이 참조가 참조하는 자원에 액세스하는 것이 항상 허용되는 것을 보장하지 않는다. 예를 들어, 네트워크 장비들은 이와 같은 액세스를 불가능하게 할 수 있다. 그러나, 무결성은, 만일 참조가 임의의 자원을 액세스한다면 참조가 먼저 제공되었던 동일한 자원일 것이라는 것을 보장한다.Distributed garbage collection must maintain the integrity between allocated resources and references to resources. In other words, when an application running on any computer in the network continues to reference the resource, the system should not be allowed to reclaim the resource or free it. Reference-to-resource binding, referred to as "referential integrity," does not guarantee that access to the resource referenced by this reference is always allowed. For example, network equipment may disable such access. However, integrity ensures that if a reference accesses any resource, the reference will be the same resource that was provided first.
가비지 콜렉션을 이용하는 분산 시스템은 또한 무한한 미래의 일정 시점에 더 이상 참조되지 않는 자원을 회수하여야 한다. 다른 말로 표현하면, 시스템은 "메모리 리크(memory leak)"에 대한 보장을 제공하여야 한다. 메모리 리크는, 모든 어플리케이션이 자원에의 참조를 포기할 때 발생할 수 있지만, 시스템은 재사용하기 위해, 예를 들어 일부 어플리케이션이 여전히 자원을 참조하는 부정확한 판정 때문에 자원을 회수하지 못한다.Distributed systems using garbage collection must also reclaim resources that are no longer referenced at some point in the infinite future. In other words, the system should provide a guarantee of "memory leak." Memory leaks can occur when all applications give up references to resources, but the system does not reclaim resources for reuse, for example because of inaccurate determination that some applications still reference resources.
참조 무결성 실패 및 메모리 리크는 흔히 자원을 참조하는 어플리케이션과, 그와 같은 자원의 할당 및 회수를 관리하는 가비지 콜렉션 시스템 간의 단락에 기인한다. 예를 들어, 자원을 참조하는 어플리케이션과, 이 자원을 관리하는 가비지 콜렉션 시스템 간의 네트워크 접속의 단락은, 가비지 콜렉션 시스템이, 자원을 언제 그리고 회수하여야 할지 말아야 할지의 여부를 판정하는 것을 방지한다. 선택적으로, 가비지 콜렉션 시스템은 어플리케이션이 선정된 시간 내의 자원을 액세스하지 못하였기 때문에, 이 자원을 수집할 수 있는 것으로 그릇 판정할 수 있다. 이와 같은 메커니즘이 메모리 리크없이 참조 무결성을 유지할 수 있도록 보장하기 위해 시도함으로써, 분산 가비지 콜렉션 메커니즘을 개선하기 위한 많은 기술이 사용되고 있다. 한가지 종래 기술의 방법은, 참조 카운팅(reference counting)의 형태를 사용하는 것인데, 여기서 각각의 자원을 참조하는 많은 어플리케이션에 대해 카운트가 유지된다. 자원의 카운트가 제로가 되면, 가비지 콜렉션 시스템은 자원을 회수할 수 있다. 이와 같은 참조 카운팅 스킴은, 만일 자원이 대응하는 자원 카운터로서 생성될 때에는 유효하다. 이와 같은 경우에 가비지 콜렉션 시스템은 부수적인 어플리케이션이 자원을 참조함에 따라 자원의 참조 카운트를 증가시키고, 어플리케이션이 더 이상 자원을 참조하지 않을 때 카운트를 감소시킨다.Referential integrity failures and memory leaks are often due to short circuits between applications that reference resources and garbage collection systems that manage the allocation and retrieval of such resources. For example, a short circuit in the network connection between an application referencing a resource and a garbage collection system managing this resource prevents the garbage collection system from determining when and whether resources should be reclaimed. Optionally, the garbage collection system may erroneously determine that an application could collect this resource because the application did not have access to the resource within the predetermined time. Many techniques are being used to improve distributed garbage collection mechanisms by attempting to ensure that such mechanisms maintain referential integrity without memory leaks. One prior art method is to use a form of reference counting, where counts are maintained for many applications that reference each resource. When the resource count reaches zero, the garbage collection system can retrieve the resource. This reference counting scheme is valid if the resource is generated as a corresponding resource counter. In this case, the garbage collection system increments the reference count of the resource as the secondary application references the resource and decreases the count when the application no longer references the resource.
그러나, 참조 카운팅은 특히 분산 시스템에서 발생할 수 있는 고장으로 인해문제가 되고 있다. 이와 같은 고장은, 자원이 더 이상 참조되지 않는 다는 것을 가비지 콜렉션 시스템에 통지하는 메시지의 전달을 방지하는 컴퓨터 또는 어플리케이션 고장 또는 네트워크 고장의 형태를 취할 수 있다. 만일 메시지가 네트워크 단락으로 인해 전달되지 않는다면, 가비지 콜렉션 시스템은 자원을 언제 회수할 지를 알지 못한다.However, reference counting is problematic because of the failures that can occur, particularly in distributed systems. Such failures may take the form of computer or application failures or network failures that prevent the delivery of a message that informs the garbage collection system that resources are no longer referenced. If the message is not delivered due to a network short circuit, the garbage collection system does not know when to reclaim the resource.
이와 같은 고장을 방지하기 위해, 일부 종래 기술의 참조 카운팅 스킴은, "핑 백(ping back)"이라고도 하는 "키프-얼라이브(keep-alive)" 메시지를 포함한다. 이 스킴에 따르면, 네트워크 내의 어플리케이션은, 자원을 관리하는 가비지 콜렉션 시스템에 메시지를 전송하고, 어플리케이션이 여전히 통신할 수 있다는 것을 가리킨다. 이와 같은 메시지들은 가비지 콜렉션 시스템이 자원에의 참조를 중지하는 것을 방지한다. 이와 같은 "키프-얼라이브" 메시지를 수신하지 못하는 것은, 가비지 콜렉션 시스템이 자원에 대한 참조 카운트를 감소시키고, 따라서, 카운트가 제로에 도달할 때, 가비지 콜렉션 시스템이 자원을 회수할 수 있다는 것을 가리킨다. 그러나, 이는 네트워크 고장 때문에, "키프-얼라리브" 메시지 수신의 고장으로 인해, 제로에 도달하는 참조 카운트를 따라 자원을 조숙하게 회수하는 결과가 초래될 수 있다. 이는 참조 무결성 조건을 위반한다.To prevent such a failure, some prior art reference counting schemes include a "keep-alive" message, also known as a "ping back." According to this scheme, an application in the network sends a message to the garbage collection system that manages the resource, indicating that the application can still communicate. Such messages prevent the garbage collection system from stopping references to resources. Not receiving such a "keep-alive" message indicates that the garbage collection system decrements the reference count for the resource, and therefore, when the count reaches zero, the garbage collection system can reclaim the resource. However, this may result in premature reclamation of resources along a reference count that reaches zero, due to a failure of the "keep-alive" message reception due to network failure. This violates the referential integrity condition.
가비지 콜렉션 시스템에서 참조 무결성 문제를 해결하기 위한 다른 방법은, 참조 카운트를 유지할 뿐 아니라, 자원을 참조하는 각각의 연산 엔터티에 대응하는 식별자를 유지하는 것이다. 이에 대해서는, A. Birrell 등에 의한 "Distributed Garbage Collection for Network Objects"(No. 116, digital Systems Research Center, December 15, 1993)을 참조한다. 이 방법은 참조 카운팅 스킴과 동일한 문제가 있다. 또한, 이 방법은 각각의 자원을 참조하는 각각의 연산 엔터티에 대해 독특한 식별자를 부가할 것을 필요로 하여, 분산 시스템 내의 통신 및 기억장치 조건(즉, 각각의 자원을 참조하는 어플리케이션에 대응하는 식별자의 리스트)을 불필요하게 증가시키는 오버헤드를 낳는다.Another way to solve the referential integrity problem in the garbage collection system is to not only maintain a reference count, but also maintain an identifier corresponding to each operation entity referencing a resource. See, for example, "Distributed Garbage Collection for Network Objects" (No. 116, digital systems research center, December 15, 1993) by A. Birrell et al. This method has the same problem as the reference counting scheme. In addition, this method requires the addition of a unique identifier for each computational entity that references each resource, so that communication and storage conditions within the distributed system (ie, an identifier that corresponds to an application that references each resource). This leads to the overhead of unnecessarily increasing the list).
본 발명은 총체적으로 데이터 처리 시스템에 관한 것으로, 더 상세하게는 데이터 처리 시스템에서의 고장 검출(failure detection) 및 복구(recovery)를 위한 리싱에 관한 것이다.The present invention relates generally to data processing systems and, more particularly, to leasing for failure detection and recovery in data processing systems.
본 명세서에 일체화되고 그 일부를 구성하는 첨부하는 도면은 상세한 설명과 함께 본 발명의 실시예를 예시하며, 본 발명의 장점 및 원리를 설명하는 역할을 한다.The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention in conjunction with the description, and serve to explain the advantages and principles of the invention.
도 1은 본 발명의 실시예에 따른 어플리케이션 호출 프로세서(application call processor)에 의해 수행되는 단계들의 순서도.1 is a flow chart of the steps performed by an application call processor in accordance with an embodiment of the present invention.
도 2는 본 발명의 실시예에 따라 더티 호출(dirty call)를 처리하는 서버 호출 프로세서에 의해 수행되는 단계들의 순서도.2 is a flow chart of the steps performed by a server call processor that handles a dirty call in accordance with an embodiment of the invention.
도 3은 본 발명의 실시예에 따라 클린 호출(clean call)를 처리하는 서버 호출 프로세서에 의해 수행되는 단계들의 순서도.3 is a flow chart of steps performed by a server call processor that handles a clean call in accordance with an embodiment of the invention.
도 4는 본 발명의 실시예에 따라 가비지 콜렉션 프로세스(garbage collection process)를 초기화하는 서버 호출 프로세서에 의해 수행되는 단계들의 순서도.4 is a flowchart of steps performed by a server call processor for initializing a garbage collection process in accordance with an embodiment of the present invention.
도 5는 분산 처리 시스템 내의 호출의 바람직한 흐름도.5 is a preferred flow diagram of a call within a distributed processing system.
도 6은 본 발명에 따른 메소드 호출 서비스(method invocation service)의 실시를 위한 구성요소의 블럭도.6 is a block diagram of components for implementing a method invocation service in accordance with the present invention.
도 7은 본 발명의 실시예에 사용될 수 있는 분산 처리 시스템도.7 is a distributed processing system diagram that may be used in embodiments of the present invention.
도 8은 본 발명의 실시예에 따른 분산 처리 시스템의 플랫폼 내의 개별적인 소프트웨어 구성요소도.8 is a separate software component diagram within a platform of a distributed processing system according to an embodiment of the present invention.
도 9는 본 발명의 대체 실시예에 의해 사용될 수 있는 분산 처리 시스템에서의 기억장소를 리스하기 위한 데이타 처리 시스템도.9 is a data processing system diagram for leasing storage in a distributed processing system that may be used by alternative embodiments of the present invention.
도 10은 본 발명의 대체 실시예에 따라 서버로부터의 리스를 요청할 때 클라이언트에 의해 수행되는 단계들의 순서도.10 is a flow chart of the steps performed by a client when requesting a lease from a server according to an alternative embodiment of the present invention.
도 11은 본 발명의 대체 실시예에 따라 클라이언트가 리스를 요청할 때 서버에 의해 수행되는 단계들의 순서도.11 is a flowchart of steps performed by a server when a client requests a lease, in accordance with an alternative embodiment of the present invention.
본 발명에 따르면, 분산 시스템 내의 당사자, 예를 들면, 자원에의 참조를 유지하는 어플리케이션과, 자원을 관리하는 가비지 콜렉션 시스템이 자원 및 자원에의 참조가 보장될 것이라는 것에 동의하는 시간 기간 동안 자원을 리스함으로써 값비싼 메모리 리크없이 참조 무결성이 보장된다. 리스 기간의 종료시에, 자원에의 참조가 계속하는 보장이 경과해서, 가비지 콜렉션 시스템이 자원을 회수할 수 있게 된다. 자원에의 참조를 보유하는 어플리케이션과, 자원을 관리하는 가비지 콜렉션 시스템은 무한의 보장된 리스 기간(lease period)에 동의하고, 이들 모두는 리스가 종료할 때, 따라서 보장이 종료할 때를 알 수 있다. 이는 참조 리스의 지속기간 동안 참조 무결성을 보장하고, 네트워크 에러로 인해 자원을 자유롭게 하지 못하는 염려를 피한다. 메모리 이외에, 리싱 기술은 기억장치와 같은 다른 종류의 기억장치에도 적용될 수 있다.In accordance with the present invention, a resource within a distributed system, for example, an application that maintains a reference to a resource, and a garbage collection system that manages the resource, may be responsible for ensuring that the reference to the resource and the resource is guaranteed. By leasing, referential integrity is guaranteed without expensive memory leaks. At the end of the lease period, the guarantee of continued reference to the resource has passed, allowing the garbage collection system to recover the resource. The application holding the reference to the resource and the garbage collection system managing the resource agree on an infinite guaranteed lease period, all of which know when the lease ends, and therefore when the end of guarantees ends. have. This ensures referential integrity for the duration of the reference lease and avoids the concern of not freeing resources due to network errors. In addition to memory, the leasing technique can be applied to other kinds of storage devices such as storage devices.
본 발명에 예시되고 광범위하게 설명한 바와 같이, 본 발명의 대체 실시예에 따르면, 리싱(leasing) 기법이 고장 검출 및 복구를 위해 사용된다. 고장 검출을 위해 리스를 사용할 때, 클라이언트는 서버로부터 리스를 요청하고, 리스가 허가된 후에, 클라이언트는 서버에 의해 관리되는 자원에 대한 다양한 프로세싱을 수행한다. 리스가 만료되려 할 때, 클라이언트는 리스를 갱신한다. 만일 임의의 이유로 이 갱신이 실패하면, 그 이유는 서버가 에러가 나거나 또는 클라이언트와 서버 간에 데이타를 전달하는 통신 메커니즘이 에러가 났기 때문이다. 어느 경우에든, 클라이언트는 에러를 검출한다. 부수적으로, 만일 리스를 갱신하거나, 리스의 취소를 명시적으로 요청하는 클라이언트 없이 리스가 만료되면, 서버는 클라이언트 또는 통신 메커니즘중의 하나가 에러가 났다는 것을 안다. 이 경우에, 서버는 에러를 검출한다.As illustrated and broadly described herein, in accordance with an alternative embodiment of the present invention, a leasing technique is used for fault detection and recovery. When using a lease for fault detection, the client requests a lease from the server, and after the lease is granted, the client performs various processing on the resources managed by the server. When the lease is about to expire, the client renews the lease. If for some reason this update fails, it is either because the server fails or because there is an error in the communication mechanism for transferring data between the client and the server. In either case, the client detects an error. Incidentally, if the lease expires without a client renewing or explicitly requesting the cancellation of the lease, the server knows that either the client or one of the communication mechanisms has an error. In this case, the server detects an error.
고장 검출 이외에, 대체 실시예는 또한 고장 복구를 제공한다. 리스의 수립 동안, 클라이언트는 서버에게 고장 복구 루틴을 제공하고, 유사하게, 서버는 클라이언트에게 고장 복구 루틴을 제공한다. 따라서, 고장의 검출시, 클라이언트와 서버 모두 각각은 서로의 고장 복구 루틴을 호출하여, 서로에 대해 고장 복구를 수행한다. 고장 복구를 수행한 후에, 클라이언트와 서버 모두는 미리 설정된 상태에 진입한다. 즉, 클라이언트와 서버는 미리 협상을 통해, 자원에 대해 이루어진 모든 변경을 롤링 백(rolling back)하는 것과 같이, 에러의 발생시 진입하게 되는 상태를 결정한다. 결국, 클라이언트와 서보는 고장 이후에 시스템의 상태를 알고, 이에 따라서 처리를 계속할 수 있다.In addition to fault detection, alternative embodiments also provide for fault recovery. During establishment of the lease, the client provides the server with a crash recovery routine, and similarly, the server provides the client with a crash recovery routine. Thus, upon detection of a failure, both the client and the server each call each other's failure recovery routines to perform failure recovery with respect to each other. After performing the failover, both the client and server enter a preset state. That is, the client and the server negotiate in advance to determine a state to be entered when an error occurs, such as rolling back all the changes made to the resource. As a result, the client and servo know the state of the system after the failure and can continue processing accordingly.
지금부터 첨부하는 도면에 예시된 바와 같이 본 발명의 실시예를 상세히 참조할 것이다. 가능하다면, 동일하거나 유사한 부분을 지칭하기 위해 도면 및 다음의 상세한 설명 전반에 걸쳐 동일한 참조번호가 사용될 것이다.Reference will now be made in detail to embodiments of the invention as illustrated in the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings and the following detailed description to refer to the same or like parts.
본 발명은 종래의 분산 처리 시스템 아키텍춰로 구성된 컴퓨터에 의해 실시될 수 있다. 그러나, 본 발명을 실시하기 위한 아키텍춰 및 프로시져는 참조 무결성을 보장하고 메모리 리크를 제거하는 분산 가비지 콜렉션 스킴(distrributed garbage collection)을 제공하기 때문에 종래 기술은 아니다.The invention can be practiced by a computer constructed of a conventional distributed processing system architecture. However, the architecture and procedure for practicing the present invention is not prior art because it provides a distributed garbage collection scheme that ensures referential integrity and eliminates memory leaks.
A. 개요A. Overview
분산 처리 시스템 내의 컴퓨터들 각각에 위치한 메소드 호출(Method Invocation; MI) 구성요소는 본 발명의 분산 가비지 콜렉션 스킴을 실시한다. MI 구성요소는 바람직하게 JAVATM프로그래밍 언어로 작성된 많은 소프트웨어 모듈로 구성될 수 있다.The Method Invocation (MI) component located on each of the computers in the distributed processing system implements the distributed garbage collection scheme of the present invention. The MI component may consist of many software modules, preferably written in JAVA ™ programming language.
일반적으로, 분산 처리 시스템 내의 어플리케이션이 네임 룩업(name lookup)에 의해, 일부 다른 호출 또는 다른 메소드에 대한 반환값으로서, 분산된 자원에의 참조를 얻고 자원을 액세스하려 할 때마다, 어플리케이션은 자원 또는 자원을 관리하는 MI 구성요소를 호출한다. 관리 MI 구성요소라고 하는 MI 구성요소는, 자원에의 두드러진 참조 회수를 계속 추적한다. 자원에의 참조 회수가 제로가 되면, 관리 MI 구성요소는 자원을 회수할 수 있다. 자원에의 참조 회수의 카운트를 총체적으로 "참조 카운트(reference count)"라고 하며, 참조 카운트를 증가시키는 호출을 "더티 호출(dirty call)"이라고 부를 수 있다.In general, whenever an application in a distributed processing system attempts to obtain a reference to a distributed resource and access the resource by name lookup, as a return value for some other call or other method, the application must Call the MI component that manages the resource. The MI component, referred to as the management MI component, keeps track of the number of outstanding references to the resource. If the reference count to the resource becomes zero, the management MI component can retrieve the resource. The count of reference counts to a resource is collectively referred to as a "reference count," and a call that increments the reference count may be called a "dirty call."
어플리케이션이 더 이상 분산된 자원을 필요하지 않으면, 이는 자원에 또는 관리 MI 구성요소에 서로 다른 호출을 전송한다. 이 호출의 수신시, 관리 MI 구성요소는 자원에 대한 참조 카운트를 감소시킨다. 참조를 중단(drop)하는 이 호출을 "클린 호출(clean call)"이라고 부를 수 있다.When an application no longer needs distributed resources, it sends different calls to the resources or to the management MI component. Upon receipt of this call, the management MI component decrements the reference count for the resource. This call to drop the reference can be called a "clean call."
본 발명의 실시예에 따르면, 더티 호출은 자원에 대한 참조마다 리스 기간(lease period)이라고 하는 요청된 시간 간격을 포함할 수 있다. 더티 호출의 수신시, 관리 MI 구성요소는 리스가 허용된 기간을 가리키는 반환 호출을 전송한다. 이와 같이 관리 MI 구성요소는 두드러진 참조 회수는 물론, 그와 같은 참조에대한 리스 기간을 추적한다. 결국, 자원에 대한 참조 카운트가 제로에 도달하거나 또는 자원에 대한 리스 기간이 종료하면, 관리 MI 구성요소는 자원을 회수할 수 있다.According to an embodiment of the present invention, the dirty call may include a requested time interval called a lease period for each reference to the resource. Upon receipt of the dirty call, the management MI component sends a return call indicating the period during which the lease is allowed. As such, the managed MI component tracks the prominent number of references as well as the lease duration for such references. As a result, if the reference count for the resource reaches zero or the lease period for the resource ends, the management MI component may reclaim the resource.
B. 프로시져B. Procedure
MI 구성요소 내의 어플리케이션 호출 프로세서는 도 1에 도시된 어플리케이션 호출 프로시져(100)의 단계들을 수행한다. 관리 MI 구성요소 내의 서버 호출 프로세서는 도 2-4에 도시한 프로시져(200,300 및 400)의 단계들을 각각 수행한다. 관리 MI 구성요소의 가비지 콜렉터(garbage collector)는 서버 호출 프로세서로부터의 명령에 따라 참조에 이미 구속된 자원을 회수하는 종래의 프로시져를 수행한다. 따라서, 가비지 콜렉터의 종래의 프로시져는 설명하지 않을 것이다.The application call processor in the MI component performs the steps of the application call procedure 100 shown in FIG. The server call processor in the management MI component performs the steps of the procedures 200, 300 and 400 shown in Figs. 2-4, respectively. The garbage collector of the management MI component performs a conventional procedure for retrieving resources already bound to a reference according to instructions from the server call processor. Therefore, the conventional procedure of the garbage collector will not be described.
1. 어플리케이션 호출 프로세서1. Application Call Processor
도 1은 MI 구성요소의 어플리케이션 호출 프로세서가 분산 처리 시스템에 위치된 동일하거나 또는 다른 MI 구성요소에 의해 관리되는 자원에의 참조에 대한 어플리케이션 요청을 처리하기 위해 사용하는 프로시져(100)의 순서도이다.1 is a flowchart of a procedure 100 that an application call processor of a MI component uses to process an application request for a reference to a resource managed by the same or another MI component located in a distributed processing system.
어플리케이션이 자원에의 참조를 얻은 후에, 어플리케이션 호출 프로세서는 요청된 리스 기간 및 자원의 참조를 포함한 더티 호출을 자원에 대한 관리 MI 구성요소에 송신한다(단계 110). 더티 호출은 자원 자체에 또는 관리 MI 구성요소에 전달될 수 있다.After the application obtains a reference to the resource, the application call processor sends a dirty call to the management MI component for the resource, including the requested lease duration and the reference of the resource (step 110). Dirty calls may be passed to the resource itself or to the management MI component.
어플리케이션 호출 프로세서는 관리 MI 구성요소로부터의 반환 호출을 대기하고 수신한다(단계 120). 반환 호출(return call)은 관리 MI 구성요소가 더티 호출의 참조가 그 자원에 구속될 것이라는 것을 보장하는 허용된(granted) 리스 기간을 포함한다. 다른 말로 표현하면, 관리 MI 구성요소는 허용 기간 동안 더티 호출의 참조에 대응하는 자원을 콜렉트하지 않는 것에 동의한다. 만일 관리 MI 구성요소가 허용 기간을 제공하지 못하거나 또는 리스 요청을 거절하면, 이때 어플리케이션 호출 프로세서는 허용 기간을 수신할 때까지 다른 더티 호출을 전송해야 한다.The application call processor waits for and receives a return call from the management MI component (step 120). The return call includes a granted lease period in which the managed MI component ensures that the reference of the dirty call will be bound to that resource. In other words, the management MI component agrees not to collect resources corresponding to the reference of the dirty call during the grant period. If the management MI component fails to provide an allowance period or rejects a lease request, then the application call processor must send another dirty call until it receives an allowance period.
어플리케이션 호출 프로세서는 참조의 어플리케이션 사용을 모니터하고, 어플리케이션이 참조가 더 이상 필요하지 않다는 것을 어플리케이션 호출 프로세서에 명시적으로 통지하거나 또는 어플리케이션 호출 프로세서가 그 자신의 판정을 내리면(단계 130), 어플리케이션 호출 프로세서는 관리 MI 구성요소에 클린 호출을 전송한다(단계 140). 더티 호출에 사용된 방법과 유사한 방법으로, 클린 호출이 참조된 자원으로 향할 수 있고, 관리 MI 구성요소는 이 클린 호출을 처리할 것이다. 다음에, 어플리케이션 호출 프로세서는 어플리케이션에 의해 사용된 참조 리스트로부터 참조를 제거한다(단계 150).The application call processor monitors the application usage of the reference and either explicitly notifies the application call processor that the application is no longer needed, or if the application call processor makes its own decision (step 130). Sends a clean call to the management MI component (step 140). In a manner similar to the method used for dirty calls, a clean call can be directed to the referenced resource, and the management MI component will handle this clean call. Next, the application call processor removes the reference from the reference list used by the application (step 150).
만일 어플리케이션이 아직 참조를 실행하지 않았으나(단계 130), 어플리케이션 호출 프로세서가 참조에 대한 허용 기간이 종료하려 한다고 판정하면(단계 160), 이때 어플리케이션 호출 프로세서는 자원에의 참조가 어플리케이션 대신에 관리 MI 구성요소에 의해 유지된다는 것을 보장하기 위해 단계(110 및 120)을 반복한다.If the application has not yet executed the reference (step 130), but the application call processor determines that the allowance period for the reference is about to end (step 160), then the application call processor is responsible for configuring the management MI on behalf of the application. Repeat steps 110 and 120 to ensure that they are held by the element.
2. 서버 호출 프로세서2. Server Call Processor
MI 구성요소의 서버 호출 프로세서는 세가지 주요한 프로시져: (1) 더티 호출을 처리하고; (2) 들어오는 클린 호출을 처리하고; 그리고 (3) 적당한 시간에 자원을 회수하기 위해 가비지 콜렉션 사이클을 초기화한다.The server call processor of the MI component has three main procedures: (1) handle dirty calls; (2) handle incoming clean calls; And (3) initiate a garbage collection cycle to recover resources at the appropriate time.
(i) 더티 호출(Dirty Calls)(i) Dirty Calls
도 2는 MI 구성요소의 서버 호출 프로세서가 자원, 즉 MI 소프트웨어 구성요소가 관리하는 자원에 대한 참조 요청을 처리하기 위해 사용하는 프로시져(200)의 순서도이다. 이들 요청은 서버 호출 프로세서 처리 요청과 동일한 MI 구성요소의 어플리케이션 호출 프로세서를 포함한, 분산 처리 시스템 내의 MI 구성요소의 어플리케이션 호출 프로세서에서 나온다.2 is a flow diagram of a procedure 200 that a server call processor of a MI component uses to process a reference request for resources, that is, resources managed by the MI software component. These requests come from the application call processor of the MI component in the distributed processing system, including the application call processor of the same MI component as the server call processor processing request.
먼저, 서버 호출 프로세서는 더티 호출을 수신한다(단계 210). 서버 호출 프로세서는 다음에 수용가능한 허용 기간을 판정한다(단계 220). 허용 기간(grant period)는 요청된 리스 기간 또는 일부 다른 시간 기간과 동일할 수 있다. 서버 호출 프로세서는 요청된 자원의 양과 동일한 자원에 대해 이전에 허용된 다른 허용 기간수를 포함한 많은 조건에 기초하여, 적당한 허용 기간을 판정한다.First, the server call processor receives the dirty call (step 210). The server call processor then determines an acceptable allowance period (step 220). The grant period may be the same as the requested lease period or some other time period. The server call processor determines the appropriate allowance period based on many conditions including the number of other allowance periods previously allowed for the same resource as the amount of the requested resource.
서버 호출 프로세서가 더티 호출의 참조에 대해 아직 자원이 할당되지 않았다고 판정하면(단계 230), 서버 호출 프로세서는 요청된 자원을 할당한다(단계 240).If the server call processor determines that no resource has yet been allocated for the reference of the dirty call (step 230), the server call processor allocates the requested resource (step 240).
다음에 서버 호출 프로세서는 더티 호출의 참조에 대응하는 참조 카운트를 증가시키고(단계 250), 참조-대-자원 구속(reference-to-resource binding)에 대한 수용가능한 허용 기간을 설정하고(단계 260), 허용 기간을 갖는 반환 호출을 어플리케이션 호출 프로세서에 송신한다(단계 270). 이와 같이, 서버 호출 프로세서는 그 제어하에 자원에 대한 참조에 관한 들어오는 더티 호출을 제어한다.The server call processor then increments the reference count corresponding to the reference of the dirty call (step 250), sets an acceptable allowance period for reference-to-resource binding (step 260). In step 270, a return call with the allowed duration is sent to the application call processor. As such, the server call processor, under its control, controls incoming dirty calls on references to resources.
어플리케이션은 현재의 리스가 종료하기 전에 연장 요청을 갖는 더티 호출을 송신함으로써 리스를 연장할 수 있다. 프로시져(200)에 도시한 바와 같이, 리스 연장 요청은 리스에 대한 초기 요청과 같이 취급된다. 연장은 참조 카운트가 제로가 되지 않는 한 부수적인 시간 간격 동안 자원이 회수되지 않는다는 것을 의미한다.The application can extend the lease by sending a dirty call with an extend request before the current lease ends. As shown in procedure 200, a lease extension request is treated like an initial request for a lease. Extension means that resources are not recovered for additional time intervals unless the reference count is zero.
(ii) 클린 호출(ii) clean calls
MI 구성요소의 서버 호출 프로세서는 또한 어플리케이션 호출 프로세서로부터 들어오는 클린 호출을 취급한다. 분산 처리 시스템 내의 어플리케이션이 더 이상 자원 참조를 필요로 하지 않으면, 이는 자원이 재사용을 위해 회수될 수 있도록 해당 참조에 대한 자원을 관리하는 MI 구성요소에 통지한다. 도 3은 MI 구성요소의 서버 호출 프로세서가 클린 호출을 다루기 위해 사용하는 단계들을 갖는 프로시져(300)의 순서도이다.The server call processor of the MI component also handles clean calls from the application call processor. When an application in a distributed processing system no longer needs a resource reference, it notifies the MI component that manages the resource for that reference so that the resource can be retrieved for reuse. 3 is a flow diagram of a procedure 300 with steps that the server call processor of the MI component uses to handle clean calls.
서버 호출 프로세서가 MI 구성요소가 관리하는 자원에 대한 참조를 갖는 클린 호출을 수신하면(단계 310), 서버 호출 프로세서는 대응하는 참조 카운트를 감소시킨다(단계 320). 클린 호출이 자원에게 보내지고, 서버 호출 프로세서는 자원을 모니터하고, 호출을 처리하는 프로시져(300)를 실행한다. 다음에, 서버 호출 프로세서는 수신을 확인응답하기 위해 클린 호출을 보낸 MI 구성요소에 반환 호출을 보낸다(단계 330). 본 발명의 실시예에 따르면, 참조를 중단하는 클린 호출은 재용될 수 없으나, 이는 확인응답되어야만 한다.When the server call processor receives a clean call with a reference to a resource managed by the MI component (step 310), the server call processor decrements the corresponding reference count (step 320). The clean call is sent to the resource, and the server call processor executes the procedure 300 to monitor the resource and process the call. The server call processor then sends a return call to the MI component that sent the clean call to acknowledge receipt (step 330). According to an embodiment of the invention, a clean call that breaks the reference cannot be reused, but it must be acknowledged.
(iii) 가비지 콜렉션(iii) garbage collection
서버 호출 프로세서는 또한 가비지 콜렉션 사이클을 초기화하여, 자원에 대해 더 이상의 참조가 이루어지지 않거나 또는 자원에 대한 허용된 리스 기간이 만료하였다고 판정하고 자원을 회수한다. 도 4에 도시한 프로시져(400)는 서버 호출 프로세서가 가비지 콜렉션 사이클을 초기화하기 위해 사용하는 단계들의 순서도를 포함한다.The server call processor also initiates a garbage collection cycle to determine that no further reference has been made to the resource or that the allowed lease period for the resource has expired and is reclaimed. The procedure 400 shown in FIG. 4 includes a flowchart of the steps that the server call processor uses to initiate a garbage collection cycle.
서버 호출 프로세서는 참조 카운트 및 허용된 리스 기간을 모니터하고, MI 구성요소에 의해 관리되는 자원에 대해 참조 카운트가 제로인지 또는 참조에대한 허용 기간이 만료하였는지의 여부를 판정한다(단계 410). 하나의 조건이 존재하면, 서버 호출 프로세서는 해당 자원의 가비지 콜렉선을 초기화한다(단계 420). 그렇지 않으면, 서버 호출 프로세서는 참조 카운트 및 허용된 리스 기간을 계속 모니터한다.The server call processor monitors the reference count and the allowed lease duration and determines whether the reference count is zero or the allowable duration for the reference has expired for resources managed by the MI component (step 410). If one condition exists, the server call processor initializes the garbage collector of the resource (step 420). Otherwise, the server call processor continues to monitor the reference count and allowed lease duration.
C. 호출 순서C. Call Order
도 5는 분산 처리 시스템 내의 MI 구성요소들 가운데의 호출 순서를 도시하는 다어어그램이다. 관리 MI 구성요소(525)는 자원(530)(가비지 콜렉트(505) 참조)에 대한 참조를 모니터함으로써 자원(530)을 관리한다. 관리 MI 구성요소(525)가 자원을 관리하기 때문에, 관리 MI 구성요소(525)의 서버 호출 프로세서는 이 호출 순서 설명의 동작을 수행한다.5 is a diagram illustrating a call order among MI components in a distributed processing system. Management MI component 525 manages resource 530 by monitoring references to resources 530 (see garbage collect 505). Because the management MI component 525 manages resources, the server call processor of the management MI component 525 performs the operations of this call order description.
도 5는 또한 어플리케이션(510 및 540)이 각각 대응하는 MI 구성요소(515 및 545)를 갖는다는 것을 도시한다. 각각의 어플리케이션(510 및 540)은 자원(530)중의 하나에 대한 참조를 얻고, 참조가 대응하는 자원에 구속되도록 자원(530)중의 하나에의 액세스를 얻는다. 액세스를 얻기 위해, 어플리케이션(510 및 540)은 대응하는 MI 구성요소(515 및 545)를 각각 호출하여, 더티 호출(551 및 571)을 MI 구성요소(525)에 각각 송신한다. MI 구성요소(515 및 525)가 관리 MI 구성요소(525)와 같은 다른 MI 구성요소에 의해 관리되는 자원(530)에 대한 액세스를 위한 어플리케이션 요청을 처리하기 때문에, MI 구성요소(515 및 545)의 어플리케이션 호출 프로세서는 이 호출 순서 설명의 동작을 수행한다.5 also shows that applications 510 and 540 have corresponding MI components 515 and 545, respectively. Each application 510 and 540 obtains a reference to one of the resources 530 and gains access to one of the resources 530 such that the reference is bound to the corresponding resource. To gain access, applications 510 and 540 call corresponding MI components 515 and 545, respectively, and send dirty calls 551 and 571 to MI component 525, respectively. MI components 515 and 545 because MI components 515 and 525 handle application requests for access to resources 530 managed by other MI components, such as management MI component 525. The application call processor of performs the operation of this call sequence description.
더티 호출(551 및 571)에 응답해서, 관리 MI 구성요소(525)는 MI 구성요소(515 및 545)의 각각에 각각 반환 호출(552 및 572)를 송신한다. 더티 호출은 더티 호출(551 및 571)의 참조에 대한 허용된 리스 기간을 포함한다.In response to dirty calls 551 and 571, management MI component 525 transmits return calls 552 and 572 to each of MI components 515 and 545, respectively. The dirty call includes an allowed lease period for references of dirty calls 551 and 571.
유사하게, 도 5는 또한 관리 MI 구성요소(525)에 각각 클린 호출(561 및 581)을 송신하는 MI 구성요소(515 및 545)를 도시한다. 클린 호출(561 및 581)은 어플리케이션(510 및 540)이 각각 더 이상 클린 호출(561 및 581)에 명시된 자원에의 액세스를 필요로 하지 않는다는 것을 관리 구성요소(525)에 통지한다. 관리 MI 구성요소(525)는 각각 반환 호출(562 및 582)로서 클린 호출(561 및 581)에 응답한다. 반환 호출(562 및 582)는, 반환 호출(562 및 582)가 수신된 클린 호출(561 및 581)의 MI 구성요소(525)로부터의 간단히 확인응답이라는 점에서 반환 호출(552 및 572)와는 다르다.Similarly, FIG. 5 also shows MI components 515 and 545 sending clean calls 561 and 581 to management MI component 525, respectively. Clean calls 561 and 581 notify management component 525 that applications 510 and 540 no longer require access to the resources specified in clean calls 561 and 581, respectively. Management MI component 525 responds to clean calls 561 and 581 as return calls 562 and 582, respectively. The return calls 562 and 582 differ from the return calls 552 and 572 in that the return calls 562 and 582 are simply acknowledgments from the MI component 525 of the received clean calls 561 and 581. .
어플리케이션(510 및 540) 모두는 동일한 자원에의 액세스를 요청할 수 있다. 예를 들어, 어플리케이션(540)이 "RESOURCE(1)"에의 액세스가 허용되어 있는 동안에, 어플리케이션(510)이 상기 자원에의 액세스를 요청할 수 있다. MI 구성요소(525)는 이와 같은 상황을, 허용된 리스 기간 동안 자원이 어플리케이션(510 및 540) 모두에 이용가능하게 함으로써 처리한다. 따라서, MI 구성요소(525)는 어플리케이션(510 및 540) 어느 것이 모두 자원에의 참조를 중단하거나 또는 최근의 허용된 기간이 만료될 때까지 어느 경우가 먼저 발생할 때 "RESOURCE(1)"을 회수하는 가비지 콜렉션 사이클을 초기화하지 않을 것이다.Both applications 510 and 540 can request access to the same resource. For example, while application 540 is allowed access to "RESOURCE (1)", application 510 may request access to the resource. MI component 525 handles this situation by making resources available to both applications 510 and 540 during the allowed lease period. Thus, the MI component 525 retrieves "RESOURCE (1)" when either of the applications 510 and 540 both stops referencing the resource, or which one first occurs until the latest allowed period expires. Will not initialize the garbage collection cycle.
하나 이상의 어플리케이션이 동일한 자원을 동시에 액세스하게 함으로써, 본 발명은 또한 자원에의 참조를 중단하는 관리 MI 구성요소에 클린 호출을 보낸 후에 어플리케이션이 자원을 액세스하는 것을 허용한다. 이는 자원이 다른 어플리케이션에 의해 여전히 참조되거나 또는 참조의 리스가 아직 만료되지 않았기 때문에, 관리 MI 구성요소(525)가 자원을 아직 회수하지 않기 때문에 발생한다. 그러나, 더 이상의 어플리케이션이 리스를 가지지 않거나 또는 최종 리스가 만료할 때에 유한 시간 후에 자원이 회수될 것이다.By having more than one application access the same resource at the same time, the present invention also allows the application to access the resource after sending a clean call to the management MI component that breaks the reference to the resource. This occurs because the management MI component 525 has not yet reclaimed the resource because the resource is still referenced by another application or the lease of the reference has not yet expired. However, resources will be reclaimed after a finite time when no more applications have a lease or the final lease expires.
D. MI 구성요소D. MI Components
도 6은 본 발명의 실시예에 따른 MI 구성요소(600)의 모듈의 블럭도이다. MI 구성요소(600)는 모니터된 각각의 참조에 대한 참조 구성요소(605), 어플리케이션 호출 프로세서(640), 서버 호출 프로세서(650), 및 가비지 콜렉터(660)을 포함할 수 있다.6 is a block diagram of a module of MI component 600 in accordance with an embodiment of the present invention. MI component 600 may include a reference component 605, application call processor 640, server call processor 650, and garbage collector 660 for each monitored reference.
참조 구성요소(605)는 바람직하게 참조 데이터부(610), 참조 카운트(620), 및 허용 기간 레지스터(630)을 갖는 테이블 또는 상당한 구조를 구성한다. MI 구성요소(600)는 대응하는 자원을 회수하기 위해 언제 가비지 콜렉터(660)를 초기화할 지를 판정하기 위해, 대응하는 참조 데이터부(610)에 명시된 각각의 참조에 대한 참조 카운트(620) 및 허용 기간(630)를 사용한다.Reference component 605 preferably constitutes a table or equivalent structure having reference data portion 610, reference count 620, and tolerance period register 630. The MI component 600 determines the reference count 620 and permission for each reference specified in the corresponding reference data portion 610 to determine when to initialize the garbage collector 660 to recover the corresponding resource. Use period 630.
어플리케이션 호출 프로세서(640)는 도 1에 도시한 프로시져의 단계들을 수행하는 소프트웨어 모듈이다. 서버 호출 프로세서(650)는 도 2-4에 도시한 프로시져(200,300 및 400)의 단계들을 수행하는 소프트웨어 모듈이다. 가비지 콜렉터(660)는 상술한 바와 같이 서버 호출 프로세서(650)로부터의 명령에 응답해서 자원을 회수하는 소프트웨어 모듈이다.The application call processor 640 is a software module that performs the steps of the procedure shown in FIG. The server call processor 650 is a software module that performs the steps of the procedures 200, 300 and 400 shown in FIGS. 2-4. The garbage collector 660 is a software module that reclaims resources in response to instructions from the server call processor 650 as described above.
E. 분산 처리 시스템E. Distributed Processing System
도 7은 본 발명을 실싱하는데 사용될 수 있는 분산 처리 시스템(50)을 도시한다. 도 7에서, 분산 처리 시스템(50)은 네트워크 클라우드(cloud)(55)로 표현된 네트워크 구성으로 접속된 독립적이고 이질적인 플랫폼(100,200 및 300)을 포함한다. 클라우드(55)에 의해 도 7에 표현한 네트워크 구성의 이 구성 및 프로토콜은 플랫폼(700,800 및 900) 간의 정보의 통신을 가능하게 하는 한, 중요하지 않다. 부수적으로, 이와 같은 세개의 플랫폼의 사용은 단지 예시적인 것이고, 본 발명을 플랫폼의 특정 수에 한정하는 것이 아니다. 또한, 특정 네트워크 아키텍춰는 본 발명에 중요하지 않다. 예를 들어, 본 발명에 따라 사용될 수 있는 다른 네트워크 아키텍춰는 모든 다른 플랫폼이 접속될 수 있는 네트워크 콘트롤러로서 하나의 플랫폼을 사용할 것이다.7 illustrates a distributed processing system 50 that may be used to seal the present invention. In FIG. 7, distributed processing system 50 includes independent and heterogeneous platforms 100, 200, and 300 connected in a network configuration represented by a network cloud 55. This configuration and protocol of the network configuration represented by FIG. 7 by the cloud 55 is not critical as long as it enables communication of information between the platforms 700, 800, and 900. Incidentally, the use of these three platforms is merely exemplary and does not limit the present invention to a specific number of platforms. In addition, the specific network architecture is not critical to the present invention. For example, another network architecture that can be used in accordance with the present invention will use one platform as a network controller to which all other platforms can be connected.
분산 처리 시스템의 구현에서, 플랫폼(700,800 및 900)은 각각 프로세서(710,810 및 910), 및 메모리(750,850,950)를 각각 구비한다. 각각의 프로세서(710,810 및 910) 내에 포함되어 있는 것은, 각각 어플리케이션(720,820 및 920), 운영체제(740,840 및 940), 및 MI 구성요소(730,830 및 930)이다.In an implementation of a distributed processing system, platforms 700, 800, and 900 have processors 710, 810, and 910, and memories 750, 850, and 950, respectively. Included within each processor 710, 810, and 910 are applications 720, 820, and 920, operating systems 740, 840, and 940, and MI components 730, 830, and 930, respectively.
어플리케이션(720,820 및 920)은 본 발명에 따라 작동하도록 이전에 작성되거고 수정된 것이거나 또는 본 발명에 의해 제공되는 서비스를 이용하도록 특수하게 작성된 프로그램일 수 있다. 어플리케이션(720,820 및 920)은 본 발명에 따라 수행되는 동작을 호출한다.Applications 720, 820, and 920 may be previously written and modified to operate in accordance with the present invention, or may be specially written programs to use the services provided by the present invention. Applications 720, 820, and 920 invoke operations performed in accordance with the present invention.
MI 구성요소(730,830 및 930)은 도 6을 참조하여 설명한 MI 구성요소(600)에 대응한다.The MI components 730, 830 and 930 correspond to the MI component 600 described with reference to FIG. 6.
운영체제(740,840 및 940)는 각각 대응하는 프로세서(710,810 및 910)에 연결된 표준 운영 체제이다. 플랫폼(700,800 및 900)은 이질적일 수 있다. 예를 들어, 플랫폼(700)은 Sun Microsystems, Inc.가 제조한 UltraSpacr마이크로프로세서를 프로세서(710)로서 가지며, Solaris운영체제(740)를 사용한다. 플랫폼(800)은 Silicon Graphics Corp.가 제조한 MIPS 마이크로프로세서를 프로세서(810)로서 가지며, Unix 운영체제(840)를 사용한다. 마지막으로, 플랫폼(900)은 Intel Corp.가 제조한 Pentium 마이크로프로세서를 프로세서(910)로서 가지며, Microsoft Windows 95 운영체제(940)를 사용한다. 본 발명은 이에 한정되지 않으며, 이질적인 플랫폼을 수용할 수 있다.Operating systems 740, 840 and 940 are standard operating systems coupled to corresponding processors 710, 810 and 910, respectively. Platforms 700, 800 and 900 may be heterogeneous. For example, platform 700 is UltraSpacr manufactured by Sun Microsystems, Inc. It has a microprocessor as the processor 710, Solaris An operating system 740 is used. The platform 800 has a MIPS microprocessor manufactured by Silicon Graphics Corp. as the processor 810 and uses a Unix operating system 840. Finally, the platform 900 has a Pentium microprocessor manufactured by Intel Corp. as the processor 910 and uses the Microsoft Windows 95 operating system 940. The present invention is not so limited, and can accommodate heterogeneous platforms.
Sun, Sun Microsystems, Inc. Solaris, Java, 및 Sun Logo는 미국 및 다른 국가에 위치한 Sun Microsystems, Inc.의 상표 또는 등록 상표이다. UltraSpacr 및 모든 다른 SPARC 상표는 라이선스 대상이며, 미국 및 다른 국가에 위치한 SPARC Internatipnal, Inc.의 상표이다. SPARC 상표를 달고 있는 제품은 Sun Microsystems, Inc.가 개발한 아키텍춰에 기초한 것이다.Sun, Sun Microsystems, Inc. Solaris, Java, and the Sun Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. UltraSpacr and all other SPARC trademarks are licensed and trademarks of SPARC Internatipnal, Inc. in the United States and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.
메모리(750,850 및 950)는 연관된 플랫폼에 대한 범용 기억장치와 같은 몇가지 기능을 수행한다. 다른 기능은 각각의 프로세서(710, 810 및 910)에 의해 실행하기 전에, 어플리케이션(720,820 및 920), MI 구성요소(730,830 및 930), 및 운영체제(740,840 및 940)을 저장하는 것이다. 또한, 메모리(750,850 및 950)의 일부는 네트워크(50) 내의 모든 플랫폼(700,800 및 900)에 이용가능한 공유 메모리를 구성할 수 있다.The memories 750, 850 and 950 perform several functions, such as general purpose storage for the associated platform. Another function is to store the applications 720, 820, and 920, the MI components 730, 830, and 930, and the operating systems 740, 840, and 940 before executing by the respective processors 710, 810, and 910. In addition, some of the memories 750, 850 and 950 may constitute shared memory available to all platforms 700, 800 and 900 in the network 50.
E. MI 서비스E. MI Service
본 발명은 클라이언트/서버 모델을 사용하여 실시될 수 있다. 클라이언트는 더티 호출 및 클린 호출과 같은 요청을 발생하고, 서버는 요청에 응답한다.The present invention can be implemented using a client / server model. The client issues requests such as dirty calls and clean calls, and the server responds to the request.
도 7에 도시한 각각의 MI 구성요소(730,830 및 930)는 바람직하게 클라이언트 구성요소 및 서버 구성요소 모두를 포함한다. 클라이언트 플랫폼(1000) 및 서버 플랫폼(1100)의 블럭도인 도 8은, 도 7의 플랫폼(700,800 및 900)중 임의의 두개의 플랫폼에 적용한다.Each MI component 730, 830 and 930 shown in FIG. 7 preferably includes both a client component and a server component. 8, which is a block diagram of the client platform 1000 and server platform 1100, applies to any two of the platforms 700, 800, and 900 of FIG. 7.
플랫폼(1000 및 1100)은 각각 메모리(1050 및 1150), 및 프로세서(1010 및 111)를 포함한다. 플랫폼(1100 및 1100) 내의 소자는 도 7을 참조하여 설명한 유사한 소자와 동일하게 기능한다. 본 예에서, 프로세서(1010)는 클라이언트 어플리케이션(1020)을 실행하고, 프로세서(1110)는 서버 어플리케이션(1120)을 실행한다. 프로세서(1010 및 1110)는 또한 각각 운영체제(1040 및 1140), 및 MI 구성요소(1030 및 1130)을 실행한다.Platforms 1000 and 1100 include memories 1050 and 1150, and processors 1010 and 111, respectively. The devices in platforms 1100 and 1100 function the same as the similar devices described with reference to FIG. 7. In this example, processor 1010 executes client application 1020, and processor 1110 executes server application 1120. Processors 1010 and 1110 also execute operating systems 1040 and 1140, and MI components 1030 and 1130, respectively.
MI 구성요소(1030 및 1130)는 각각 서버 호출 프로세서(1031 및 1131), 어플리케이션 호출 프로세서(1032 및 1132), 및 가비지 콜렉터(1033 및 1133)를 각각 포함한다. 각각의 MI 구성요소(1030 및 1130)는 또한 각각의 MI 구성요소(1030 및 1130)이 모니터하는 각각의 참조에 대해, 참조 데이타부(1034 및 1134), 참조 카운트(1035 및 1135), 및 허용 기간 레지스터(1036 및 1136)를 포함하는 참조 구성요소를 구비한다.MI components 1030 and 1130 include server call processors 1031 and 1131, application call processors 1032 and 1132, and garbage collectors 1033 and 1133, respectively. Each MI component 1030 and 1130 may also have reference data portions 1034 and 1134, reference counts 1035 and 1135, and allow for each reference that each MI component 1030 and 1130 monitors. And a reference component including period registers 1036 and 1136.
어플리케이션 호출 프로세서(1032 및 1132)는, 클라이언트 서비스를 나타내고, 서버 서비스를 나타내는 서버 호출 프로세서(1031 및 1131)과 각각 통신한다. 플랫폼(1000 및 1100)이 서버 호출 프로세서를 포함하기 때문에, 어플리케이션 호출 프로세서, 가비지 콜렉터, 및 참조 구성요소를 포함하기 때문에, 각각의 플랫폼은 클라이언트 또는 서버로서 동작할 수 있다.The application call processors 1032 and 1132 represent client services and communicate with server call processors 1031 and 1131, respectively, representing server services. Since platforms 1000 and 1100 include a server call processor, each platform can act as a client or server because it includes an application call processor, garbage collector, and reference components.
그러나, 다음의 설명을 위해, 플랫폼(1000)은 클라이언트 플랫폼으로 지정되고, 플랫폼(1100)은 서버 플랫폼으로 지정된다. 본 예에서, 클라이언트 어플리케이션(1020)은 분산된 자원에 대한 참조를 얻고, MI 구성요소(1030)를 사용하여 서버 플랫폼(1100)의 MI 구성요소에 의해 관리되는 자원에 더티 호출을 송신한다.However, for the following description, platform 1000 is designated as the client platform and platform 1100 is designated as the server platform. In this example, the client application 1020 obtains a reference to the distributed resource and uses the MI component 1030 to send a dirty call to the resource managed by the MI component of the server platform 1100.
부수적으로, 서버 플랫폼(1100)은 서버 어플리케이션(1120)을 실행할 수 있다. 서버 어플리케이션(1120)은 또한 MI 구성요소(1130)을 사용하여, 그와 같은 더티 호출의 자원이 MI 구성요소(1130)에 의해 관리될 때에 MI 구성요소(1130)에 의해 취급될 수 있는 더티 호출을 송신한다. 선택적으로, 서버 플랫폼(1120)은 MI 구성요소(1130)을 사용하여, MI 구성요소(1030)에 의해 관리되는 자원에 더티 호출을 송신할 수 있다.Incidentally, the server platform 1100 may execute the server application 1120. Server application 1120 also uses MI component 1130 to allow dirty calls to be handled by MI component 1130 when resources of such dirty calls are managed by MI component 1130. Send. Optionally, server platform 1120 can use MI component 1130 to send dirty calls to resources managed by MI component 1030.
따라서, 클라이언트 플랫폼(1000)의 MI 구성요소(1030)를 위한 서버 호출 프로세서(1031), 가비지 콜렉터(1033) 및 참조 카운트(1035)는 활성이지 않고, 따라서 도 8에 빗금쳐져 표현되어 있다. 이와 유사하게, 서버 플랫폼(1100)의 MI 구성요소(1130)의 어플리케이션 호출 프로세서(1132)가 지배적이기 때문에 빗금쳐져 도시되어 있다.Thus, the server call processor 1031, garbage collector 1033, and reference count 1035 for the MI component 1030 of the client platform 1000 are not active and are therefore shown as shaded in FIG. 8. Similarly, the application call processor 1132 of the MI component 1130 of the server platform 1100 is shown as hatched because it is dominant.
클라이언트 어플리케이션(1020)이 자원에 대응하는 참조를 얻으면, 어플리케이션 호출 프로세서(1032)는 서버 호출 프로세서(131)가 수신하는 더티 호출을 송신한다. 더티 호출은 요청된 리스 기간을 포함한다. 서버 호출 프로세서(1131)는 더티 호출에서 참조를 위한 참조 카운트(1135)를 증가시키고, 허용 기간을 판정한다. 이에 응답하여, 서버 호출 프로세서(1131)는 허용 기간을 갖는 반환 호출을 어플리케이션 호출 프로세서(1030)에 송신한다. 어플리케이션 호출 프로세서(1032)는 허용 기간을 사용하여, 레코드된 허용 기간(1035)를 갱신하고, 그 더티호출의 참조에 대응하는 자원이 회수될 때를 판정한다.When the client application 1020 obtains a reference corresponding to the resource, the application call processor 1032 transmits a dirty call that the server call processor 131 receives. The dirty call includes the requested lease term. The server call processor 1131 increments the reference count 1135 for reference in the dirty call, and determines the allowed period. In response, server call processor 1131 sends a return call with an allowance period to application call processor 1030. The application call processor 1032 uses the permission period to update the recorded permission period 1035 and determine when the resource corresponding to the reference of the dirty call is retrieved.
서버 호출 프로세서(1131)는 또한 관리하는 자원에 대한 참조에 대응하는 참조 카운트 및 허용 기간을 모니터한다. 그 참조 카운트(1135)중의 하나가 제로이거나 또는 참조에 대한 허용 기간(1135)가 종료되면, 어떤 이벤트도 먼저 발생하면, 서버 호출 프로세서(1131)는 가비지 콜렉터(1133)를 초기화시켜, 제로의 참조 카운트 또는 만료된 허용 기간을 갖는 참조에 대응하는 자원을 회수할 수 있다.The server call processor 1131 also monitors the reference count and the allow period corresponding to the reference to the resource to be managed. If one of the reference counts 1135 is zero or the allowance period 1135 for the reference ends, and if any event occurs first, the server call processor 1131 initializes the garbage collector 1133 to zero reference. The resource corresponding to the reference with the count or expired allowed period may be recovered.
본 발명의 실시예에 따른 리스된 참조 스킴은, 프로토콜에 포함된 플랫폼(1000 및 1100) 상의 클럭이 동기화되는 것을 필요로 하지 않는다. 이 스킴은 단지, 상당한 증가 기간을 가질 것을 필요로 한다. 리스는 특정 시간에 만료하지 않으나, 그 보다는 특정 시간 도달후에 만료한다. 도달에 대한 대략의 협정이 존재하는 한, 플랫폼(1100 및 1000)은 허용된 리스 기간에 대한 대략의 협의가 존재할 것이다. 또한, 리스의 타이밍이 컴퓨터 용어로 상당히 길기 때문에, 클럭의 근소한 차이도 거의 또는 전혀 영향이 없을 것이다.A leased reference scheme in accordance with an embodiment of the present invention does not require the clocks on the platforms 1000 and 1100 included in the protocol to be synchronized. This scheme only needs to have a significant increase period. A lease does not expire at a certain time, but rather expires after reaching a certain time. As long as there is an approximate agreement on arrival, platforms 1100 and 1000 will have an approximate agreement on the allowed lease term. In addition, since the timing of the lease is quite long in computer terms, even slight differences in clocks will have little or no effect.
더티 호출의 전송 시간은 프로토콜에 영향을 미칠 수 있다. 만일 MI 구성요소(1030)가 참조에 대한 리스를 보유하고 있고, 갱신을 요청하는 리스가 종료하기 직전에, MI 구성요소(1130)가 요청을 수신하기 전에 리스가 종료할 수 있을 때까지 대기한다. 만일 그렇다면, MI 구성요소(1130)는 갱신 요청을 수신하기 전에 자원을 회수할 수 있다. 따라서, 더티 호출을 송신할 때, 송신자는 자원에 대한 리스 기간이 종료하기 전에, 갱신 더티 호출이 이루어질 수 있도록 더티 호출의 자원을 취급하는 플랫폼에 송신 시간을 고려하여 요청된 리스 기간에 대한 시간 인수를 부가하여야 한다.The transmission time of the dirty call can affect the protocol. If the MI component 1030 holds a lease for a reference and immediately before the lease requesting the update ends, wait for the lease to terminate before the MI component 1130 receives the request. . If so, MI component 1130 may reclaim the resource before receiving the update request. Thus, when sending a dirty call, the sender must determine the time factor for the requested lease period, taking into account the transmission time to the platform handling the resource of the dirty call so that an update dirty call can be made before the lease period for the resource ends. Must be added.
F. 결 론F. Conclusion
본 발명에 따르면, 분산 가비지 콜렉션 스킴은 허용된 리스 기간이 만료할 때, 자원에 대한 참조를 제공하도록, 분산 처리 시스템 내의 자원에 참조에 대응하는 허용된 리스 기간을 제공함으로써 참조 무결성을 보장하고, 메모리 리크를 제거한다. 이때 이 자원은 수집될 수 있다. 이 자원은 또한 카운터에 대한 참조가 자원에 대한 참조에 할당된 분산 처리 시스템 내의 처리에 의해 더 이상 참조되지 않을 때 수집될 수 있다.According to the present invention, a distributed garbage collection scheme ensures referential integrity by providing an allowed lease period corresponding to a reference to a resource in the distributed processing system, to provide a reference to the resource when the allowed lease period expires, Remove memory leaks. This resource can then be collected. This resource may also be collected when a reference to the counter is no longer referenced by a process in the distributed processing system assigned to the reference to the resource.
본 발명의 대체 실시예Alternative embodiment of the present invention
상술한 리싱 기법은, 가비지 콜렉션에 관한 것이다. 그러나, 본 발명의 대체 실시예는 이하에 설명하는 바와 같이 고장을 검출하고, 에러 복구를 수행하는데 사용될 수 있다.The aforementioned leasing technique relates to garbage collection. However, alternative embodiments of the present invention can be used to detect failures and perform error recovery as described below.
많은 시스템들이 하트비트(heratbeats) 또는 타임아웃과 같은, 클라이언트-서버 환경에서 고장을 검출하는데 사용되고 있다. 하트비트를 사용하여, 클라이언트는 클라이언트가 얼라이브(alive)하다는 것을 가리키는 서버에게, 주기적인 간격으로 메시지를 송신한다. 만일 상기 간격중의 하나에서 서버가 메시지를 수신하지 못하면, 서버는, 클라이언트 또는 클라이언트와 서버 간에 데이타를 전달하는 통신 메커니즘(즉, 네트워크)에 고장이 발생하였다는 것을 알게 된다. 타임아웃을 사용하여, 선정된 시간량이 설정되고, 만일 서버가 그 시간 기간 내에 클라이언트로부터 어떠한 통신도 수신하지 못하면, 서버는, 클라이언트 또는 통신 메커니즘중의 하나가 고장이 있다는 것을 알게 된다.Many systems are used to detect failures in client-server environments, such as heartbeats or timeouts. Using heartbeats, the client sends messages at periodic intervals to the server indicating that the client is alive. If the server does not receive a message in one of the intervals, the server knows that a failure has occurred in the client or communication mechanism (i.e. network) that transfers data between the client and the server. Using the timeout, a predetermined amount of time is set and if the server does not receive any communication from the client within that time period, the server knows that either the client or the communication mechanism has failed.
비록 이와 같은 종래 기술의 시스템이 고장이 발생하였을 때를 적절히 가리키지만, 클라이언트와 서버 모두는 고장 이후에 시스템의 상태를 알지 못하고 있을 수 있다. 예를 들어, 클라이언트가 프로그램이고 서버가 파일 시스템 관리자일 때, 클라이언트는 서버에 의해 관리되는 특정 파일에 대해 기록 동작을 수행될 것을 필요로 할 수 있다. 비록 종래 기술의 고장 검출 시스템이 고장이 발생할 때 고장을 검출하지만, 클라이언트는 파일에 대해 기록 동작이 수행된 이전 또는 이후에 고장이 발생하였는 지의 여부를 알지 못한다. 이와 같은 상황에서, 클라이언트는 시스템의 상태를 결정할 수 없을 것이다.Although such prior art systems properly indicate when a failure has occurred, both the client and server may not be aware of the state of the system after the failure. For example, when the client is a program and the server is a file system manager, the client may need to perform a write operation on a particular file managed by the server. Although the prior art failure detection system detects a failure when a failure occurs, the client does not know whether the failure occurred before or after the write operation was performed on the file. In such a situation, the client will not be able to determine the state of the system.
본 발명의 대체 실시예는 고장 검출 및 복구를 위한 리싱 기법을 사용함으로써 이와 같은 문제를 해결한다. 고장 검출을 위한 리스를 사용할 때, 클라이언트는 서버로부터의 리스를 요청하고, 허용된 리스 기간 동안 서버에 의해 관리되는 자원에 대해 다양한 처리를 수행한다. 만일 임의의 이유로, 갱신이 실패하면, 그 이유는 서버가 고장나거나 또는 통신 메커니즘이 고장나기 때문이다. 어느 경우에든, 클라이언트는 고장을 검출한다. 서버측에서, 만일 리스를 갱신하거나 또는 명시적인 취소를 수행하는 클라이언트 없이 리스가 만료하면, 서버는 클라이언트 또는 통신 메커니즘이 고장난 것을 알고, 따라서, 서버는 고장을 검출한다.Alternative embodiments of the present invention solve this problem by using a leasing technique for fault detection and recovery. When using a lease for fault detection, the client requests a lease from the server and performs various processing on the resources managed by the server during the allowed lease period. If for any reason the update fails, it is because the server has failed or the communication mechanism has failed. In either case, the client detects a failure. On the server side, if the lease expires without a client renewing or performing an explicit cancellation, the server knows that the client or communication mechanism has failed, and therefore the server detects the failure.
고장의 검출시, 클라이언트와 서버는 선정된 상태로 진행함으로서 복구를 수행한다. 즉, 클라이언트와 서버는 고장나거나 검출시 진입하게 될 상태를 미리 협상한다. 예를 들어, 상기 파일 시스템 예에서, 클라이언트와 서버는 고장이 검출되면 롤 백을 수행하도록 협상할 수 있다. "롤 백(roll back)"은 클라이언트, 서버 및 파일과 같은 임의의 관련된 엔터티를, 고장이 발생하기 전에 있던 상태로 놓는 것을 지칭한다. 따라서, 본 예에서, 만일 서버가 기록 동작을 이미 수행하였다면, 서버는 이 파일을 기록 동작이 수행되기 직전의 상태로 복원시키고, 클라이언트는 고장이 검출된 후에 기록 동작이 수행되지 않았다는 것을 알게 되어, 이에 따라 클라이언트는 그 처리를 계속할 수 있다.Upon detection of a failure, the client and server proceed with the predetermined state to perform recovery. In other words, the client and server negotiate in advance a condition that will fail or enter upon detection. For example, in the file system example above, the client and server may negotiate to perform a rollback if a failure is detected. "Roll back" refers to putting any related entities, such as clients, servers, and files, into the state they were in before the failure occurred. Thus, in this example, if the server has already performed the write operation, the server restores this file to the state just before the write operation is performed, and the client knows that the write operation was not performed after the failure was detected, This allows the client to continue its processing.
대체적으로, 클라이언트와 서버는 롤 백을 더욱 할 수 있다. 예를 들어, 클라이언트와 서버는 파일 조작 동안 에러가 발생할 때마다 롤 백이 클라이언트와 서버를, 클라이언트와 서버가 리스를 갖기 직전(즉, 파일이 생성되기 전)에 있던 상태로 되돌리는 것으로 미리 협상할 수 있다. 다른 방법은, 롤 백이 파일의 조작에서 선정왼 체크포인트로 되돌리는 것이다. 고장후 시스템 상태를 판정하는 클라이언트와 서버 간의 이와 같은 협상은 핸드세이크, 선정된 파일을 읽는 것, 또는 서버와 클라이언트가 전개시 소정의 고장 이후 시스템 상태로 항상 복귀하도록 지시될 수 있는 것을 포함하는 다양한 방법으로 수행될 수 있다.In general, clients and servers can roll back more. For example, whenever an error occurs during a file operation, the client and server can negotiate in advance by rolling back the client and server to the state they were in just before the client and server took lease (that is, before the file was created). Can be. Another way is to roll back to the left checkpoint in the file operation. Such negotiations between the client and the server determining the system state after a failure may include a handshake, reading a selected file, or a server and client that can be instructed to always return to the system state after a predetermined failure in deployment. It can be done by the method.
부수적으로, 리스의 수립 동안, 클라이언트는 서버에게 고장 복구 루틴을 제공할 수 있고, 이와 유사하게, 서버는 클라이언트에게 고장 복구 루틴을 제공할 수 있다. 따라서, 고장의 검출시, 클라이언트와 서버 모두는 각각 서로 상대방의 고장 복구 루틴을 호출하여 고장 복구를 수행한다. 이 상황에서, 만일 서버가 고장나게 되면, 일단 클라이언트가 고장을 검출하고, 클라이언트는 서버에 대한 복구를 수행하는 서버의 복구 루틴을 호출한다. 예를 들어, 복구 루틴은 서버를 재시작할 수 있고, 시스템 관리자에게 메시지를 송신할 수 있다. 이와 유사하게, 만일 클라이언트가 고장나게 되면, 서버는 클라이언트의 복구 루틴을 호출하여, 클라이언트에 대한 고장 복구를 수행한다.Incidentally, during the establishment of the lease, the client may provide a failure recovery routine to the server, and similarly, the server may provide a failure recovery routine to the client. Therefore, upon detecting a failure, both the client and the server call each other's failure recovery routines to perform failure recovery. In this situation, if the server fails, once the client detects the failure, the client invokes the server's recovery routine to perform the recovery for the server. For example, the recovery routine can restart the server and send a message to the system administrator. Similarly, if a client fails, the server calls the client's recovery routine to perform a crash recovery for the client.
클라이언트와 서버가 상호 복구하기 때문에, 시스템 관리자가 분산에 별로(distributed basis) 수행된다. 즉, 시스템 관리를 수행하는 중앙 관리자 대신에, 일부 종래 시스템에서와 같이, 고장 검출 및 복구를 위한 리싱 기법을 사용함으로써, 대체 실시예는 클라이언트가 서버에 대한 복구를 수행할 수 있고, 서버가 그 클라이언트에 대한 복구를 수행할 수 있도록, 시스템 관리 프로세싱을 분산시킨다.Because the client and server recover from each other, system administrators are performed on a distributed basis. That is, instead of a central administrator performing system management, as in some conventional systems, by using a leasing technique for failure detection and recovery, an alternative embodiment is that the client may perform recovery for the server, and the server may Distribute system management processing to allow recovery to clients.
대체 실시예는 클라이언트와 서버가 네트워크를 경유하여 통신하는 별도의 머신 상에 위치되어 있거나 또는 클라이언트와 서버가 동일한 머신 상에 존재하는 분산 시스템에서의 동작을 포함한 임의의 클라이언트-서버 관계에 사용될 수 있다. 대체 실시예에 사용하기에 적합한 이와 같은 분산 시스템은 본 발명의 참조로서 일체화되어 있는, "Dynamic Lookup Service in a Distributed System"이라는 제목의 미국특허 출원 제 호에 설명된 예시적인 분산 시스템이다. 그러나, 명확히 하기 위해, 대체 실시예는, 보조 기억장치 상의 기억장소를 리스하는 파일 시스템 관리자인 서버와 관련하여 이하에 설명될 것이다.Alternate embodiments may be used in any client-server relationship, including operation in a distributed system where the client and server communicate over a network or where the client and server reside on the same machine. . Such a distribution system suitable for use in alternative embodiments is an exemplary distribution system described in US Patent Application No. entitled "Dynamic Lookup Service in a Distributed System", which is incorporated by reference of the present invention. However, for the sake of clarity, an alternative embodiment will be described below in connection with a server, which is a file system administrator that leases storage on auxiliary storage.
기억 장소를 리스하는 개요Summary to lease storage
기억장치는 하나 이상의 프로그램에 의해 사용될 수 있는 데이타의 다양한 논리적 그룹핑을 포함하는 많은 기억장소를 갖는다. 이들 논리적 그룹핑은 파일, 데이타베이스 또는 문서의 형태를 취할 수 있다. 기억장소의 리싱은 미리 정해진 시간량 동안 기억장소에의 액세스(즉, 판독 및 기록 액세스)를 허용한다. 기억장소에 어떤 종류의 데이타가 포함되어 있는지 또는 기억장소가 임의의 데이타를 모두 포함하고 있는 지에 대해서는 기억장소의 리싱에서는 중요하다. 또한, 기억장소의 리싱은, 데이타베이스 파일, 필드, 기억장소의 블럭, 또는 실제의 기억장소와 같은 서로 다른 레벨의 기억장소에 적용될 수 있다.Storage devices have a number of storage locations that contain various logical groupings of data that can be used by one or more programs. These logical groupings may take the form of files, databases or documents. Leasing of storage allows access to the storage (ie, read and write access) for a predetermined amount of time. What kind of data is contained in a storage location or whether the storage location contains all of the data is important in the storage of storage. In addition, storage leasing can be applied to different levels of storage, such as database files, fields, blocks of storage, or actual storage.
컴퓨터 시스템 또는 분산 시스템에서, 많은 프로그램들이 기억장소의 다양한 그룹에 저장된 파일을 경쟁할 수 있다. 따라서, 기억장소의 그룹들은 액세스하기 위해 경쟁하는 많은 프로그램들을 가질 수 있다. 리싱 기법은 이와 같은 환경에서 기억장소의 사용을 중재하는데 사용될 수 있다.In computer systems or distributed systems, many programs can compete for files stored in various groups of storage. Thus, groups of storage locations can have many programs competing for access. Leasing techniques can be used to mediate the use of storage in such circumstances.
파일용 데이타를 포함한 기억장소의 그룹에 대한 리스를 사용할 때, 프로그램("클라이언트")는 시간 기간("리스 기간") 동안 기억장소의 그룹을 액세스하기 위해 파일 시스템 관리자("서버")로부터 리스를 요청한다. 이용가능성, 우선순위, 및 다른 요인에 따라, 서버는 요청을 부인하거나 또는 리스 기간을 허용한다. 허용된 리스 기간은 요청된 전체 리스 기간 또는 그 일부일 수 있다. 일단 클라이언트가 리스를 수신하면, 클라이언트는 리스 기간 동안 기억장소의 그룹을 액세스할 수 있다.When using a lease for a group of storage containing data for a file, the program ("client") leases from the file system administrator ("server") to access the group of storage for a period of time ("lease period"). Ask. Depending on availability, priority, and other factors, the server denies the request or allows a lease term. The permitted lease term may be the entire lease term requested or a portion thereof. Once the client receives the lease, the client can access the group of storage for the lease term.
리스 기간을 요청할 때, 클라이언트는 정확한 리스 기간을 요청할 수 있다. 이 상황에서, 서버만이, 만일 리스 기간이 그 일부에 반대되는 것으로서, 요청된 전체 리스 기간이면 리스를 허용한다.When requesting a lease term, the client can request the exact lease term. In this situation, only the server allows a lease if the lease term is the opposite of a part of the requested total lease term.
리스가 액트브인 동안, 클라이언트에게는 기억장소의 그룹에 액세스하는 것이 보장되고, 그에 대해 판독 및 기록 동작을 수행할 수 있다. 그리고, 이와 유사하게, 서버는 액티브 리스 동안 기억 장소의 무결성을 유지할 것이다. 예를 들어, 리스 기간 동안, 서버는 리스된 파일이 삭제되거나 또는 기록되는 것을 허용하지 않거나 또는, 해당 엔터티가 또한 리스를 가지고 있지 않는 한, 클라이언트 이외의 임의의 다른 엔터티에 의해 손상되지 않을 것이다. 그러나, 리스가 만료한 후에, 서버는 클라이언트에 대해 파일의 무결성을 더 이상 보장하지 않고, 따라서, 서버는 파일을 삭제할 수 있거나, 그렇지 않으면, 실체적으로 그를 변경하거나 또는 동일한 것을 수행할 다른 클라이언트에 리스를 허용할 것이다. 어떠한 두드러진 리스도 갖지 않는 기억 장소는 서버에 의해 회수된다.While the lease is active, the client is guaranteed access to the group of storage, and can perform read and write operations thereon. And similarly, the server will maintain the integrity of the storage location during the active lease. For example, during the lease period, the server will not allow the leased file to be deleted or written, or will not be damaged by any other entity other than the client, unless the entity also has a lease. However, after the lease expires, the server no longer guarantees the integrity of the file to the client, so the server can delete the file, or otherwise, physically change it or do it to another client to do the same. Will allow lease. Storage areas that do not have any outstanding leases are retrieved by the server.
각각의 기억장소는 액세스 파라메타 또는 권한 파라메타와 같은 연관된 제한 파라메타(limiting parameter)를 가질 수 있다. 액세스 파라메타는 서버가 기억 장소에 대해 지원하는 액세스의 종류를 판정한다. 예를 들어, 기억 장소는 판독 액세스에 의해서만 정의될 수 있다. 이 경우에, 서버만이 특정 기억 장소에 대해 다음에 허가된 리스 동안 판독 액세스를 허용할 것이다. 역으로, 클라이언트가 해당 기억 장소에 기록하려는 시도는 서버에 의해 허용되지 않을 것이다. 다른 잠재적인 기억 장소 액세스 파라메타는 기록 액세스, 할당 액세스, 재할당 액세스, 및 서브블럭 액세스(즉, 기억장소의 큰 블럭인 경우)를 포함할 수 있다.Each store may have an associated limiting parameter, such as an access parameter or a privilege parameter. The access parameter determines what kind of access the server supports for the storage location. For example, the storage location can be defined only by read access. In this case, only the server will allow read access for the next authorized lease for a particular storage location. Conversely, an attempt by the client to write to that storage location would not be allowed by the server. Other potential storage access parameters may include write access, allocation access, reallocation access, and subblock access (ie, if it is a large block of storage).
연관된 권한 파라메타는, 클라이언트가 리스가 허용되기 전에 가져야만 하는 권한 레벨(privilege level)을 명시한다. 서버는 권한 파라메타를 사용하여 경쟁하는 리스 요청에 우선순위를 부여할 수 있다. 다른 말로 표현하면, 서버가 동일한 기억장소에 대한 다수의 두드러진 리스 요청을 가지고 있을 때, 이는 요청하는 클라이언트의 권한 레벨에 기초하여 이들 요청에 우선순위를 부여할 수 있다.The associated privilege parameter specifies the privilege level the client must have before the lease is allowed. The server may use privilege parameters to prioritize competing lease requests. In other words, when a server has multiple outstanding lease requests for the same store, it can prioritize these requests based on the requesting client's privilege level.
대체 실시예는 또한 동일한 기억 장소에 대한 다수의 병렬(multiple concurrent) 리스를 허용함으로써, 기억 장소의 그룹에 병렬 액세스를 지원한다. 예를 들어, 만일 특정 기억 장소의 파라메타가 "판독" 액세스를 명시하면, 서버는 기억 장소의 무결성을 위반하지 않고 기억 장소에 대한 다수의 병렬의 리스를 허용할 수 있다. 병렬 리스는 또한 예를 들어, 큰 파일에도 적용될 수 있다. 서버는 보다 큰 파일의 무결성을 해치지 않고, 다시 파일의 보다 작은 서브블럭에 리스를 허가할 수 있다.Alternative embodiments also support parallel access to groups of storage locations by allowing multiple concurrent leases to the same storage location. For example, if a parameter of a particular storage location specifies "read" access, the server may allow multiple parallel leases to the storage location without violating the integrity of the storage location. Parallel lease can also be applied to large files, for example. The server can again lease smaller subblocks of the file without compromising the integrity of the larger file.
일단 클라이언트가 리스를 요청하면, 서버는 클라이언트에, 리스의 기간을 판정하고, 리스를 갱신하고, 리스를 취소하며, 고장 복구를 수행하기 위한 메소드를 포함한 오브젝트를 반환한다. 이 오브젝트는 보다 많은 기능을 제공하는 방식으로 확장될 수 있는 클래스의 인스턴스이지만, 기본적인 클래스는 Java 프로그래밍 언어로 다음과 같이 정의된다:Once a client requests a lease, the server returns to the client an object containing methods for determining the duration of the lease, renewing the lease, canceling the lease, and performing crash recovery. This object is an instance of a class that can be extended in a way that provides more functionality, but the basic class is defined in the Java programming language as follows:
interface Lease{interface Lease {
obj FileHandle;obj FileHandle;
public long gerDuration();public long gerDuration ();
public void cancel()throws UnknownLeaseException,public void cancel () throws UnknownLeaseException,
RemoteException;RemoteException;
public void renew(long renewDrration)throwspublic void renew (long renewDrration) throws
LeaseDeniedException,LeaseDeniedException,
UnknownLeaseException,UnknownLeaseException,
RemoteException;RemoteException;
}}
이 클래스는 getDuration 메소드, 취소(cancel) 메소드, 갱신(renew) 메소드, 및 복구(recover) 메소드를 포함하는 많은 메소드를 포함한다. "getDuration" 메소드는 클라이언트에게 허용된 리스 기간의 길이를 제공한다. 이 기간은 서버에 의해 허용된 가장 최근의 리스를 나타낸다. 그러나, 리스에 남아 있는 시간의 양을 판정하는 것을 클라이언트의 책임이다.This class contains a number of methods, including the getDuration method, the cancel method, the renew method, and the recover method. The "getDuration" method gives the client the length of the lease allowed. This period represents the most recent lease allowed by the server. However, it is the client's responsibility to determine the amount of time remaining in the lease.
"renew" 메소드는, 클라이언트가 본래의 리스 요청을 다시 초기화할 필요없이 보다 많은 시간을 요청하여 리스를 갱신하는 것을 허용한다. 클라이언트가 리스를 갱신하기를 원할 수 있는 상황은, 본래의 리스가 불충분한 것으로 증명될 때(즉, 클라이언트가 기억장소의 부수적인 사용을 필요로 할 때) 또는 단지 부분적인 리스(즉, 요청된 리스 미만)가 허용될 때를 포함한다.The "renew" method allows the client to request more time to renew the lease without having to reinitialize the original lease request. A situation in which a client may want to update a lease is when the original lease proves insufficient (i.e. when the client needs an additional use of storage) or only a partial lease (ie Less than a lease).
클라이언트는 갱신 메소드를 사용하여, 부수적인 리스 기간을 요청할 수 있거나 또는 클라이언트는 많은 부수적인 리스 기간이 허용될 때까지 갱신 메소드를 다수회 계속해서 호출할 수 있다. 이 갱신 메소드는 또한 어떠한 반환값도 가지지 않는다: 만일 갱신이 허용되면, 새로운 리스 기간이 호출을 한 리스 오브젝트에 반영될 것이다. 만일 서버가 리스를 갱신할 수 없거나 갱신하기를 원치 않으면, 그 이유가 호출한 리스 오브젝트에 명시된다.The client may use the update method to request an additional lease period, or the client may continue to call the update method multiple times until many additional lease periods are allowed. This update method also has no return value: If an update is allowed, the new lease duration will be reflected in the lease object that invoked it. If the server cannot or does not want to update the lease, the reason is specified in the calling lease object.
클라이언트는, 클라이언트가 리스를 취소하기를 원할 때 "cancel" 메소드를 호출한다. 따라서, 취소의 호출은 다른 프로그램들이 기억장소를 액세스할 수 있도록, 서버가 기억 장소를 회수할 수 있게 한다. 따라서, 취소 메소드는, 서버가 분산 시스템 내의 기억장소의 사용을 최적화할 수 있게 한다. 만일 클라이언트에 의한 명시적 취소없이 리스가 종료하면, 서버는 에러 발행한 것으로 가정한다.The client calls the "cancel" method when the client wants to cancel the lease. Thus, the call to cancel allows the server to retrieve the storage location so that other programs can access the storage location. Thus, the cancel method allows the server to optimize the use of storage in distributed systems. If the lease terminates without explicit cancellation by the client, the server assumes that an error has been issued.
"recover" 메소드는, 클라이언트가 서버에 대해 고장 복구를 수행할 수 있도록 서버에 의해 제공된다. 예를 들어, 이와 같은 에러 복구는 서버를 재시작하는 것을 포함할 수 있다.The "recover" method is provided by the server so that the client can perform crash recovery on the server. For example, such error recovery may include restarting the server.
기억 장소의 리싱은, 본 발명의 참조로서 일체화되어 있는 "Method and System for Leasing Storage"라는 제목의 미국특허출원 제 호 상세히 설명되어 있다.Leasing of a storage location is described in detail in US Patent Application No. entitled "Method and System for Leasing Storage", which is incorporated herein by reference.
실시의 세부 내용Details of implementation
도 9는 본 발명의 대체 실시예에 의해 사용하는데 적합한 데이타 처리 시스템(9000)을 도시한다. 데이타 처리 시스템(9000)은 인터넷(9002)에 접속된 컴퓨터 시스템(9001)을 포함한다. 컴퓨터 시스템(9001)은 메모리(9003), 보조 기억장치(9004), 중앙 처리 장치(CPU)(9006), 입력 장치(9008), 및 비디오 디스플레이(9010)를 포함한다. 메모리(9003)는 운영체제(9012) 및 클라이언트인 프로그램(9014)를 더 포함한다. 운영체제(9012)는 보조기억장치(9004) 상의 파일(9018)을 관리하는, 서버인 파일 시스템 관리자(9016)를 포함한다. 클라이언트(9014)는 서버(9016)로부터의 리스를 요청함으로써 하나 이상의 파일(9018)에 대한 액세스를 요청한다. 이에 응답해서, 서버(9016)는 이하에 설명하는 바와 같이, 리스를 허용하거나 또는 부인하기를 선택할 수 있다.9 illustrates a data processing system 9000 suitable for use by alternative embodiments of the present invention. Data processing system 9000 includes a computer system 9001 connected to the Internet 9002. Computer system 9001 includes a memory 9003, auxiliary storage 9004, a central processing unit (CPU) 9006, an input device 9008, and a video display 9010. The memory 9003 further includes an operating system 9012 and a program 9014 that is a client. Operating system 9012 includes a file system manager 9016 that is a server that manages files 9018 on auxiliary storage 9004. Client 9014 requests access to one or more files 9018 by requesting a lease from server 9016. In response, server 9016 may choose to allow or deny the lease, as described below.
JavaSpace(9019)는 오브젝트를 저장하기 위해, 데이터 처리 시스템(9000) 내의 프로그램에 의해 사용되는 오브젝트 저장고이다. 프로그램들은, JavaSpace(9019)를 사용하여, 네트워크 상의 다른 장치에 액세스가능하게 하는 것은 물론 지속적으로 오브젝트를 저장한다. JavaSpace는 본 발명의 참조로서 일체화되었으며, 출원인이 본 발명의 출원인과 동일한 "Database System Employing Polymorphic Entry and Entry Mathcing"이라는 제목의 미국특허 제 08/971,529호(1997년 11월 17일 출원)에 상세히 설명되어 있다. 기술분야의 숙련자는 컴퓨터(9000)는 부수적이거나 또는 서로 다른 컴퓨터를 포함할 수 있다는 것을 알 것이다.JavaSpace 9019 is an object store used by a program in data processing system 9000 to store objects. Programs use JavaSpace 9019 to make objects persistent as well as accessible to other devices on the network. JavaSpace is incorporated as a reference to the present invention and described in detail in U.S. Patent No. 08 / 971,529 (filed Nov. 17, 1997) entitled "Database System Employing Polymorphic Entry and Entry Mathcing" as applicants of the present invention. It is. Those skilled in the art will appreciate that the computer 9000 may include additional or different computers.
비록 대체 실시예의 특징이 메모리(9003)에 저장되는 것으로 설명되었지만, 기술분야의 숙련자는 이와 같은 특징은 또한 하드 디스크, 플로피 디스크 또는 CD-ROM과 같은 보조 기억장치; 인터넷으로부터의 반송파; 또는 다른 형태의 RAM 또는 ROM과 같은 다른 컴퓨터 판독가능 매체에 기억되거나 또는 그로부터 판독될 수 있다는 것을 알 것이다. 부수적으로, 기술분야의 숙련자는 대체 실시예가 데이타베이스, 스프레드쉬트 및 문서와 같이 보조기억 장치 내에 다른 형태의 데이타를 리스하는데 사용될 수 있다는 것을 알 것이다.Although the features of alternative embodiments have been described as being stored in memory 9003, those skilled in the art will also appreciate that such features may also include auxiliary storage such as hard disks, floppy disks, or CD-ROMs; Carrier from the Internet; Or it may be stored in or read from other computer readable media, such as other forms of RAM or ROM. Incidentally, those skilled in the art will appreciate that alternative embodiments may be used to lease other types of data in auxiliary storage, such as databases, spreadsheets and documents.
도 10은 서버로부터의 리스를 요청할 때 클라이언트에 의해 수행되는 단계들의 순서도를 도시한다. 클라이언트에 의해 수행되는 첫번째 단계는, 서버에게 리스 요청을 송신하는 것이다(단계 10002). 이 요청은, (1) 클라이언트가 리스하기를 원하는 요청된 기억장소, (2) 소정의 리스 기간, (3) 정확한 리스 표시기, (4) 클라이언트가 원하는 액세스 종류, (5) 클라이언트의 권한, 및 (6) 복구 메소드를 포함하는 오브젝트를 포함한 다수의 파라메타를 갖는 함수 호출이다. 이 메소드는 클라이언트에 대한 에러 복구를 수행하기 위한 코드를 포함한다.10 shows a flowchart of the steps performed by a client when requesting a lease from a server. The first step performed by the client is to send a lease request to the server (step 10002). This request includes (1) the requested storage location that the client wishes to lease, (2) a given lease duration, (3) the exact lease indicator, (4) the type of access the client wants, (5) the client's authority, (6) A function call with multiple parameters, including an object containing a recovery method. This method contains code to perform error recovery on the client.
요청된 기억장소는, 리스될 기억장소의 표시를 포함한다. 소정의 리스 기간은, 클라이언트가 기억장소를 이용하기를 원하는 시간량을 포함한다. 정확한 리스 요청은, 정확한 리스 요청이 이루어지고 있는 지 또는 요청된 양 미만의 리스가 충분한지의 표시를 포함한다. 요청된 액세스의 종류는 클라이언트가 요청한 기억장소 액세스의 종류를 가리킨다. 액세스의 종류는 판독 액세스, 기록 액세스, 할당 액세스, 재할당 액세스, 및 서브 블럭 액세스(즉, 기억장소의 큰 블럭)를 포함한다. 권한 필드는 사용자 또는 클라이언트의 권한 레벨을 가리킨다. 유효 요청을 형성하기 위해서는, 클라이언트 요청은 요청된 기억장소, 및 소정의 리스 기간을 포함하여야 한다.The requested storage location includes an indication of the storage location to be leased. The predetermined lease period includes the amount of time the client wants to use the storage location. The exact lease request includes an indication of whether the correct lease request is being made or if less than the requested amount is sufficient. The type of access requested indicates the type of storage access requested by the client. Types of access include read access, write access, allocation access, reallocation access, and subblock access (i.e., large blocks of storage). The privilege field indicates the privilege level of the user or client. In order to form a valid request, the client request must include the requested storage location and a predetermined lease period.
기억장소에 대해 리스 요청을 발생하는 두가지 일반적인 시나리오가 존재한다. 첫번째 시나리오는, 파일이 생성될 때 발생한다. 파일을 생성하는데 사용되는 "create(생성)" 명령은 파일을 생성하고, 또한, 파일을 액세스하기 위해 서버에 리스 요청을 발생하는데 사용된다. 두번째 시나리오는, 클라이언트가 기존의 기억장소 또는 이미 기존의 리스(병렬 리스의 경우에)를 갖는 파일에 액세스를 원할 때 발생한다.There are two common scenarios for issuing lease requests to storage. The first scenario occurs when a file is created. The "create" command used to create a file is used to create a file, and also to issue a lease request to the server to access the file. The second scenario occurs when a client wants to access a file that already has an existing storage location or already an existing lease (in the case of a parallel lease).
요청을 송신한 후에, 클라이언트는 서버로부터 리스 오브젝트를 수신한다(단계 10004). 이 리스 오브젝트는 상기 설명한 바와 같이, 파일 핸들(file handle), getDuration 메소드, 갱신 메소드, 취소 메소드, 복구 메소드를 포함한 다양한 정보를 포함한다.After sending the request, the client receives a lease object from the server (step 10004). This lease object contains a variety of information, including a file handle, a getDuration method, an update method, a cancel method, and a recovery method, as described above.
리스 오브젝트를 수신한 후에, 클라이언트는 파일을 이용한다(단계 10005). 다음에, 클라이언트는 파일의 그 사용을 완료하였는지의 여부를 판정한다(단계 10006). 만일 그렇다면, 클라이언트는 리스를 명시적으로 취소하기 위해 리스 오브젝트 상의 취소 메소드를 호출한다(단계 10007). 이 메소드를 호출함으로써, 서버가 고장이 발생한 것으로 생각하지 않고, 리스가 서버에 의해 취소된다.After receiving the lease object, the client uses the file (step 10005). Next, the client determines whether the use of the file has been completed (step 10006). If so, the client invokes a cancel method on the lease object to explicitly cancel the lease (step 10007). By calling this method, the server does not assume that a failure has occurred and the lease is canceled by the server.
만일 클라이언트가 그 파일의 사용을 완료하지 않았으면, 클라이언트는 리스가 만료하려하는 지의 여부를 판정한다(단계 10008). 클라이언트는 getDuration 메소드를 호출하고, 남아 있는 시간이 선정된 임계치 이내인지의 여부를 판정함으로써 이 단계를 수행한다. 만일 리스가 만료하지 않으면, 프로세싱은 단계(10005)로 진행한다. 그러나, 만일 리스가 만료하려 하면, 클라이언트는 서버에 새로운 요청을 전송한다(단계 10009). 이 단계에서, 클라이언트는 리스 오브젝트에 대한 갱신 메소드를 호출한다. 갱신 메소드를 호출한 후에, 클라이언트는 갱신 요청이 성공적이었는 지의 여부를 판정한다(단계 10010). 이 단계에서, 클라이언트는 갱신 메소드가 성공적으로 반환되었는 지에 의해 갱신 요청이 성공적이었는 지의 여부를 판정한다. 만일 그렇다면, 프로세싱은 단계(10005)로 진행한다. 그러나, 만일 갱신 메소드가 성공적으로 완료하지 않았다면, 클라이언트는 리스 오브젝트 상의 복구 메소드를 호출한다(단계 10012). 갱신 요청이 성공적으로 완료하지 않았기 때문에, 클라이언트는 고장이 발생하였고, 따라서, 복구 메소드를 호출함으로써 에러 복구를 수행할 필요가 있다는 것을 안다. 다음에 복구 메소드는 서버에 대해 복구를 수행한다.If the client has not completed using the file, the client determines whether the lease is about to expire (step 10008). The client performs this step by calling the getDuration method and determining whether the remaining time is within a predetermined threshold. If the lease does not expire, processing proceeds to step 10005. However, if the lease is about to expire, the client sends a new request to the server (step 10009). In this step, the client invokes an update method on the lease object. After calling the update method, the client determines whether the update request was successful (step 10010). In this step, the client determines whether the update request was successful by whether the update method returned successfully. If so, processing proceeds to step 10005. However, if the update method did not complete successfully, the client invokes the recovery method on the lease object (step 10012). Since the update request did not complete successfully, the client knows that a failure has occurred, and therefore needs to perform error recovery by calling the recovery method. The recovery method then performs a recovery to the server.
도 11은 본 발명의 대체 실시예에 따라 서버에 의해 수행되는 단계들의 순서도를 도시한다. 서버에 의해 수행되는 첫번째 단계는, JavaSpace(9019)를 액세스하는 것이다(단계 11002). 서버는 리스 요청 동안 수신된 모든 오브젝트를 저장하는 JavaSpace를 유지한다. 이들 오브젝트는 서버가 고장을 검출할 때, JavaSpace를 액세스하고, 오브젝트 상의 복구 메소드를 호출함으로써 복구를 수행할 수 있도록 JavaSpace에 저장되어 있다. 또한, 오브젝트들은 지속적으로 저장되어, 서버가 고장나면, 서버가 재시작될 때, 서버 고장시 두드러진 모든 리스를 반영하면서 JavaSpace 내의 각각의 오브젝트 상의 복구 메소드를 호출할 수 있게 된다. 단계(11002)에서, 서버는 만일 존재한다면 리스 요청의 일부로서 클라이언트로부터 수신된 모든 오브젝트를 포함하는 JavaSpace를 액세스한다. 만일 JavaSpace에 임의의 오브젝트가 존재하면, 서버의 처리 동안 고장이 발생하여야 한다.11 shows a flowchart of steps performed by a server in accordance with an alternative embodiment of the present invention. The first step performed by the server is to access JavaSpace 9019 (step 11002). The server maintains a JavaSpace that stores all the objects received during the lease request. These objects are stored in JavaSpace so that when the server detects a failure, it can perform the recovery by accessing JavaSpace and calling the recovery method on the object. In addition, the objects are stored continuously so that if the server crashes, when the server restarts, it will be able to invoke the restore method on each object in JavaSpace, reflecting all outstanding leases in the event of a server crash. In step 1102, the server accesses a JavaSpace containing all objects received from the client as part of the lease request, if present. If any object exists in JavaSpace, a failure must occur during server processing.
다음에, 서버는 JavaSpace 내의 오브젝트 각각의 복구 메소드를 호출한다(단계 11004). 이 단계에서, 만일 JavaSpace에 오브젝트가 존재하면, 이는, 서버가 고자으로 인해 처리를 종료하였고 복구를 수행하여야 된다는 것을 가리킨다. 서버는 리스를 갖고 있는 각각의 클라이언트에 대해 복구 메소드를 호출함으로써 이 복구를 수행한다. 이들 복구 메소드는 예를 들어, 클라이언트를 재시작하고, 리스를 요청하기 직전에 있었던 상태와 같이 선정된 상태로 복원하게 할 수 있다. 모든 복구 메소드를 호출한 후에, 서버는 JavaSpace로부터 모든 오브젝트를 삭제한다(단계 11006). 복구가 수행된 후에, 오브젝트는 더 이상 필요하지 않다.Next, the server invokes a recovery method of each object in JavaSpace (step 11004). At this stage, if an object exists in JavaSpace, this indicates that the server has terminated the process due to a high risk and should perform a recovery. The server performs this recovery by invoking a recovery method for each client that has a lease. These recovery methods can cause the client to restart and restore to a predetermined state, such as the state just before requesting the lease. After calling all recovery methods, the server deletes all objects from JavaSpace (step 11006). After the recovery is performed, the object is no longer needed.
오브젝트를 삭제한 후에, 서버는 클라이언트중의 하나로부터 리스 요청을 수신한다(단계 11008). 리스 요청을 수신한 후에, 서버는 JavaSpace에, 이 요청에 수신된 오브젝트를 저장한다(단계 11010). 오브젝트를, 지속적으로 오브젝트를 저장하는 JavaSpace에 저장함으로써, 만일 고장이 발생하면, 서버는 JavaSpace를 액세스하고, 오브젝트 상의 복구 메소드를 호출하여 클라이언트에 대한 에러 복구를 수행할 수 있다.After deleting the object, the server receives a lease request from one of the clients (step 11008). After receiving the lease request, the server stores the object received in the request in JavaSpace (step 11010). By storing the object in a JavaSpace that constantly stores the object, if a failure occurs, the server can access the JavaSpace and call a recovery method on the object to perform error recovery for the client.
JavaSpace에 오브젝트를 저장한 후에, 서버는 서버에 대한 복구 메소드를 포함하여 상술한 메소드를 갖는 오브젝트를 반환함으로써, 리스 요청을 허가한다(단계 11012). 서버의 처리에서 일정 시점 이후에, 서버는 클라이언트로부터의 갱신 요청이 수신되었는 지의 여부를 판정한다(단계 11014). 만일 갱신 요청이 수신되었으면, 서버는 리스를 갱신한다(단계 11017). 그러나, 만일 갱신이 수신되지 않았다면, 서버는, 취소 메소드를 호출하는 클라이언트에 의해 취소 요청이 수신되었는지의 여부를 판정한다(단계 11015). 만일 클라이언트가 취소 메소드를 호출하였다면, 서버는 JavaSpace로부터 단계(11010)에서 저장된 오브젝트를 삭제함으로써 리스를 취소하고, 만일 이것이 파일 상의 최종 리스이면, 서버는 파일을 삭제한다(단계 11016).After storing the object in JavaSpace, the server grants the lease request by returning an object with the aforementioned method, including a recovery method for the server (step 11012). After some point in the server's processing, the server determines whether an update request from the client has been received (step 11014). If an update request has been received, the server updates the lease (step 11017). However, if no update has been received, the server determines whether a cancel request has been received by the client invoking the cancel method (step 11015). If the client called the cancel method, the server cancels the lease by deleting the object stored in Java 1 1010 from JavaSpace, and if this is the last lease on the file, the server deletes the file (step 11016).
만일 취소 요청이 수신되지 않았다면, 서버는 리스가 만료되었는지의 여부를 판정한다(단계 11018). 만일 리스가 만료되지 않았다면, 처리는 단계(11014)로 진행한다. 그러나, 만일 리스가 만료되었다면, 서버는, 고장이 발생하였다는 것을 알고, 따라서 만료한 리스를 갖는 클라이언트에 대해 JavaSpace 내의 오브젝트 상의 복구 메소드를 호출한다(단계 11020). 복구 메소드를 호출한 후에, 서버는 더 이상 필요하지 않기 때문에 이 오브젝트를 삭제한다(단계 11022).If no cancellation request is received, the server determines whether the lease has expired (step 11018). If the lease has not expired, processing proceeds to step 11014. However, if the lease has expired, the server knows that a failure has occurred and thus invokes a repair method on the object in JavaSpace for the client with the expired lease (step 11020). After calling the recovery method, the server deletes this object because it is no longer needed (step 11022).
본 발명에 따른 방법 및 시스템이 그 특정 실시예를 참조하여 설명되었지만, 기술분야의 숙련자는 본 발명이 특허청구범위에 정의된 바와 같이 본 발명의 정신과 범위를 벗어나지 않고 다양하게 변경될 수 있다는 것을 알 수 있을 것이다.Although the method and system according to the present invention have been described with reference to specific embodiments thereof, those skilled in the art will recognize that the present invention may be variously modified without departing from the spirit and scope of the present invention as defined in the claims. Could be.
Claims (3)
Applications Claiming Priority (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US7604898P | 1998-02-26 | 1998-02-26 | |
US60/076,048 | 1998-02-26 | ||
US09/044,916 US6016500A (en) | 1996-10-11 | 1998-03-20 | Leasing for failure detection |
US09/044,916 | 1998-03-20 | ||
PCT/US1999/003398 WO1999044128A1 (en) | 1998-02-26 | 1999-02-17 | Leasing for failure detection |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20010041295A true KR20010041295A (en) | 2001-05-15 |
Family
ID=61094071
Family Applications (3)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020007009395A Withdrawn KR20010041295A (en) | 1998-02-26 | 1999-02-17 | Leasing for failure detection |
KR1020007009318A Withdrawn KR20010041228A (en) | 1998-02-26 | 1999-02-17 | Method and system for leasing storage |
KR1020007009230A Withdrawn KR20010034515A (en) | 1998-02-26 | 1999-02-25 | Method and system for facilitating access to a lookup service |
Family Applications After (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020007009318A Withdrawn KR20010041228A (en) | 1998-02-26 | 1999-02-17 | Method and system for leasing storage |
KR1020007009230A Withdrawn KR20010034515A (en) | 1998-02-26 | 1999-02-25 | Method and system for facilitating access to a lookup service |
Country Status (1)
Country | Link |
---|---|
KR (3) | KR20010041295A (en) |
-
1999
- 1999-02-17 KR KR1020007009395A patent/KR20010041295A/en not_active Withdrawn
- 1999-02-17 KR KR1020007009318A patent/KR20010041228A/en not_active Withdrawn
- 1999-02-25 KR KR1020007009230A patent/KR20010034515A/en not_active Withdrawn
Also Published As
Publication number | Publication date |
---|---|
KR20010034515A (en) | 2001-04-25 |
KR20010041228A (en) | 2001-05-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6760736B2 (en) | Methods and systems for distributed failure detection and recovery using leasing techniques | |
US6449648B1 (en) | Lease renewal service | |
US6925644B2 (en) | Method, apparatus, and product for leasing of group membership in a distributed system | |
KR20010041296A (en) | Method, apparatus, and product for leasing of delegation certificates in a distributed system | |
US6728737B2 (en) | Method and system for leasing storage | |
EP1057105B1 (en) | Method and system for leasing storage | |
KR20010041295A (en) | Leasing for failure detection | |
EP1057106B1 (en) | Method, apparatus, and product for leasing of group membership in a distributed system | |
EP1058882A1 (en) | Leasing for failure detection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0105 | International application |
Patent event date: 20000824 Patent event code: PA01051R01D Comment text: International Patent Application |
|
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 |