KR19980079611A - Mechanism for locking tool data objects in the framework environment - Google Patents

Mechanism for locking tool data objects in the framework environment Download PDF

Info

Publication number
KR19980079611A
KR19980079611A KR1019980000914A KR19980000914A KR19980079611A KR 19980079611 A KR19980079611 A KR 19980079611A KR 1019980000914 A KR1019980000914 A KR 1019980000914A KR 19980000914 A KR19980000914 A KR 19980000914A KR 19980079611 A KR19980079611 A KR 19980079611A
Authority
KR
South Korea
Prior art keywords
lock
model
objects
data
framework
Prior art date
Application number
KR1019980000914A
Other languages
Korean (ko)
Other versions
KR100313844B1 (en
Inventor
크리스토퍼 로렌스 브랠리
제프리 그랜트 존스톤
블라디미르 클릭닉
데이비드 마틴 로존
록 틴 로이
더크 알렉산더 셀레만
Original Assignee
포맨 제프리 엘
인터내셔널 비지네스 머신즈 코포레이션
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 포맨 제프리 엘, 인터내셔널 비지네스 머신즈 코포레이션 filed Critical 포맨 제프리 엘
Publication of KR19980079611A publication Critical patent/KR19980079611A/en
Application granted granted Critical
Publication of KR100313844B1 publication Critical patent/KR100313844B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/40Data acquisition and logging

Abstract

도구(tool) 데이터와 같은 데이터가 일반적으로 액세스 가능할 경우, 동시에 실행중인 유저 프로세스들(concurrent user processes)은 중복하여 갱신(modification)할 수 있으며, 그 결과 데이터를 불완전 또는 불가해(不可解 : incomprehensible) 상태로 만들 위험이 존재한다. 본 발명은 이러한 것을 방지하기 위한 로킹 메카니즘(locking mechanism)을 제공한다. 로크 객체들(lock objects)은 풀(pool) 또는 저장소(repository) 내에 유지된다. 두 가지 형식의 로킹 객체가 제공되는데, 하나는 다수의 유저 프로세스에 의해 공유될 수 있으며 로킹된 데이터에 대해 판독 액세스만을 허가하는 공유 가능한 로크(shareable locks)이고, 다른 하나는 한 번에 하나의 유저 프로세스에 의해서만 사용 가능하며 사용중인(owning) 프로세스가 로킹된 데이터를 갱신(modify)하도록 허가하는 배타 로크(exclusive locks)이다.If data such as tool data is generally accessible, concurrent user processes can be duplicated and modified, resulting in incomplete or incomprehensible data. There is a danger of bringing it into a state. The present invention provides a locking mechanism to prevent this. Lock objects are kept in a pool or repository. Two types of locking objects are provided, one is shareable locks that can be shared by multiple user processes and only allows read access to the locked data, and the other one user at a time. Exclusive locks that can be used only by a process and allow the owning process to modify the locked data.

Description

프레임워크 환경에서 도구 데이터 객체를 로킹하는 메카니즘Mechanism for locking tool data objects in the framework environment

본 발명은 데이터 처리 분야에 관한 것으로, 구체적으로는 공통 액세스 도구 데이터(common access tool data)에 대한 로킹 메카니즘에 관한 것이다TECHNICAL FIELD The present invention relates to the field of data processing, and in particular, to a locking mechanism for common access tool data.

본 출원인이 카나다에 출원한 An Object Oriented Framework Mechanism Providing Common Object Relationship and Context Management for Multiple Tools라는 명칭의 특허 출원(IBM Docket No. CA9-97-002)은 도구 데이터 관리용 프레임워크 메카니즘에 관한 것이다. 본 발명의 로킹 메카니즘은 상기 특허 출원에 기술된 환경에 사용될 수 있다.The patent application (IBM Docket No. CA9-97-002) filed by the Applicant in Canada, entitled An Object Oriented Framework Mechanism Providing Common Object Relationship and Context Management for Multiple Tools, relates to a framework mechanism for tool data management. The locking mechanism of the present invention can be used in the environment described in the patent application.

도구(tool)은 유저용 데이터를 저장, 관리 및 검색하는 소프트웨어, 프로그램, 또는 프로그램 내의 애플리케이션 모듈의 유닛이다. 개발중인 새로운 도구는 모두 도구 데이터용 저장 메카니즘을 설계하고, 구현하며 검사하는 작업을 포함한다. 따라서, 새로운 도구의 개발과 관련된 비용이(시간과 경비 양자에 있어서) 중요한 요소는 아니다.A tool is a unit of software, program, or application module within a program that stores, manages, and retrieves data for a user. All new tools under development include designing, implementing and examining storage mechanisms for tool data. Therefore, the costs associated with the development of new tools (both time and money) are not critical.

대다수 도구는 흔히 데이터를 저장 및 관리하기 위한 자체 메카니즘들을 포함하는데, 이들 메카니즘은 대개 독점적(proprietary)이다. 여기서 독점적이라는 것(proprietary)은 그 메카니즘을 구현하기 위한 세부 사항들이 다른 도구 제작자들 또는 개발자들과 공유되지 않는다는 것을 의미한다. 이러한 독점은 개별 유저의 요구를 충족시키기 위한 기존의 증명된 도구들을 커스텀화(customize)하고 확장시키는데 많은 문제점들을 야기한다. 예를 들어, 도구의 인터페이스(interface) 또는 뷰(view) 부분이 도구의 저장 메카니즘 또는 모델과 뒤얽히게 되어 기존 뷰(view)들과 새로운 뷰들을 통합하는데 난점을 야기시킬 수 있다. 이러한 현상을 도구의 중립성 결여(lack of neutrality)라고 부른다.Most tools often include their own mechanisms for storing and managing data, which are usually proprietary. Proprietary here means that the details for implementing the mechanism are not shared with other toolmakers or developers. This monopoly causes many problems in customizing and extending existing proven tools to meet the needs of individual users. For example, the interface or view portion of a tool may become entangled with the tool's storage mechanism or model, which may cause difficulties in integrating existing and new views. This phenomenon is called the lack of neutrality of the tool.

또한, 하나의 도구에 의해 생성된 데이터는 다른 도구에 의해 직접 또는 투명하게(transparently) 사용될 수 없다. 대신, 다른 도구들과 일치하는 다른 포맷(format)에 데이터를 기록하는 엑스포트(export) 동작 및 다른 포맷의 데이터를 판독하는 임포트(import)와 같은 동작들이 요구되며, 도구의 사용자는 도구간에 데이터를 엑스포트 또는 임포트하는 동작을 조심스럽게 선택해야만 한다In addition, data generated by one tool cannot be used directly or transparently by another tool. Instead, operations are required, such as an export operation that writes data in a different format that matches other tools, and an import operation that reads data in a different format. You must carefully select the operation to export or import

또한, 다른 포맷으로부터 임포트된 데이터 부분은 임포팅 도구의 데이터 저장에 대해 양립할 수 없거나 그러한 데이터 저장과 모순되어 즉시 폐기될 수도 있다. 이것은 정보의 라운드 트립 완전성(round trip integrity)을 손상시키며, 하나 이상의 도구에서 정보를 반복적으로 개발하는 것이 어렵게 되거나 불가능하게 된다.In addition, portions of data imported from other formats may be incompatible with the data storage of the importing tool or may be immediately discarded inconsistent with such data storage. This compromises the round trip integrity of the information, making it difficult or impossible to develop the information repeatedly in one or more tools.

결국, 도구 개발자들은 유사한 데이터를 관리하는 다른 도구에 대한 수정(revision) 또는 개발을 모니터(monitor)해야 하며, 그에 대응하는 새로운 데이터 포맷을 엑스포트 및 임포트하기 위해 새로운 기능을 추가해야 한다. 새로운 엑스포트 및 임포트 기능을 개발하고 검사하는 직접적 비용(raw expense) 외에, 새로운 포맷이소개되는 시점과 포맷을 핸들링하기 위하여 다른 도구들에서 임포트 및 엑스포트 기능을 이용할 수 있게 되는 시점 간에 시간의 지체가 존재한다.As a result, tool developers must monitor the development or revision of other tools that manage similar data, and add new functionality to export and import the corresponding new data format. In addition to the raw expense of developing and examining new export and import features, there is a delay between when new formats are introduced and when other tools become available to handle the format. do.

객체 지향(object oriented : OO) 프로그래밍 기술, 특히 OO 프레임워크 기술은 기존 도구들을 계속 수정(rework)하는데 드는 비용 문제를 해소하는 방법을 제공하며, 다중 도구들을 사용함에 있어서 데이터의 완전성(integrity)을 제공한다.Object oriented (OO) programming technology, particularly the OO framework technology, provides a way to solve the cost of continuing to rework existing tools and improves the integrity of the data in using multiple tools. to provide.

[객체 지향 기술(Object Oriented Technoloy) 대(對) 절차 기술(Procedural Technoloy)][Object Oriented Technoloy Procedural Technoloy]

본 발명이 특정 OO 기술(즉, OO 프레임워크 기술)에 관한 것이지만, 일반적으로 OO 기술이 (흔히 절차 기술(procedural technoloy)로 불리우는) 통상적인 프로세스 기반 기술과 매우 다르다는 것을 먼저 이해해야 한다. 상기 2가지 기술들은 모두 동일한 문제점을 해결하기 위해 사용될 수 있지만, 궁극적인 문제 해결 방법은 아주 다르다. 이러한 차이점은 절차 기술의 설계 주안점이 OO 기술의 설계 주안점과 완전히 다르다는 사실로부터 기인한다. 프로세스 기반 설계의 주안점은 문제를 해결하는 전체 프로세스(overall process)에 두고 있다. 이와 반대로 OO 설계에서는 어떻게 하면 솔루션(solution)을 제공하는데 공동 작업이 가능한 독립적인 엔터티의 세트로 문제를 분해시킬 수 있는가에 주안점을 두고 있다. OO 기술의 독립적인 엔터티들은 객체(object)라고 불리운다. 바꾸어 말하면, 절차 기술(procedural technology)에서는 문제가 중첩된(nested) 컴퓨터 프로그램 또는 절차(procedure)의 계층 구조들로 분류되는데 반해 OO 기술에서는 서로 협력하는 객체(cooperating object)의 세트로 분해된다는 점에서 양 기술은 크게 다르다.Although the present invention relates to a particular OO technology (ie, OO framework technology), it should first be understood that OO technology is very different from conventional process-based technology (often referred to as procedural technoloy). Both techniques can be used to solve the same problem, but the ultimate solution is quite different. This difference stems from the fact that the design focus of procedural technology is completely different from the design focus of OO technology. The focus of process-based design is on the overall process of solving problems. In contrast, the OO design focuses on how the solution can be broken down into a set of independent entities that can work together to provide a solution. Independent entities of OO technology are called objects. In other words, in procedural technology, problems are classified into nested hierarchical structures of computer programs or procedures, whereas in OO technology, they are broken down into a set of cooperating objects. Both techniques are very different.

OO 프로그래밍의 중요한 특징은 객체가 다른 용도의 다른 조합 또는 상이한 귀속 속성(ascribed different attributes)으로 조합될 수 있는 재사용할 수 있는 소프트웨어 엔터티라는 점이다. 이것의 한 예로 미국 West Technologies사의 Method And System For Generating A User Interface Adaptable To Various Database Management System이라는 명칭의 미국 특허 제 5,550,971 호를 들 수 있는데, 이 특허는 데이터 베이스 방법(data base scheme)을 나타내는 다양한 정보 형식을 가진 유저 인터페이스를 생성하기 위한 동적 모델을 개시하고 있다. 상기 모델은 유저로 하여금 상이한 조회(query) 언어, 데이터 베이스 시스템 및 특정 데이터 베이스 레코드, 필드 및 관계를 학습하게 하지 않고서도 상이한 데이터 베이스 관리 시스템에 적용할 수 있다. 상기 모델은 인스턴스가 실제 데이터 베이스로부터의 다양한 친밀도로 엔터티 및 관계를 나타내는 구체적인 클래스(concrete class)들의 집합에 의해 구현된다. 이러한 클래스들의 객체들은 생성되고 데이터 베이스의 구조를 기술하기 위해 상호 관계를 가지게 된다. 상기 모델 클래스들은 유저 인터페이스를 생성하기 위한 실제 데이터 베이스 구조를 조사하고, 유저 인터페이스에 의해 사용되는 데이터 베이스 정보를 캐슁(cache)하기 위한 표준 인터페이스를 제공한다.An important feature of OO programming is that objects are reusable software entities that can be combined in different combinations of different uses or with different attributes. An example of this is U.S. Patent No. 5,550,971 entitled Method And System For Generating A User Interface Adaptable To Various Database Management System from West Technologies, Inc., which discloses a variety of information representing a database base scheme. Discusses a dynamic model for creating formal user interfaces. The model can be applied to different database management systems without requiring users to learn different query languages, database systems, and specific database records, fields, and relationships. The model is implemented by a set of concrete classes whose instances represent entities and relationships in various intimacies from the actual database. Objects of these classes are created and interrelated to describe the structure of the database. The model classes provide a standard interface for examining the actual database structure for creating the user interface and for caching database information used by the user interface.

유사한 것들로, 미국 특허 제 5,428,729호(System And Method For Computer Aided Software Engineering, IBM Corporation)는 원시 코드(source code), 검사 데이터와 같은, 데이터 엔터티 문서의 위치를 추적(track)하여 액세스하고, 개발 중인 소프트웨어 프로젝트의 컨텍스트 내에서 컴파일러, 에디터, 링커, 문서 포맷기, 검사 장비(test harnesses)와 같은 데이터 번역(translation of data) 절차를 참조하도록 설계된 시스템을 개시한다. 개발 중인 각 새로운 프로젝트는 메타프로그래머(metaprogrammer)에 의해 템플릿(templete)으로부터 생성되며, GUI(graphic user interface)를 통해 제공된다. 각 유저는 이 마스터 뷰(master view)로부터, 유저의 액세스 권한에 따라 선택된 마스터로부터 객체의 서브 세트로 구성된 유저 뷰를 클론(clone)할 수 있다. 뷰를 통하여, 구축 절차(build procedure)를 편집, 정의 및 디스패치(dispatch)하고 검사 사례(test case)를 정의 및 디스패치하기 위하여 유저가 데이터 엔터티를 액세스할 수 있는 특정한 플로우(flow)가 기술된다. 액세스 권한은 유저의 클래스를 통해 유저들을 객체와 연관시킨다. 상기 특허는 GUI의 외관 및 플로우와 임의(arbitrary)의 상이한 저장소(repository)에 저장된 파일에 액세스를 제공하는 방법, 파일을 소스(source)로부터 타겟 폼(target form)으로 번역하기 위한 규칙을 저장하는 방법 및 프로젝트의 유저-특정 뷰(user-specific views)들을 통해 액세스를 제어하는 방법에 관한 것이다. 그러나 이것은 객체 지향 데이터 통합 프레임워크가 아니므로 이러한 시스템과 본 발명 간의 근본적인 차이는 상기 특허의 시스템이 지정되어 있지만 확장이 가능한 프레임워크 인터페이스들 및 프로토콜들을 통해 다수의 상이한 미지의 도구들 간에 일관된 거동 감각(consistent behavioural feel)을 촉진하도록 설계되어 있지 않다는 점이다.Similarly, US Patent No. 5,428,729 (System And Method For Computer Aided Software Engineering, IBM Corporation) tracks, accesses, and develops the location of data entity documents, such as source code and inspection data. Disclosed are systems designed to refer to translation of data procedures such as compilers, editors, linkers, document formatters, test harnesses within the context of the software project in question. Each new project under development is created from a template by a metaprogrammer and provided through a graphical user interface (GUI). Each user can clone from this master view a user view consisting of a subset of objects from the selected master in accordance with the user's access rights. Through views, a specific flow is described in which a user can access a data entity to edit, define, and dispatch build procedures, and to define and dispatch test cases. Access rights associate users with objects through their classes. The patent describes a method for providing access to files stored in different repositories of appearance and flow of an GUI and arbitrarily, storing rules for translating files from source to target form. A method and method of controlling access through user-specific views of a project. However, since this is not an object-oriented data integration framework, the fundamental difference between this system and the present invention is that a consistent sense of behavior among a number of different unknown tools is provided through the framework of the patented but extensible framework interfaces and protocols. It's not designed to facilitate consistent behavioural feel.

OO 설계의 당업자들에게 특정한 의미를 갖는 용어들(terms and phase)이 발전되었지만, 프레임워크란 단어는 가장 넓게 정의된 단어 중의 하나로 사람에 따라 다른 의미를 갖는다. 따라서 두 개의 가상 프레임워크 메카니즘의 특성을 비교할 경우에는 적절한 비교인지를 확인하기 위해 주의를 기울여야 한다.Although terms and phases have been developed that have particular meaning to those skilled in the art of OO design, the word framework is one of the most widely defined words and has different meanings for different people. Therefore, care must be taken when comparing the characteristics of two virtual framework mechanisms to ensure that they are appropriate comparisons.

이하에서 더 명확하게 기술되는 바에 따라, 상기 애플리케이션에서는 프레임워크란 용어가 코어 기능 및 확장 가능한 기능을 갖도록 설계된 OO 메카니즘을 지칭하기 위해 사용된다. 코어 기능은 프레임워크 구매자에 의한 변경을 필요로 하지 않는 프레임워크 메카니즘의 일부분이다. 반면에, 확장 가능한 기능은 프레임워크 구매자에 의해 명백히 커스텀화되며 확장되도록 설계된 프레임워크 메카니즘의 일부분이다.As will be described more clearly below, in this application the term framework is used to refer to an OO mechanism designed to have core functionality and extensible functionality. Core functionality is part of a framework mechanism that does not require modification by the framework buyer. Extensible functionality, on the other hand, is part of a framework mechanism that is explicitly customized by framework buyers and designed to be extended.

[OO 프레임워크 메카니즘][OO Framework Mechanism]

OO 프레임워크 메카니즘은 일반적으로 OO 솔루션으로 특징지워진다. 그럼에도 불구하고 프레임워크 메카니즘과 기본 OO 솔루션 간에는 근본적인 차이점이 존재한다. 프레임워크 메카니즘은 솔루션의 특정 측면이 커스텀화되고 확장되는 것을 허가하고 촉진하는 방법으로 설계된다. 바꾸어 말하면, 프레임워크 메카니즘은 문제에 대한 솔루션 그 이상이다. 메카니즘은 시간에 따라 변화하는 개별화된 요건에 중점을 두도록 커스텀화될 수 있으며 확장될 수 있는 살아 있는(living) 솔루션을 제공한다. 상기에서 논의된 바와 같이 프레임워크 메카니즘의 품질의 커스텀화/확장은 구매자들에게 매우 유용하다. 왜냐하면 프레임워크를 커스텀화 또는 확장하기 위한 비용이 기존의 비-프레임워크 솔루션을 교체하거나 수정하는 비용보다 훨씬 더 싸기 때문이다.The OO framework mechanism is typically characterized by an OO solution. Nevertheless, there are fundamental differences between the framework mechanism and the underlying OO solution. Framework mechanisms are designed in a way that allows and facilitates certain aspects of the solution to be customized and extended. In other words, framework mechanisms are more than solutions to problems. The mechanism provides a living solution that can be customized and can be extended to focus on individualized requirements that change over time. As discussed above, customization / extension of the quality of the framework mechanism is very useful to buyers. This is because the cost of customizing or extending the framework is much lower than the cost of replacing or modifying existing non-framework solutions.

따라서 프레임워크 설계자가 특정 문제의 해결에 착수할 때, 그들은 단순히 개개의 객체들을 설계하고 그 객체들을 어떻게 상호 연관시킬 것인지를 설계하는 것 이상의 작업을 해야한다. 또한 그들은 프레임워크의 코어 기능(즉 프레임워크 소비자에 의한 커스텀화 및 확장 가능성을 필요로 하지 않는 프레임워크 메카니즘 부분) 및 프레임워크의 확장 가능한 기능(즉 가능한 커스텀화 및 확장 가능성을 필요로 하는 프레임워크 부분)을 설계한다. 마지막으로 프레임워크 메카니즘의 궁극적인 가치는 객체 설계 품질 뿐만 아니라 코어 기능을 나타내는 프레임워크의 측면 및 확장 가능한 기능을 나타내는 측면에 관한 디자인 선택에도 관계된다.So when framework designers embark on solving a specific problem, they must do more than simply design individual objects and how to correlate them. In addition, they are the core functionality of the framework (that is, the portion of the framework mechanism that does not require customization and extensibility by the framework consumer) and the framework's extensible functionality (that is, the framework that requires possible customization and extensibility). Part). Finally, the ultimate value of the framework mechanism is not only about the quality of the object design, but also the design choices regarding aspects of the framework that represent core functionality and aspects that represent extensible functionality.

프레임워크의 예로 미국 특허 제 5,325,533 호(Engineering System For Modelling Computer Progams, Taligent, Inc)를 들 수 있다. 이 특허에 기술된 프레임워크는 개발 환경에 대한 증가하는 상호 작용, 생성 및 구축 설비(generation and build facilities)들을 제공한다.An example of a framework is U.S. Patent 5,325,533 to Engineering System For Modeling Computer Progams, Taligent, Inc. The framework described in this patent provides increasing interaction and generation and build facilities for the development environment.

본 발명은 애플리케이션(application) 개발 환경에 있어서 공통의 도구 액세스를 위해 데이터 객체를 로킹하기 위한 메카니즘에 관한 것이다. 메카니즘은 록크 객체를 포함하는 저장소로 구성된다. 각각의 록크 객체는 록킹 객체가 완전히 채워지는 시점을 표시하는 참조 카운터를 가지고 있다. 로크 객체는 데이터 객체에 의해 참조될 수 있다.The present invention relates to a mechanism for locking data objects for common tool access in an application development environment. The mechanism consists of a repository containing lock objects. Each lock object has a reference counter that indicates when the locking object is completely filled. Lock objects can be referenced by data objects.

도 1은 본 발명에 따른 모델 객체에 대한 클래스 계층 구조를 OMT 표기법을 사용하여 도시한 개략적인 다이어그램.1 is a schematic diagram illustrating the class hierarchy for model objects according to the present invention using OMT notation.

도 2 내지 도 6은 본 발명의 바람직한 실시예에 따른 프레임워크 메카니즘의 클래스 다이어그램을 C++ 언어로 표시한 도면.2-6 show class diagrams of a framework mechanism in C ++ language, in accordance with a preferred embodiment of the present invention.

도 7은 추가적인 바람직한 실시예에 따른 클래스의 쌍(pair)으로 모델 객체를 도시하는 도 1과 유사한 개략적인 다이어그램.7 is a schematic diagram similar to FIG. 1 showing model objects in pairs of classes according to a further preferred embodiment;

도 8은 본 발명에 따라 구성된 프레임워크 메카니즘의 계층적 범주 다이어그램을 OMT 표기법을 사용하여 도시한 계층적 카테고리 다이어그램.8 is a hierarchical category diagram showing a hierarchical category diagram of a framework mechanism constructed in accordance with the present invention using OMT notation.

도 9는 객체의 로킹 상태를 도시한 상태 다이어그램.9 is a state diagram illustrating a locked state of an object.

도 10은 본 발명의 바람직한 실시예에서 구현되는 로킹 메카니즘을 개략적으로 도시한 도면.10 is a schematic illustration of a locking mechanism implemented in a preferred embodiment of the present invention.

도 11은 본 발명의 코어 기능을 사용하여 도구 데이터의 갱신을 저장하기 위한 단계를 도시하는 플로우 다이어그램.11 is a flow diagram showing steps for storing an update of tool data using the core functionality of the present invention.

도 12는 본 발명의 코어 기능을 사용하여 도구 데이터의 갱신 통지를 발행하기 위한 단계를 도시하는 플로우 다이어그램.Fig. 12 is a flow diagram showing the steps for issuing an update notification of tool data using the core function of the present invention.

본 발명의 바람직한 실시예는 상이한 도구들 간의 부분 정보(part information)를 공유하기 위한 기준(base)을 제공하는 공통의 데이터 모델 프레임워크에서 구현된다. 프레임워크는 분할 작업 및 코드 생성을 지원하는 정보에 대한 공통 저장소(repository)와 개별 도구들에 의해 구축된 정보를 표준화하기 위한 모델 메카니즘을 결합한다. 상기 바람직한 실시예에서 구현되는 바와 같이 공통 저장소 구조의 예는 A Hierachical Metadata Store for Integrated Development Environment(IBM Docket No. CA9-97-003)라는 명칭의, 본 출원인의 카나다 특허 출원에 개시되어 있다. 본 명세서에서 본 발명의 바람직한 실시예를 충분히 이해하기 위하여 필요한 경우 공통 저장소에 대한 참조를 포함한다.Preferred embodiments of the invention are implemented in a common data model framework that provides a base for sharing part information between different tools. The framework combines a common repository of information to support partitioning and code generation and model mechanisms to standardize information built by individual tools. An example of a common repository structure as implemented in the above preferred embodiment is disclosed in the applicant's Canadian patent application entitled A Hierachical Metadata Store for Integrated Development Environment (IBM Docket No. CA9-97-003). Reference herein to common reservoirs is included where necessary to fully understand the preferred embodiment of the present invention.

상기 논의된 바와 같이, 프레임워크의 원리는 도구 정보가 그 객체들 간의 다양한 클래스들 및 관계들의 모델 객체로 구성되어 있다는 점이다.As discussed above, the principle of the framework is that the tool information consists of model objects of various classes and relationships between those objects.

각 모델 객체는 이름, 속성의 세트 및 프레임워크 내 다른 모델 객체에 대한 참조를 포함하는 관계의 세트의 3가지 항목에 의해 특징지워진다. 모델 클래스 계층 구조는 도 1에서 개략적으로 도시된다. 도 2는 바람직한 실시예의 객체 추상 클래스에 대한 C++ 언어 인터페이스를 예시한다. 도 1 및 도 2를 참조하면, 객체 (1)과 관련된 정보는 객체의 이름 (2) 및 객체에 의해 설계된 객체의 속성의 이름 (3)과 같은 다수의 개별 문자열(string)로 정의된다. 각 속성 (3)은 표준 문자열 (3a) 또는 blob (3b)중 어느 하나의 값을 포함한다 (blob는 2진 대형 객체(binary large object)의 약자로 데이터 베이스 기술에 흔히 사용된다. 여기서는 바이트로 이루어지는 무정형 문자열을 지칭한다. 이것은 이하에서 상세히 기술된다).Each model object is characterized by three items: a name, a set of attributes, and a set of relationships including references to other model objects in the framework. The model class hierarchy is shown schematically in FIG. 2 illustrates a C ++ language interface to an object abstract class of a preferred embodiment. 1 and 2, the information associated with the object 1 is defined by a number of individual strings, such as the name of the object 2 and the name of an attribute of the object designed by the object 3. Each attribute (3) contains the value of either the standard string (3a) or blob (3b) (blob is an abbreviation for binary large objects, commonly used in database descriptions, here in bytes. Refers to an amorphous string, which is described in detail below).

도 4는 바람직한 실시예에 따른 bolb 추상 클래스에 대한 C++ 언어 인터페이스를 도시한다. 너무 복잡하거나 고도로 구조화되어 문자열 형태로 표현될 수 없는 값은 일종의 blob로 구현될 수 있다. 모든 bolb는 문자열에 의해 입력되는 데이터의 세그먼트를 설정하고 검사하기 위한 동작을 제공하여야 하는데, 이때 문자열의 해석은 전적으로 blob에 달려 있다.4 illustrates a C ++ language interface to a bolb abstract class according to a preferred embodiment. Values that are too complex or highly structured and cannot be represented in string form can be implemented as a kind of blob. Every bolb must provide an action to set and inspect the segment of data entered by the string, with the interpretation of the string entirely dependent on the blob.

바람직한 프레임워크 메카니즘의 또 다른 특징은 도 1 및 도 2에 도시된 모델 객체의 관계 (4)가 개별 클래스(class)로 정의되며, 상호 배타적인 고유한 이름을 갖는다. 도 3은 이하에서 속성 세트의 일부를 정의하는 바람직한 실시예의 관계 추상 클래스(relation abstract class)에 대한 C++ 언어 인터페이스를 도시한다.Another feature of the preferred framework mechanism is that the relationship (4) of the model objects shown in Figs. 1 and 2 is defined as a separate class and has a mutually exclusive name. Figure 3 illustrates the C ++ language interface to the relation abstract class of the preferred embodiment which defines a portion of the attribute set below.

도 1을 다시 참조하면 모델 객체의 모든 관계 (4)는 문자열인 이름 (5)로 특징지워 진다. 각 관계 (4)는 또한 다른 모델 객체에 대한 참조 (6)의 세트(0 또는 그 이상)를 포함한다. 관계 (4)는 그 관계의 이름을 검사하고 그 관계의 임의의 참조들을 추가, 검사 및 제거하기 위한 동작을 제공한다.Referring again to Figure 1, all relationships (4) of the model object are characterized by the name (5), which is a string. Each relationship 4 also includes a set (0 or more) of references (6) to other model objects. Relationship (4) provides an operation for checking the name of the relationship and adding, checking and removing any references to that relationship.

참조 (6)의 기능은 객체가 아직 메모리에 있지 않다면 디스크로부터 메모리로 모델 객체를 로드(load)하는 것이다. 참조들은 양방향이어야 한다. 하나의 객체가 제 2 객체를 참조하는 경우, 제 2 객체는 그 관계중 하나에 있어서, 제 1 객체에 대한 참조 회신을 포함한다. 또한 참조들은 강한(strong) 참조 또는 약한(weak) 참조 중 하나이다. 모델 객체 (1)이 삭제되었을 때에는 그 모델 객체 (1)이 강하게 참조하는 모든 모델 객체들도 또한 삭제된다. 반면에 다른 객체를 약하게 참조하는 객체가 삭제되었을 경우에는 그 다른 객체내의 삭제된 객체에 대한 양방향(bidirectional) 참조만이 삭제된다. 도 1에 예시된 2개의 상이한 메카니즘도 또한 정의되어야 한다. 검색 문맥(search context) (7) 및 로크 문맥이 존재하며, 로크 문맥은 3개의 특징, 즉 삭제 로크 (8), 리네임 (9), 변경 로크 (10)을 갖는다.The function of reference (6) is to load model objects from disk into memory if they are not already in memory. References must be bidirectional. If one object refers to the second object, the second object includes, in one of its relationships, a reference reply to the first object. References are also either strong references or weak references. When a model object 1 is deleted, all model objects strongly referenced by the model object 1 are also deleted. On the other hand, if an object that weakly references another object is deleted, only the bidirectional reference to the deleted object in that other object is deleted. Two different mechanisms illustrated in FIG. 1 should also be defined. There is a search context (7) and a lock context, which has three features: deletion lock (8), rename (9), and change lock (10).

상이한 문맥으로 보일 수 있는 모델 객체는 그 모델을 통해 객체로 진행되는 경로에 의존한다. 도 5는 바람직한 실시예에 따른 검색 문맥 추상 클래스에 대한 C++ 언어 인터페이스를 도시한다. 검색 문맥 (7)은 모델 내 객체의 서브세트를 따른 경로를 나타낸다. 검색 문맥은 속성을 발견(find) 및 검사(inspect)하기 위한 동작을 제공하며, 속성을 발견하도록 요구받았을 때 요구된 속성을 갖는 객체와 만날 때까지 또는 리스트의 끝 부분에 도달할 때까지 모델의 리스트를 따라 내비게이트한다(도 5의 (10)). 만약 요구된 속성을 가진 객체가 발견되면 그 속성의 값은 복귀(return)된다(도 5의 (11)). 따라서 상이한 검색 문맥은 모델 내의 단일 객체는 상이한 속성을 갖는 것으로 나타난다.Model objects that may appear in different contexts depend on the path through the model to the object. 5 illustrates a C ++ language interface to a search context abstract class according to a preferred embodiment. The search context (7) represents a path along a subset of objects in the model. The search context provides the behavior for finding and inspecting attributes, and when requested to find an attribute, the model's context is reached until it encounters an object with the requested attribute or reaches the end of the list. Navigate along the list ((10) in FIG. 5). If an object with the requested attribute is found, the value of that attribute is returned ((11) in FIG. 5). Thus, different search contexts indicate that a single object in the model has different attributes.

관계가 있는 모델 객체들은 도구에 의해 변화될 수 있기 전에 도구에 의해 로킹되어야 한다. 로킹은 프레임워크 계층 구조의 바람직한 실시예와 관련하여 이하에서 더욱 상세히 논의될 것이다. 모델 객체의 속성을 변화시키기 위해, 단지 객체 자신만이 로킹될 필요가 있다. 모델 객체를 리네임하기 위하여 객체 자신은 이름에의해 객체를 참조하는 모든 관계와 함께 로킹될 필요가 있다. 모델 객체를 삭제하기 위하여, 객체에 의해 직접 또는 간접적으로 강하게 참조된 객체 자신 및 임의의 객체들 뿐만 아니라 이 객체들을 참조하는 임의의 관계들이 로킹되어야만 한다. 각 관계 내의 각 객체는 독립적으로 로킹될 수 있으며, 이러한 기본 거동은 객체의 속성을 변경하는 것 만큼이나 간단히 동작시키기에 충분하다. 모델 프레임워크는 더 복잡한 리네임(rename) 및 삭제 시나리오를 핸들링(handle)하기 위한 로크 문맥 객체를 포함한다. 도 6은 삭제 로크 문맥 (8) 및 리네임 로크 문맥 (9)의 추상 클래스에 대한 C++ 언어 인터페이스를 도시한다.Relevant model objects must be locked by the tool before they can be changed by the tool. Locking will be discussed in more detail below in connection with a preferred embodiment of the framework hierarchy. To change the properties of a model object, only the object itself needs to be locked. In order to rename a model object, the object itself needs to be locked with all relationships that refer to the object by name. In order to delete a model object, the object itself and any objects that are strongly referenced by the object directly or indirectly, as well as any relationships that reference these objects, must be locked. Each object in each relationship can be locked independently, and this basic behavior is enough to make it as simple as changing the object's properties. The model framework includes lock context objects for handling more complex rename and deletion scenarios. 6 illustrates the C ++ language interface for the abstract class of the delete lock context 8 and the rename lock context 9.

리네임 로크 문맥은 객체를 리네임하기 전에 모델 객체로부터 구성될 수 있다. 다소의 관계들이 객체의 이름에 대한 키(key)가 될 수 있기 때문에, 리네임 로크 문맥은 개체에 대한 참조를 포함하는 임의의 관계 내의 모델 객체를 로크한다. 삭제 로크 문맥은 객체를 삭제하기 전에 모델로부터 구성될 수 있다. (프레임워크하에서, 이들 모델 객체들도 또한 삭제되기 때문에) 삭제 로크 문맥은 모델 객체 및 강한 참조 체인에 의해 도달할 수 있는 임의의 모델 객체를 로크하며, 상기 모든 객체에 대한 참조를 포함하는 임의의 관계를 로크할 것이다. 이들 참조는 쓸모없는(dangling) 참조를 하지 못하도록 관계로부터 제거되어야 한다.The rename lock context can be constructed from the model object before renaming the object. Since some relationships can be a key to the name of an object, the rename lock context locks the model object within any relationship that contains a reference to the object. The delete lock context can be constructed from the model before deleting the object. The delete lock context locks any model object that can be reached by the model object and the strong reference chain (since under the framework, these model objects are also deleted), and contains any references to all of those objects. Will lock the relationship. These references should be removed from the relationship to prevent dangling references.

추가적인 바람직한 구현 방법에 있어서, 객체 클래스들은 실제로 추상화 클래스(abstraction class) 및 구현 클래스(implementation class)로 이루어진 클래스의 쌍(pair)으로 되어있다. 이것은 도 7에 예시되어 있다. 모든 모델 객체는 대응하는 구현 객체 (14)에 대해 참조 (13)을 포함하는 추상화 객체 (11)을 포함한다.In a further preferred implementation, the object classes are actually a pair of classes consisting of an abstraction class and an implementation class. This is illustrated in FIG. 7. Every model object includes an abstraction object 11 that includes a reference 13 to the corresponding implementation object 14.

객체에 대한 완전한 인터페이스 및 객체의 거동이 자신의 추상화 부분을 통하여 제공된다. 그러나 객체의 이름 (12)만이 실제로 그 추상화 부분에 저장된다. 객체의 속성 (15) 및 관계 (16)은 구현 부분 내에 은폐되어 있다. 자신의 이름을 초과하는 객체에 대한 임의의 정보의 요청은 구현 부분 및 아마도 그 구현 부분 내에 포함된 관계 중 일부에 의해 비밀리에 충족된다.The complete interface to the object and its behavior is provided through its abstraction. But only the name (12) of the object is actually stored in that abstraction. The attributes 15 and relationships 16 of the object are concealed within the implementation part. The request for any information about an object that exceeds its name is secretly satisfied by the implementation part and possibly some of the relationships contained within that implementation part.

추상화, 구현 및 관계 객체가 독립적으로 지속되기 때문에, 객체의 이름에 대한 요구는 구현 부분이나 관계가 없이도 디스크 (17)로부터 추상화 부분을 로딩(loading)하는 비용을 초래할 것이다. 이러한 기술은 조회(inquiry)를 만족시키며 프레임워크에 있어 도구들의 전체 성능을 향상시키기 위하여 디스크로부터 전송된 데이터의 양을 최소화한다.Since the abstraction, implementation and relationship objects persist independently, the need for the name of the object will result in the cost of loading the abstraction part from disk 17 without any implementation part or relationship. This technique minimizes the amount of data transferred from disk to satisfy the inquiries and improve the overall performance of the tools in the framework.

상기 정의를 사용하여, 바람직한 실시예의 프레임워크는 개발 부분의 유연한 포함 계층 구조를 구현하기 위한 환경 및 지원 메카니즘을 제공한다. 기본 클래스(base class)들은 객체, 속성/특성 액세스, 실행 시간 형식의 식별 및 지속성 간의 (포함 지원(containment support)이라고 불리는) 부분 로킹 참조들에 대한 표준 거동을 정의한다. 모든 도구들은 기초 클래스로부터 구체적인 구현을 유도한다. 도 9는 본 발명의 바람직한 실시예에 따른 추상 기초 계층 구조를 도시한다. 이 계층 구조의 코어 기능은 점선 윗 부분의 상기 계층 구조 내의 기초 클래스로서 식별되는 지속성(Persistence) (20), 통지(Notification) (21), 로킹(Loking) (22)이다. 이것은 이들 클래스들 모두가 C++ 언어 프로그래밍 언어로 이루어질 수 있는 바와 같이 오버라이트될 수 없다는 것을 말하는 것은 아니지만 지속성, 통지, 로킹의 일부 형식이 본 발명의 프레임워크가 동작되는데 필요한 코어 기능이다. IDE 요소 (24)로 시작하는 점선 아래의 클래스는 프레임워크 계층 구조에 포함될 수 있는 데이터 모델 형식의 일부를 도시한다. 이러한 추가적인 클래스들은 첨부된 부록에서 정의되며, 많은 추가 클래스들이 본 출원과 동시에 출원된 특허 출원(IBM Docket No. CA9-97-003)의 상세한 설명에서 설명된다.Using the above definitions, the framework of the preferred embodiment provides an environment and support mechanism for implementing a flexible inclusion hierarchy of development parts. Base classes define the standard behavior for partial locking references (called containment support) between objects, property / property access, identification of runtime formats, and persistence. All the tools derive specific implementation from the base class. 9 illustrates an abstract foundation hierarchy according to a preferred embodiment of the present invention. The core functions of this hierarchy are Persistence 20, Notification 21, and Locking 22, identified as base classes in the hierarchy above the dotted line. This does not mean that all of these classes cannot be overwritten as can be done in the C ++ language programming language, but some form of persistence, notification, locking is the core functionality required for the framework of the present invention to operate. Classes below the dashed lines beginning with IDE element 24 illustrate some of the data model formats that may be included in the framework hierarchy. These additional classes are defined in the appended appendix, and many additional classes are described in the detailed description of the patent application (IBM Docket No. CA9-97-003) filed concurrently with this application.

본 발명의 프레임워크 계층 구조에 있어 승계(inheritance)는 이하의 형식을 제공하도록 동작된다. 지속성 서비스(persistence service)는 호스트 컴퓨터의 파일 시스템 내의 상태를 유지하며 여러 가지 실행 프로그램들간에 이러한 데이터를 공유한다. 프레임워크 계층 구조로부터 유도된 모델 객체는 파일 시스템 내의 파일들로 분류(group)된다. 파일 시스템 내의 객체는 위탁 모델(committed model)이라고 지칭된다. 프레임워크 모델을 사용하는 프로그램을 실행할 때 위탁 모델 내의 데이터만을 볼 수 있다. 모델에 대한 모든 변화는 단일 실행 프로그램의 전용 주소 공간(private address space) 내의 모델 객체들의 내부 메모리 사본(copy)에 대해 수행된다.Inheritance in the framework hierarchy of the present invention operates to provide the following form. Persistence services maintain state within the file system of the host computer and share this data among various executable programs. Model objects derived from the framework hierarchy are grouped into files in the file system. Objects in the file system are referred to as committed models. When you run a program that uses the framework model, you see only the data in the commit model. All changes to the model are performed on internal memory copies of model objects in the private address space of a single executable program.

로킹 서비스는 모델에 대한 갱신(modification)으로부터 상호 배타(mutual exclusion)를 실행한다. 각 실행 프로그램이 모델 객체의 전용 내부 메모리 사본에 대한 변경들을 생성하기 때문에, 두 개의 프로그램이 동일한 객체를 동시에 갱신 또는 삭제할 수 없다. 로킹 서비스는 동시 액세스를 금지하는 강제 로킹 방법을 제공한다. 이것은 이하에서 상세히 설명된다.The locking service performs mutual exclusion from modifications to the model. Because each executable program creates changes to a dedicated internal memory copy of the model object, two programs cannot update or delete the same object at the same time. The locking service provides a mandatory locking method that prohibits concurrent access. This is explained in detail below.

도 9를 참조하면, 모델 객체가 제공하는 지속성 기초 클래스 (20)으로부터의 승계는 각 프로그램의 디폴트 로컬 힙(default local heap)으로부터 구성되며 호스트 컴퓨터의 파일 시스템을 통하여 지속성에 의해 공유된다. 다수의 C++ 언어 구현 방법에 있어서, 동적 또는 실행 시간 바인딩은 통상 상수 방식 포인터들(constant method pointers)의 클래스-특정 테이블에 대한 각 객체 내의 포인터로서 구현된다. 방식 테이블 포인터들은 통상 동적 링크 라이브러리(dynamic link library) 또는 실행 가능한 프로그램에 저장되지만, 모든 실행 가능한 이미지들이 서로 상이하며 또한 테이블들의 위치가 다르기 때문에 액세스할 수 없다. 따라서, 보편적인 구현 방법에 있어서, 공유된 메모리 내의 C++ 언어 객체를 저장하는 것이 불가능하며 상이한 실행 가능한 이미지들로부터 그 객체의 데이터를 액세스하는 것도 불가능하다.With reference to FIG. 9, the inheritance from the persistence base class 20 provided by the model object is constructed from the default local heap of each program and shared by persistence through the file system of the host computer. In many C ++ language implementations, dynamic or runtime binding is typically implemented as a pointer within each object to a class-specific table of constant method pointers. Manner table pointers are typically stored in a dynamic link library or executable program, but are not accessible because all executable images are different from each other and the locations of the tables are different. Thus, in a common implementation method, it is not possible to store C ++ language objects in shared memory, nor is it possible to access the data of those objects from different executable images.

본 발명의 지속성 서비스는 디폴트 로컬 힙 구성(default local heap construction)을 통하여 이러한 문제점을 피한다.The persistence service of the present invention avoids this problem through default local heap construction.

또한, 지속성 클래스 (20)은 디스크에 기록하고 디스크로부터 판독하기 위한 프레임워크 내의 모든 클래스에 메카니즘을 제공한다. 기본 객체 상태를 확장하는 모델 내의 모든 유도된 클래스는 자신의 판독 및 기록 방식을 제공해야 하지만, 지속성 클래스는 또한 클래스가 객체의 디스크 형식 및 내부 메모리 형식 간의 변환에 사용되는 스트리밍 연산자(streaming operator)를 무시하도록 객체 스트리밍에 대한 메카니즘을 정의한다. 스트리밍 연산자들은 실제 처리(processing)를 수행하기 위한 각 객체의 자체 판독 및 기록 방식을 실행한다. 이하의 구현 규칙(convention)은 바람직한 실시예의 도출된 클래스에 대해 판독 및 기록 방식을 정의함에 있어 모든 클래스에 사용된다.In addition, persistence class 20 provides a mechanism for all classes in the framework for writing to and reading from disk. Every derived class in the model that extends the underlying object state must provide its own way of reading and writing, but persistence classes also support the streaming operators that classes use to convert between the disk and internal memory types of an object. Define a mechanism for streaming the object to ignore. Streaming operators execute their own read and write methods for each object to perform the actual processing. The following implementation conventions are used for all classes in defining read and write schemes for the derived classes of the preferred embodiment.

바람직한 실시예에 있어서, 프레임워크는 C++ 언어 객체에 대해 강제 상호 배타를 구현하기 위한 표준 인터페이스를 제공한다. 이러한 구현 방법을 사용하는 클래스는 로킹 클래스 (22)로부터 도출된다. 상호 배타가 실행 프로그램 간에 공유된 객체에 대해서만 요구되기 때문에 로킹 (22)는 그 자체로 지속성 (20)의 서브 클래스이다.In a preferred embodiment, the framework provides a standard interface for implementing forced mutual exclusion for C ++ language objects. Classes using this implementation are derived from locking class 22. Locking 22 is itself a subclass of persistence 20 because mutual exclusion is only required for objects shared between executable programs.

로킹 (22)에 의해 제공되는 로킹 방법이 이하에서 설명된다. 그러나, 이러한 메카니즘이 부적당한 2가지 경우가 존재한다 : 첫째, 특정 형식의 모든 객체를 포함하도록 보증된 데이터 구조체(data structure)인 부분들의 전체 리스트(global parts list)의 경우; 둘째, 모델 객체와 함께 저장되어 있지만 그 모델 객체의 부분이 아닌 갱신된 메타 정보에 대한 메카니즘인 더티 풀(dirty pool)의 경우.The locking method provided by the locking 22 is described below. However, there are two cases where this mechanism is inappropriate: first, in the case of a global parts list, which is a data structure that is guaranteed to contain all objects of a particular type; Second, in the case of a dirty pool, which is a mechanism for updated meta information that is stored with a model object but is not part of that model object.

로킹 클래스 (22)는 로킹될 수 있는 지속성 객체(persistent object)에 대한 모델 추상화(model abstraction)이다. 로킹 클래스 (22)는 모델 내에서 사용되는 로킹 프리미티브들(primitives)을 제공한다. 일반적으로, 이들 프리미티브는 직접 사용되는 것이 아니라 합성 객체 로크(composite object lock)의 일부로서 호출된다. 객체 로크는 2단계로 구성된다;Locking class 22 is a model abstraction for persistent objects that can be locked. Locking class 22 provides the locking primitives used in the model. In general, these primitives are not used directly, but are called as part of a composite object lock. The object lock consists of two stages;

1. 계획된 형식의 동작을 위해 로크 식별자가 획득된다. 바람직한 실시예에 서, 로크 풀(lock pool)은 이하에서 기술되는 바와 같이 고정된 크기의 이름이 지정된 공유 메모리 세그먼트를 조작하는 스케일 가능한 공유 메모리 풀(scalable shared memory pool) 내에 위치된 단독(singleton) C++ 언어 클래스이다. 이 때문에 로크 식별자는 풀 내로의 실제 배열 인덱스이다.1. A lock identifier is obtained for the planned type of operation. In a preferred embodiment, the lock pool is a singleton located within a scalable shared memory pool that manipulates fixed size named shared memory segments as described below. C ++ language class. Because of this, the lock identifier is the actual array index into the pool.

2. 공유 로크 또는 배타 로크는 획득된 로크 식별자를 사용하여 로크 객체 형식을 실현(instantiate)함으로써 구성된다. 바람직한 실시예에서, 로크는 코드 블록이 빠져 나간다 할지라도 파괴자(destructor)가 자동으로 실행되도록 통상 로컬 인스턴스(local instance)로서 사용되는 C++ 언어 구성자(constructor)의 방법으로 획득된다. 로크 획득 실패(failure)는 예외를 통해 전달된다. 파괴자는 대다수의 경우에 로크를 프리 업(free up)하는데, 하나의 예외는 갱신 로크 문맥일 경우이다.2. The shared lock or exclusive lock is configured by instantiating the lock object type using the obtained lock identifier. In a preferred embodiment, the lock is obtained by way of a C ++ language constructor, which is usually used as a local instance so that the destructor is automatically executed even if the code block exits. Lock acquisition failures are propagated through exceptions. Destructors free up locks in most cases, with one exception being the update lock context.

단독 클래스는 매 프로세스 당 한번씩 살아 있는 단 한가지 클래스 인스턴스가 될 수 있는 C++ 언어 프로그래밍 규칙을 참조한다.A single class refers to the C ++ language programming conventions, which can be the only one live class instance per process.

도구 데이터 모델 객체 자신들과는 별도로 로크 객체용 저장소로서 스케일 가능한 공유 메모리 풀을 사용하는 것은 Locking Tool Data Object in Framework Environment라는 명칭으로 본 발명과 동시 출원된 IBM Docket No. CA9-97-010에 개시되어 있다.The use of a scalable shared memory pool as a repository for lock objects apart from the tool data model objects themselves is known as the Locking Tool Data Object in Framework Environment filed with IBM Docket No. It is disclosed in CA9-97-010.

스케일 가능한 공유 메모리 풀은 시스템의 이름이 지정된 공유 메모리 풀로부터 고정 크기의 세그먼트를 할당하는 것을 포함하는 피어 투 피어(peer to peer) 풀링(pooling) 메카니즘이다. 세그먼트의 이름은 미리 정의된 문자 순서를 취한 후 세그먼트 번호(0에서 시작)를 부여함으로써 생성된다. 각 프로세스는 그 프로세스에 대한 풀 세그먼트를 조작하는 단독 풀을 가진다. 새로운 세그먼트가 요구될 경우 이름이 계산되고 현재 메모리 내의 세그먼트를 발견하기 위한 시도가 이루어진다. 현재 메모리 내의 세그먼트가 발견되지 않으면 그 세그먼트가 할당된다. 이러한 프로세스는 상기 메모리 세그먼트를 요구하는 제 1 프로세스는 그 세그먼트를 할당하고 모든 후속 프로세스(subsequent process)는 그 세그먼트를 다시 액세스하도록 동기화(synchronized)된다(클라이언트/서버와 반대 개념인 피어 투 피어 방식). 프로세스 내의 각각의 단독 풀 클래스는 자신이 알고있는 모든 세그먼트의 배열을 유지한다. 이것은 배열 내로의 신속한 우회 방법(indirection)으로서 프로세스 내의 임의의 세그먼트에 대해 액세스를 허가한다. 세그먼트의 배열 이외에도, 풀에 대한 전체 정보를 포함하는 이름이 지정된 특정 영역이 할당된다. 이러한 영역의 이름은 고정되어 있으며 자신의 풀을 시작하기 위한 제 1 프로세스가 그 영역을 할당한다. 풀 내의 전체 정보에 대한 액세스는 두 개 이상의 프로세스들 간의 경쟁 상태(race condition)를 회피하도록 동기화된다.Scalable shared memory pools are a peer to peer pooling mechanism that involves allocating fixed size segments from a system's named shared memory pool. The name of the segment is generated by taking a predefined character sequence and assigning a segment number (starting at zero). Each process has a single pool that manipulates the pool segments for that process. If a new segment is required, the name is calculated and an attempt is made to find the segment in current memory. If a segment in the current memory is not found, the segment is allocated. This process requires that the first process requesting the memory segment allocates the segment and all subsequent processes are synchronized to access the segment again (peer-to-peer approach as opposed to client / server). . Each single pool class in a process maintains an array of all segments it knows about. This is a quick indirection into the array that allows access to any segment in the process. In addition to the arrangement of segments, a specific named area is allocated which contains the full information about the pool. The name of this area is fixed and assigned by the first process to start its own pool. Access to the entire information in the pool is synchronized to avoid race conditions between two or more processes.

각 세그먼트는 고정된 크기의 객체 배열로 취급되어 크기가 x인 n개의 조각으로 분할된다(여기서 x는 풀에 놓여진 객체의 크기이다). 각 프로세스가 한 조각의 기억장치를 필요로 할 경우, 풀 id의 획득을 요구한다. 풀은 할당된 현재 가장 높은 인덱스를 발견하기 위해 전체 정보 세그먼트를 사용한다. 다음번 높은 인덱스 값이 세그먼트 내에 아직 존재할 경우(즉, n의 배수가 아닐 경우), 그것은 간단히 복귀된다. 그렇지 않으면, 사용되지 않는 객체를 발견하기 위하여 현재 풀 내에 있는 모든 객체에 대한 검사(check)가 행해진다. 단독 클래스가 이러한 검사를 수행할 수 있도록 풀 세그먼트 내의 n 조각의 기억 장치의 각각은 그것이 사용되는지의 여부를 표시하기 위한 표시기를 가져야 한다. 사용되지 않은 객체가 발견되면, 그 인덱스는 뒤로 전달되며 기억 장치는 사용된 것으로 표시되고, 그렇지 않으면 새로운 세그먼트가 할당된다.Each segment is treated as an array of objects of fixed size and divided into n pieces of size x (where x is the size of the object in the pool). If each process needs a piece of storage, it needs to get a pool id. The pool uses the entire segment of information to find the highest index currently allocated. If the next high index value still exists in the segment (ie not a multiple of n), it simply returns. Otherwise, a check is made on all objects currently in the pool to find unused objects. In order for a single class to perform these checks, each of the n pieces of storage in the full segment must have an indicator to indicate whether it is used. If an unused object is found, its index is passed back and the storage is marked as used, otherwise a new segment is allocated.

일단 인덱스가 분배되면 그 인덱스는 특정 풀 방법을 통해 공유 메모리 기억 장치를 액세스하는데 사용될 수 있다. 풀 방법은 간단하게 인덱스를 취하여 세그먼트 내의 세그먼트 번호 및 인덱스를 계산한다. 그 다음 세그먼트 주소의 배열을 액세스한 후 세그먼트 내 객체의 주소를 계산한다. 이러한 방식으로 공유 메모리가 WindowsTMNT와 같은 소전의 플랫폼들(platforms)에 대한 경우인 상이한 가상 주소에 할당될 수 있다 하더라도 동일 id는 다중 프로세스에 의해 사용될 수 있다. 계산식은 아래와 같다 :Once an index is distributed, that index can be used to access shared memory storage through a particular pull method. The pull method simply takes an index and calculates the segment number and index in the segment. Then access the array of segment addresses and compute the address of the object in the segment. In this way the same id can be used by multiple processes even if shared memory can be allocated to different virtual addresses, which is the case for legacy platforms such as Windows TM NT. The formula is as follows:

세그먼트 번호 = 풀Id / nSegment number = fullId / n

세그먼트 인덱스 = 풀Id 계수 nSegment index = poolId coefficient n

풀은 필요한 경우 세그먼트를 할당하기 때문에 스케일 가능하다. 이러한 풀은 피어 투 피어 방식으로, 이러한 방식에서는 얼마나 많은 프로세스들이 포함되어 있는 지, 또는 이들 프로세스들이 어떤 순서로 시작되는지 문제가 되지 않는다(서버가 필요하지 않다). 메카니즘은 자신의 id에 의해 임의의 항목(item)을 액세스하기 위한 두 개의 우회 방법(indirection)만을 필요로 한다.The pool is scalable because it allocates segments when needed. This pool is peer-to-peer, so it doesn't matter how many processes are included or in what order these processes are started (no server is needed). The mechanism only needs two indirections to access any item by its id.

본 발명의 바람직한 실시예에서, 로크 객체 형식은 아래와 같다.In a preferred embodiment of the present invention, the lock object format is as follows.

1. 공유 로크 : 공유 판독 전용 액세스1. Shared lock: shared read-only access

2. 배타 로크 : 하나의 프로세스에 대한 판독/기록 액세스를 제한한다.2. Exclusive lock: Restrict read / write access to one process.

도 9의 상태 다이어그램에 도시된 바와 같이, 로크 객체를 구성하면 기본적인 로크 가능 모델 객체에 대한 액세스를 로킹한다. 대다수 경우, 로크 객체의 파괴는 액세스를 로크 해제하는데 필요하다. 따라서, 공유 로크 형식의 실현(instantiation)을 제거하기 위해 삭제 로크 형식을 실현함으로써 기본적인 모델 객체에 대한 공유 제한 판독/기록 액세스는 복구된다. 이것은 객체가 삭제되지 않으며 다른 것들이 그 객체를 판독 또는 갱신하도록 하는 것(즉, 공유 또는 배타 갱신 로크를 획득하는 것)을 보장한다. 예외는 로킹된 기본적인 객체가 갱신되는 경우이다. 로크는 갱신이 저장될 경우에 파괴될 수 있다.As shown in the state diagram of FIG. 9, configuring a lock object locks access to the basic lockable model object. In most cases, destruction of the lock object is necessary to unlock the access. Thus, shared restriction read / write access to the underlying model object is restored by realizing the erase lock format to eliminate the instantiation of the shared lock format. This ensures that the object is not deleted and allows others to read or update the object (ie, obtain a shared or exclusive update lock). The exception is when a locked base object is updated. The lock can be destroyed if the update is saved.

구성 및 파괴에 대한 강제 로킹은 규칙을 통해 실행된다. 프레임워크 클래스들의 구성자 및 파괴자는 보호(protected)이다. 이것은 프로그램이 객체를 직접 생성 또는 삭제하는 것을 방지한다. 대신에, 클래스 데이터의 생성 및 파괴 방법이 모든 프레임워크 클래스에 제공된다. 상기 생성 방법은 객체를 구성하기 전에 객체를 생성하여 기존 모델 내로 삽입하는데 필요한 로크를 획득한다. 상기 파괴 방법은 객체를 삭제하기 전에 모델로부터 객체에 대한 모든 참조를 제거하는데 필요한 모든 로크를 획득한다. 로크 획득 실패의 결과 취소된 갱신 동작이 중단되고, 모델 상태가 불변이며, 및 예외가 폐기된다.Forced locking for configuration and destruction is enforced by rules. Constructors and destructors of framework classes are protected. This prevents the program from creating or deleting objects directly. Instead, methods for creating and destroying class data are provided for all framework classes. The creation method obtains the lock needed to create the object and insert it into the existing model before constructing the object. The destruction method obtains all locks needed to remove all references to the object from the model before deleting the object. The canceled update operation is aborted as a result of the lock acquisition failure, the model state is unchanged, and the exception is discarded.

로크의 수명은 지속성 서브시스템 및 메모리 내의 로크를 참조하는 로크 객체의 존재 모두에 좌우된다. 이것은 도 10에 도시되어 있다. 로크 객체 클래스 (100)은 그 파생물로 공유 로크 (102) 및 배타 로크 (104)를 가진다. 이들 간의 차이점은 공유 로크가 다수의 프로세스를 가질 수 있는 반면 배타 로크는 동시에 하나의 프로세스에 대해서만 가능한 배타적이라는 점이다. 단일 프로세스 자원은 그 프로세스에 대해 하나의 배타 로크 또는 하나 이상의 공유 로크를 가질 수 있다.The lifetime of a lock depends on both the persistence subsystem and the existence of the lock object referencing the lock in memory. This is shown in FIG. The lock object class 100 has a shared lock 102 and an exclusive lock 104 as derivatives thereof. The difference between them is that shared locks can have multiple processes, while exclusive locks are exclusive only possible for one process at a time. A single process resource can have one exclusive lock or one or more shared locks for that process.

로크 객체 (100)이 로크 가능한 객체 (106)에 의해 실현되는 경우, 로크는 로크 가능한 객체가 구성될 때 할당된 로크 ID를 통해 로크 풀 (108)을 참조함으로써 위치가 설정된다. 로크 풀 내의 로크 (112)는 로크 소유자 (116)의 프로세스 ID를 포함한다. 로크 소유자가 이미 소유하고 있는 로크를 재획득하려는 시도도 허용된다.When the lock object 100 is realized by the lockable object 106, the lock is positioned by referencing the lock pool 108 via the lock ID assigned when the lockable object is configured. Lock 112 in lock pool contains the process ID of lock owner 116. Attempts to reacquire locks already owned by the lock owner are also allowed.

공유 로크의 경우에 있어서, 프로세스 ID는 항상 모조(dummy) 또는 예약된 식별자이다. 동일한 모조 식별자는 공유 로크를 획득하려는 모든 시도에 의해 사용된다. 따라서, 공유 로크가 이미 임의의 프로세스에 의해 보유되는 경우 프로세스 ID가 일치(match)되어 로크가 부여된다. 수많은 공유 로크 소유자들을 추적하기 위하여, 참조 카운터가 사용된다. 참조 카운터는 로크가 획득될 때마다 증가되며 로크가 해제될 때마다 감소된다. 카운터가 0에 도달하면 로크는 어느 프로세스에 의해서도 더 이상 소유되지 않으며 공유 또는 배타 로크 중 어느 하나로서 사용될 수 있다.In the case of a shared lock, the process ID is always a dummy or reserved identifier. The same fake identifier is used by all attempts to obtain a shared lock. Thus, if a shared lock is already held by any process, the process ID matches and is granted a lock. In order to track the number of shared lock owners, a reference counter is used. The reference counter is incremented each time a lock is acquired and decremented every time the lock is released. When the counter reaches zero, the lock is no longer owned by any process and can be used as either a shared or exclusive lock.

배타 로크의 경우에 있어서, 공유를 방지하기 위하여 실제 프로세스 ID가 사용된다. 특정 형식의 배타 로크는 로킹된 객체의 갱신 상태를 추적하는 갱신(modify) 로크이다. 객체가 갱신되지 않을 경우, 로크는 자신의 파괴자가 실행될 때 즉시 자유롭게 된다. 로킹된 객체가 갱신되는 경우, 갱신 로크는 로킹된 객체에 대한 모든 변화가 저장에 의해 위임되거나 또는 모든 변화가 취소될 때까지 갱신 로크 파괴자에 의해 해제되지 않는다. (저장이 수행됨에도 불구하고) 갱신 로크가 파괴되지 않는 경우, 객체는 로킹된 상태를 유지한다. 프로그램은 저장을 통해 로킹된 객체를 유지하기 위하여 상기 거동에 좌우될 수 있다.In the case of exclusive locks, the actual process ID is used to prevent sharing. Exclusive locks of a particular type are modify locks that track the update status of a locked object. If the object is not updated, the lock is freed immediately when its destroyer is executed. When a locked object is updated, the update lock is not released by the update lock destroyer until all changes to the locked object are delegated by storage or all changes are canceled. If the update lock is not destroyed (although the save is performed), the object remains locked. The program can depend on this behavior to maintain the locked object through storage.

두 개의 예외가 로킹 메카니즘, 부분들의 전체 리스트 및 더티 풀(dirty pool)의 사용을 위해 상기에서 설명된 바 있다.Two exceptions have been described above for the use of the locking mechanism, the full list of parts and the dirty pool.

부분들의 전체 리스트는 지정된 유일 객체의 세트를 포함한다. 바람직한 실시예의 프레임워크에 있어서, 이것은 단독 클래스인 단일 객체 내에 포함된다. 이름이 충돌(name clashes)하는 것을 검출하는 데이터 구조를 포함하는 공유 메모리 리스트가 구현될 경우, 하나의 부분(part)이 하나의 프로그램 내의 전체 리스트에 추가되며 그 부분의 이름은 위임된 부분들의 리스트 및 위임되지 않은 부분들의 이름의 공유 리스트 모두에서 유일성에 대한 검사가 이루어진다. 이름이 유일하지 않은 경우, 추가 동작이 실패하고 예외 상황이 폐기된다. 그렇지 않으면, 삽입 동작이 완료되며, 이름은 다른 프로그램이 그 이름을 사용하지 못하도록 공유 힙에 추가된다. 각 실행 프로그램은 삽입된 객체의 리스트를 유지한다. 저장 동작이 진행 중일 때 프로그램은 이러한 모든 객체를 제거한다. 이름만을 저장함으로써, 부분의 전체 그룹 내의 이름 충돌을 방지하는데 사용되는 공유 메모리의 양이 최소화되는 스케일 능력(scalability)이 제공된다.The full list of parts contains the specified set of unique objects. In the framework of the preferred embodiment, this is contained within a single object that is a single class. When a shared memory list is implemented that contains a data structure that detects name clashes, one part is added to the entire list in one program and the name of that part is a list of delegated parts. And uniqueness is checked both in the shared list of names of non-delegated parts. If the name is not unique, the add operation fails and the exception is discarded. Otherwise, the insert operation is complete and the name is added to the shared heap to prevent other programs from using that name. Each executable program maintains a list of inserted objects. While the save operation is in progress, the program removes all these objects. By storing only names, scalability is provided in which the amount of shared memory used to avoid name collisions within the entire group of parts is minimized.

제 2 예외 상황은 더티 풀(dirty pool)이다. 이것은 소스 코드 파일에 대응하는 갱신(update)이 없이 객체가 갱신되었는지의 여부를 추적(track)하는 인덱스 풀(index pool)을 참조한다. 객체의 종속성(dependencies)이 변경될 경우, 객체는 재생되어야 한다. 실제 객체를 갱신하지 않는 것은 성능 향상 뿐만 아니라 프로세스들 간의 로크 경쟁(lock contention)을 감소시킨다. 객체 및 객체의 원시 파일(source file)의 동시성(concurrence)이 결여된 경우, 객체는 오염(tainted) 또는 더티(dirty)와 같은 인덱스 풀에 대한 이름으로 참조된다. 더티 풀은 공유 객체에 대한 원격 데이터를 지원하기 위한 스케일 가능한(scalable) 공유 메모리 풀 메카니즘을 사용한다. 원격 데이터는 객체에 의존하지 않는 밀봉된(encapsulated) 객체 상태이다. 이 데이터는 객체의 로크, 객체의 갱신, 객체 순서의 저장을 거치지 않고 갱신되어 프로세스들 간의 로크 경쟁(lock contention)의 필요성을 감소시킬 수 있다. 풀은 로크 풀 인덱싱 방법을 사용하며, 하나의 객체에는 모델 객체의 수명이 영구적인 더티 풀 인덱스 내의 비트 세그먼트인 하나의 식별자가 할당된다. 각 더티 풀 세그먼트는 반으로 분할된다. 첫 번째 절반은 내부-사용 비트를 가지며 두 번째 절반은 더티 상태 비트를 가진다. 풀은 바람직한 실시예에서 지속성을 갖는다. 더티 풀은 디스크와 양방향으로 자신을 스트림(stream)한다. 이러한 방법에 있어서, 객체에 대한 소스가 재생될 필요가 있는지의 여부에 관한 정보가 후속 세션들(subsequnet sessions) 내에서 조회(query)될 수 있다.The second exception is a dirty pool. It refers to an index pool that tracks whether an object has been updated without an update corresponding to the source code file. If the object's dependencies change, the object must be replayed. Not updating the real object not only improves performance but also reduces lock contention between processes. If there is a lack of concurrence of the object and its source file, the object is referenced by the name of the index pool, such as polluted or dirty. Dirty pools use a scalable shared memory pool mechanism to support remote data for shared objects. Remote data is an encapsulated object state that does not depend on the object. This data can be updated without locking the object, updating the object, or storing the object order, thereby reducing the need for lock contention between processes. The pool uses the lock pool indexing method, and one object is assigned one identifier, which is a bit segment in the dirty pool index whose lifetime of the model object is permanent. Each dirty pool segment is split in half. The first half has the internal-use bit and the second half has the dirty status bit. The pool is durable in the preferred embodiment. The dirty pool streams itself in both directions with the disk. In this way, information as to whether or not the source for the object needs to be played can be queried in subsequent sessions.

모델에 대한 변경을 실행할 때, 지속성 서비스에 대한 3개의 요건이 존재한다.When implementing changes to the model, there are three requirements for persistence services.

1. 프로그램은 실행된 모델로부터 동작하는 동안 기존(old) 객체의 새로운 버젼을 판독할 수 없다.A program cannot read a new version of an old object while running from an executed model.

2. 파일에 대한 변경 기록의 완료를 실패(failure)하면 실행된 모델을 변조(corrupt)할 수 없다.2. Failure to complete a change record for a file cannot corrupt the executed model.

3. 하나의 프로그램 내에서 행해진 변경은 다른 프로그램에 의해 실행된 변경을 오버라이트할 수 없다.3. Changes made within one program cannot overwrite changes made by another program.

저장은 내부적으로 프로세싱된 통신 프로토콜(interprocessed communication protocol)에 의해 동기화되는 파일 시스템 내로의 2 단계 실행으로서 구현된다. 이러한 프로세스가 도 1 의 순서도에 도시되어 있다. 내부 프로세스 통신 프로토콜은 저장 대기(save pending) 및 저장 완료(save complete)의 2개의 이벤트(events)를 사용한다. 이들 이벤트들은 공유 메모리 플래그(shared memory flag), 공유 메모리 카운터, 및 통지(notify) 및 승인(acknowledge)으로 불리우는 두 개의 호스트 시스템 세마포어들(semaphore)로 구현된다.The storage is implemented as a two step execution into a file system that is synchronized by an internally processed communication protocol. This process is shown in the flowchart of FIG. The internal process communication protocol uses two events, save pending and save complete. These events are implemented as a shared memory flag, a shared memory counter, and two host system semaphores called notify and acknowledge.

저장 프로그램이 저장 대기(save pending) 이벤트를 전송할 경우(블록 40), 저장이 시작된다. 이벤트를 전송하는 것은 이벤트 공유 메모리 플래그를 참(true)으로 세팅하는 단계, 모델에 접속된 많은 프로그램 수에 대한 모델 공유 메모리 카운트(count)를 초기화하는 단계, 승인(acknowledge) 세마포어를 리셋(reset)하는 단계, 및 통지(notify)를 포스트(post)하는 단계로 이루어진다.If the storage program sends a save pending event (block 40), the storage begins. Sending an event may include setting the event shared memory flag to true, initializing a model shared memory count for a large number of programs connected to the model, and resetting the acknowledgment semaphores. And post a notify.

플래그 파일이 저장의 1 단계가 시작되었음을 표시할 경우, 저장 프로그램은 임시 파일로 갱신되었던 모든 파일을 기록한다(블록 44). 임시 파일들이 아직 모델을 활성 상태로 사용하고 있을 경우, 임시 파일에 저장하는 것은 다른 프로그램이 임시 파일을 액세스하는 것을 방지한다. 이것은 안전 저장 목표의 제 1 부분의 절반을 만족시켜 다른 프로그램은 실행된 모델로부터의 객체들을 임시 파일 내의 객체들과 혼합할 수 없다.If the flag file indicates that phase 1 of storage has begun, the storage program records all files that have been updated to temporary files (block 44). If temporary files are still using the model, storing them in a temporary file prevents other programs from accessing the temporary file. This satisfies half of the first part of the secure storage target so that no other program can mix objects from the executed model with objects in the temporary file.

저장 프로그램이 임시 파일에 모든 변경된 파일들을 기록하는 것을 일단 완료하면(블록 46), 그 저장 프로그램은 저장 대기(save pending) 이벤트가 완료되기를 를 기다린다(블록 48). 이것은 승인(acknowledge) 세마포어가 포스트될 경우, 전송 프로그램에 대해 승인된다.Once the storage program has finished writing all changed files to the temporary file (block 46), the storage program waits for the save pending event to complete (block 48). This is acknowledged for the transfer program when an acknowledgment semaphore is posted.

저장 중(save pednding) 이벤트는 프레임워크 모델에 접속된(attached) 각 프로그램 내에서 발견되는 작업자 스레드(worker thread)에 의해 처리된다(porcessed). 이벤트가 수신될 경우, 작업자 스레드가 웨이크업(wake up)된다. 스레드는 프로그램 내에 오픈된 모든 모델들을 저장 플래그 세트를 가진 모델과 비교함으로써 저장되는 모델에 프로그램이 부착(attach)되어 있는지의 여부를 결정한다. 프로그램이 저장 모델에 접착되어 있는 경우, 교차 스레드 패키지는 통지(notification)를 프로그램 메인 스레드에 포스트(post)하기 위하여 사용된다. 이러한 통지는 메인 스레드가 모든 GUI 이벤트들 및 저장된 대기 통지(saved pending notification) 이전에 수신된 통지들의 처리를 완료한 후에 비동기식으로 수신된다(블록 58).Save pednding events are processed by worker threads found within each program attached to the framework model. When an event is received, the worker thread wakes up. The thread determines whether a program is attached to the model being stored by comparing all models opened in the program with a model with a set of storage flags. If the program is glued to the storage model, the cross thread package is used to post a notification to the program main thread. This notification is received asynchronously (block 58) after the main thread has completed processing of all GUI events and notifications received prior to a saved pending notification.

프로그램 메인 스레드가 동일한 대기 통지를 수신한 경우, 그것은 모델 내의 요구-로딩(demand-loading) 및 변경(changing)을 중지시킨다(블록 60). 이것은 상기 요건 1을 완료하며, 프로그램은 기존 객체들 및 새로운 객체들을 혼합할 수 없다.If the program main thread receives the same wait notification, it stops demand-loading and changing in the model (block 60). This completes requirement 1 above, and the program cannot mix existing and new objects.

다른 프로그램들이 저장 대기 이벤트를 수신하면, 공유 메모리 카운터를 감소시켜 이벤트의 수신을 인식(acknowledge)한다(블록 62). 감소 카운터가 1일 경우, 모든 프로그램들이 통지(notify)를 처리(process)했으며 인식(acknowledge) 세마포어 이벤트가 포스트(post)되어 이러한 이벤트가 완료되었음을 표시하여(블록 64) 전송 프로그램을 웨이크업한다(블록 48).If other programs receive the storage wait event, the shared memory counter is decremented to acknowledge receipt of the event (block 62). If the decrement counter is 1, all programs have processed a notification and acknowledge semaphore events are posted to indicate that these events have completed (block 64) to wake up the transmitting program ( Block 48).

저장 대기(save pending) 이벤트가 완료될 경우, 저장 프로그램은 저장 완료의 제 1 단계(first phase)를 디스크 플래그 파일들을 통해 플래그한다(블록 46). 이러한 시점 이전에 시스템 충돌과 같은 인터럽션은 모든 변경을 상실하지만 데이터베이스를 일관된 상태로 남겨둔다.When the save pending event is complete, the storage program flags the first phase of the storage completion via the disk flag files (block 46). Before this point, interruptions, such as system crashes, lose all changes but leave the database in a consistent state.

에러가 발생하지 않으면, 모델의 변경 버전을 액세스하는데 필요한 모든 데이터는 디스크에 기록되며 시스템 또는 프로그램 충돌(crash)이 디스크-상 모델(on-disk model)을 일관되지 않은 상태로 남아 있도록 하는 것이 불가능하다. 그 다음, 저장 프로그램은 모든 임시 파일을 적절한 이름으로 리네임하고, 실행된 모델로부터 비어있는 모든 데이터 파일을 제거한다(블록 50). 이것은 변경된 모든 파일들이 자신들의 내용을 임시 파일 내의 버전들로 대치시켰음을 의미하며, 이것은 안전 저장의 제 2 요건을 만족시킨다.If no error occurs, all the data needed to access the modified version of the model is written to disk and it is impossible for a system or program crash to leave the on-disk model in an inconsistent state. Do. The storage program then renames all temporary files to their proper names and removes all empty data files from the executed model (block 50). This means that all changed files have replaced their contents with versions in the temporary file, which satisfies the second requirement of safe storage.

저장 프로그램은 다른 모든 프로그램들에 대해 디스크 상 모델이 일관된 상태임을 표시하기 위하여 저장 완료(save complete) 이벤트를 대기 작업자 스레드 및 프로그램 메인 스레드로 전송하며(블록 52), 클린업(clean up) 단계(블록 56)을 수행하기 전에 이벤트가 완료되기를 대기한다(블록 54).The store program sends a save complete event to the standby worker thread and the program main thread to indicate that the on-disk model is in a consistent state for all other programs (block 52), and the clean up phase (block Wait for the event to complete before performing 56) (block 54).

도 8의 통지 기초 클래스(Notification base class) (21)에서 발견된 다른 코어 기능은 다른 유저들에게 프레임워크 내의 도구 데이터의 변경을 통신하기 위한 메카니즘을 제공한다. 이것은 또한 도 11에 도시된다.Another core function found in the notification base class 21 of FIG. 8 provides a mechanism for communicating to other users changes to the tool data in the framework. This is also shown in FIG.

모델에 접속된 모든 프로그램들이 저장 완료(save complete) 이벤트를 수신하는 경우(블록 64), 웨이크업된다(wake up). 그 다음, 이 프로그램들은 각 변경된 객체의 최신 리비젼을 오픈하여 로드하는 각 파일 프로그램을 방문하는 프레임워크 재생 방법을 호출한다(블록 66). 이 프로세스가 일단 완료되면, 모든 프로그램은 가장 최근에 저장된 변경과 일치하는 모델의 전용(private) 내부 메모리 버전을 포함한다. 프로그램이 저장 프로그램에 의해 삭제 및 변경되었던 임의의 객체를 포함하는 경우, 저장 완료(save complete) 이벤트를 수신하는 프로그램은 또한 영향을 받은 객체들의 모든 관찰자(observer)에게 전송된 모델/뷰/제어기 통지를 가진다(블록 68). 이러한 통지를 관찰하는 것은 프로그램이 모델에 대해 실행된 변경과 일치하는 내부 상태를 만들기 위해 사용하는 후크(hook)이다. 재생을 수행한 후에, 각 프로그램은 저장 완료 이벤트의 수신을 인식한다(블록 70).If all programs connected to the model receive a save complete event (block 64), they wake up. These programs then invoke a framework replay method that visits each file program that opens and loads the latest revision of each changed object (block 66). Once this process is complete, every program contains a private internal memory version of the model that matches the most recently saved changes. If the program contains any objects that have been deleted and changed by the stored program, the program receiving the save complete event also sends a model / view / controller notification sent to all observers of the affected objects. (Block 68). Observing these notifications is a hook that the program uses to create an internal state that matches the changes made to the model. After performing playback, each program recognizes receipt of a store complete event (block 70).

저장 완료 이벤트를 완료하면 저장 프로그램 및 모든 작업자 스레드를 웨이크업한다. 저장 프로그램은 나머지 하우스키핑 작업을 완료하고 저장으로부터 복귀된다. 작업자 스레드는 저장 대기 내부 프로세스 이벤트(save pending interprocess event) 상에 대기 상태로 복귀한다.When the save complete event completes, the save program and all worker threads are woken up. The storage program completes the remaining housekeeping tasks and returns from storage. The worker thread returns to a wait state on a save pending interprocess event.

많은 모델 객체를 변경하는 동작이 성공적으로 완료될 것인지의 여부를 미리 결정하는 것이 항상 불가능한 것은 아니기 때문에, 본 발명의 추가적인 실시예에서 지속성 서비스는 실패 이벤트 내의 공지된 양호한 상태(good state)로 복귀하기 위한 능력을 제공한다. 이 프로세스는 도 12에 도시된다.In a further embodiment of the present invention, the persistence service returns to a known good state in the failure event because it is not always impossible to predetermine whether the operation of changing many model objects will complete successfully. Provide the ability for This process is shown in FIG.

검사 포인트 메카니즘은 프로그램의 전용 내부 메모리 상태를 재저장한다. 저장될 상태는 객체 및 데이터 파일들을 관리하기 위해 사용된 지속성 서비스 데이터 구조들뿐만 아니라 프로그램이 시작 또는 모델을 저장한 이후에 발생했던 모든 객체의 삭제, 생성 및 갱신을 포함한다. 검사 포인트 메카니즘이 동작하고 있는 동안, 이러한 데이터는 임시 파일에 보존된다.The checkpoint mechanism restores the program's dedicated internal memory state. The state to be saved includes the deletion, creation, and updating of all objects that have occurred since the program saved the startup or model, as well as the persistence service data structures used to manage the objects and data files. While the checkpoint mechanism is in operation, this data is kept in a temporary file.

프로그램은 이전 상태의 재저장을 요구할 수 있는 갱신의 시작을 표시하는 검사 포인트 메카니즘을 호출한다(블록 76). 그 다음, 지속성 서브시스템은 모델 상의 각 프로그램에 의해 오픈된 각 지속성 파일을 방문한다. 지속성 서브 시스템은 내부 메모리 상태가 실행된 상태와 다른 객체들을 식별한다(블록 78). 메모리에서는 갱신된 객체가 임시 파일로 저장됨으로써 플래그된다(블록 80, 82).The program invokes a checkpointing mechanism that marks the beginning of an update that may require a restore of the previous state (block 76). The persistence subsystem then visits each persistence file opened by each program on the model. The persistence subsystem identifies objects that are different from the state in which the internal memory state is executed (block 78). In memory, the updated object is flagged by being stored as a temporary file (blocks 80 and 82).

시도된 갱신이 성공적이지 않을 경우, 통상 예외 상황이 폐기 및 포착되기 때문에 롤 백(roll back) 방법이 호출된다(블록 88). 롤 백 방법은 검사 포인트 후에 삭제된 객체를 재생성하며, 검사 포인트 이후에 생성된 객체를 제거하고, 검사 포인트가 호출될 때 모든 갱신된 객체의 상태 및 그 객체들의 상태에 대한 지속성 서비스 데이터 구조의 상태를 재저장한다(블록 90).If the attempted update is not successful, the roll back method is invoked because the exception is usually discarded and caught (block 88). The rollback method regenerates objects deleted after the checkpoint, removes objects created after the checkpoint, and states the state of the persistence service data structure for the state of all updated objects and the state of those objects when the checkpoint is called. Resave (block 90).

프로세스가 알고리즘이 성공적으로 완료되었다고 결정하는 경우(블록 84, 86), 그것은 검사 포인트 메카니즘에 의해 사용된 자원들을 해제(release)하며 내부 모델 상태를 일관된 것으로 플래그하기 위한 실행(commit)을 호출한다.If the process determines that the algorithm has completed successfully (blocks 84 and 86), it releases the resources used by the checkpoint mechanism and invokes a commit to flag the internal model state as consistent.

당업자에 대해 자명한 본 발명의 상기 바람직한 실시예에 대한 변경은 첨부된 특허 청구 범위 내에 포함된다.Modifications to the above preferred embodiment of the present invention which are apparent to those skilled in the art are included in the appended claims.

도구(tool) 데이터와 같은 데이터가 일반적으로 액세스 가능할 경우, 동시 유저 프로세스들(concurrent user processes)이 중복 갱신(overlapping modification)을 만들며 불완전 또는 불가해(incomprehensible) 상태의 데이터를 남기는 위험이 존재한다. 본 발명은 이를 방지하기 위한 로킹 메카니즘(locking mechanism)을 제공한다.If data, such as tool data, is generally accessible, there is a risk that concurrent user processes create overlapping modifications and leave data in an incomplete or incomprehensible state. The present invention provides a locking mechanism to prevent this.

Claims (7)

애플리케이션 개발 환경에서 공통 도구 액세스(common tool acess)를 위한 데이터 객체 로킹 메카니즘에 있어서,In the data object locking mechanism for common tool access in the application development environment, a) 자체 프로세스의 상태가 사용 상태(occupied)인지 또는 자유 상태(free state)인지를 표시하기 위한 표시기(indicator)를 가지는 로크 객체(lock object)들을 포함하는 저장소(repository) 및a) a repository containing lock objects having indicators for indicating whether the state of the own process is occupied or free state; and b) 데이터 객체로부터 로크 객체를 참조하기 위한 수단을 포함하는 데이터 객체 로킹 메카니즘.b) a data object locking mechanism comprising means for referencing a lock object from the data object. 제 1 항에 있어서, 로크 객체가The method of claim 1 wherein the lock object a) 다중 자체 프로세스들에 의해 사용하기에 적합하도록된 공유 가능한 로크 들(shareable locks) 및a) shareable locks adapted for use by multiple self processes and b) 동시에 하나의 자체 프로세스에 의해 사용하기에 적합하도록된 배타 로크 들(exclusive locks)을 포함하는 데이터 객체 로킹 메카니즘.b) A data object locking mechanism that includes exclusive locks that are made suitable for use by one own process at the same time. 제 2 항에 있어서, 공유 가능한 로크가 사용되었음을 나타내기 위한 표시기가 하나 이상의 자체 프로세스들에 의해 공유 가능한 로크 상에 복사되기에 적합하도록된 예약 프로세스 식별자(reserved process identifier)를 포함하는 데이터 객체 로킹 메카니즘.3. The data object locking mechanism of claim 2, wherein the indicator to indicate that a sharable lock has been used comprises a reserved process identifier adapted to be copied onto the sharable lock by one or more of its processes. . 제 2 항에 있어서, 배타 로크(exclusive lock)가 사용되었음을 나타내기 위한 표시기가 자체 프로세스의 프로세스 식별자를 포함하는 데이터 객체 로킹 메카니즘.3. The data object locking mechanism of claim 2, wherein an indicator to indicate that an exclusive lock has been used includes the process identifier of its own process. 제 2 항에 있어서, 배타 로크의 경우에3. The method of claim 2, in the case of exclusive locks. a) 배타 로크로부터 참조된 데이터 객체가 갱신되었는지의 여부를 결정하기 위한 수단 및a) means for determining whether the referenced data object from the exclusive lock has been updated and b) 데이터 객체에 대한 임의의 갱신이 저장될 때까지 로크 파괴를 지연시키 기 위한 수단을 구비하는 로크 객체를 파괴하기 위한 수단을 추가로 포함하는 데이터 객체 로킹 메카니즘.b) means for destroying the lock object further comprising means for delaying lock destruction until any update to the data object is stored. 제 2 항에 있어서, 배타 로크들이 명백히 파괴되지 않았을 경우 저장(save)을 통해 지속도기에 적합하도록되는 데이터 객체 로킹 메카니즘.3. The data object locking mechanism of claim 2, wherein the exclusive locks are adapted to persistence through save if not explicitly destroyed. 제 2 항에 있어서, 자유 상태에 있는 로크 객체가 공유 가능한 로크 또는 배타 로크 중 어느 하나로서 자체 프로세스에 의해 사용될 수 있는 데이터 객체 로킹 메카니즘.3. The data object locking mechanism of claim 2, wherein a lock object in a free state can be used by its own process as either a sharable lock or an exclusive lock.
KR1019980000914A 1997-03-27 1998-01-14 Locking tool data objects in a framework environment KR100313844B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CA2,201,275 1997-03-27
CA002201275A CA2201275A1 (en) 1997-03-27 1997-03-27 Locking tool data objects in a framework environment

Publications (2)

Publication Number Publication Date
KR19980079611A true KR19980079611A (en) 1998-11-25
KR100313844B1 KR100313844B1 (en) 2001-12-12

Family

ID=4160286

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980000914A KR100313844B1 (en) 1997-03-27 1998-01-14 Locking tool data objects in a framework environment

Country Status (4)

Country Link
KR (1) KR100313844B1 (en)
CN (1) CN1107918C (en)
CA (1) CA2201275A1 (en)
TW (1) TW346604B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100426620B1 (en) * 2000-12-26 2004-04-13 한국전자통신연구원 Method of an class instance updating with OID in the main memory resident, object-relational DBMS
WO2010120573A3 (en) * 2009-04-13 2011-01-20 Microsoft Corporation Type system support for memory isolation permissions
US9026993B2 (en) 2008-06-27 2015-05-05 Microsoft Technology Licensing, Llc Immutable types in imperitive language
US9569282B2 (en) 2009-04-24 2017-02-14 Microsoft Technology Licensing, Llc Concurrent mutation of isolated object graphs

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7409389B2 (en) * 2003-04-29 2008-08-05 International Business Machines Corporation Managing access to objects of a computing environment
US20050081204A1 (en) * 2003-09-25 2005-04-14 International Business Machines Corporation Method and system for dynamically bounded spinning threads on a contested mutex
US7614054B2 (en) * 2003-12-31 2009-11-03 Intel Corporation Behavioral model based multi-threaded architecture
CN101350022B (en) * 2008-08-27 2010-04-14 中国工商银行股份有限公司 Changing process method based on database logical lock
CN101957779B (en) * 2010-09-16 2013-04-03 深圳天源迪科信息技术股份有限公司 Management method of timer
CN102279804A (en) * 2011-08-16 2011-12-14 天津市天祥世联网络科技有限公司 Memory pool structure of video monitoring platform system and method for implementing memory pool structure
CN103207809B (en) * 2012-01-13 2017-07-07 金蝶软件(中国)有限公司 Remove the method and system of mutual exclusion lock
CN102693159B (en) * 2012-05-09 2015-07-01 上海晨思电子科技有限公司 Method and device for controlling hardware equipment based on user mode multitask
CN102708323B (en) * 2012-05-15 2015-08-12 中科方德软件有限公司 The method of file object reuse is prevented in secure operating system
US9619769B2 (en) * 2014-04-01 2017-04-11 Sap Se Operational leading indicator (OLI) management using in-memory database
CN106326014A (en) * 2016-08-24 2017-01-11 杭州费尔斯通科技有限公司 Resource access method and device
CN109947704B (en) * 2017-11-20 2021-06-04 华为技术有限公司 Lock type switching method and device and cluster file system
CN111563066B (en) * 2020-04-24 2023-08-11 深圳震有科技股份有限公司 Method and device for realizing application program single-instance processing based on file lock

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5428729A (en) * 1991-12-20 1995-06-27 International Business Machines Corporation System and method for computer aided software engineering
US5325533A (en) * 1993-06-28 1994-06-28 Taligent, Inc. Engineering system for modeling computer programs

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100426620B1 (en) * 2000-12-26 2004-04-13 한국전자통신연구원 Method of an class instance updating with OID in the main memory resident, object-relational DBMS
US9026993B2 (en) 2008-06-27 2015-05-05 Microsoft Technology Licensing, Llc Immutable types in imperitive language
WO2010120573A3 (en) * 2009-04-13 2011-01-20 Microsoft Corporation Type system support for memory isolation permissions
US8495329B2 (en) 2009-04-13 2013-07-23 Microsoft Corporation Type system support for memory isolation permissions
US9569282B2 (en) 2009-04-24 2017-02-14 Microsoft Technology Licensing, Llc Concurrent mutation of isolated object graphs
US10901808B2 (en) 2009-04-24 2021-01-26 Microsoft Technology Licensing, Llc Concurrent mutation of isolated object graphs

Also Published As

Publication number Publication date
KR100313844B1 (en) 2001-12-12
CN1107918C (en) 2003-05-07
CN1195144A (en) 1998-10-07
TW346604B (en) 1998-12-01
CA2201275A1 (en) 1998-09-27

Similar Documents

Publication Publication Date Title
US6026401A (en) Locking tool data objects in a framework environment
KR100313844B1 (en) Locking tool data objects in a framework environment
US5758347A (en) Layered storage structure for computer data storage manager
US5864864A (en) Method and apparatus for providing transparent persistent data support to foreign data types
US5809507A (en) Method and apparatus for storing persistent objects on a distributed object network using a marshaling framework
Chin et al. Distributed, object-based programming systems
Shrivastava et al. An overview of the Arjuna distributed programming system
Schroeder et al. A caching file system for a programmer's workstation
Mueller et al. A nested transaction mechanism for LOCUS
US6073111A (en) Container materialization/dematerialization for reduced dataload and improved data-coherency in workflow-management systems
Dixon et al. The treatment of persistent objects in Arjuna
Walker et al. Joinpoints as ordered events: Towards applying implicit context to aspect-orientation
US6230213B1 (en) Extensible mechanism for providing safe automatic management of objects
KR100259447B1 (en) System, method, and article of manufacture for adding object services to a binary class in an objeect orient system
Buzato et al. Stabilis: a case study in writing fault-tolerant distributed applications using persistent objects
JP2000505921A (en) Distributed operating system
Alanen et al. Version control of software models
JPH10301782A (en) Frame work mechanism
Sandakly et al. PerDis: An infrastructure for cooperative engineering in virtual enterprise
Wilkes Programming Methodologies for Resilience and Availability
Kaiser Interfacing cooperative transactions to software development environments
Center Object Services Architecture
McGirr The Ownership Monad
McCue Developing a class hierarchy for object-oriented transaction processing
Heineman A transaction manager component supporting extended transaction models

Legal Events

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