WO2010027665A2 - Type descriptor management for frozen objects - Google Patents

Type descriptor management for frozen objects Download PDF

Info

Publication number
WO2010027665A2
WO2010027665A2 PCT/US2009/054299 US2009054299W WO2010027665A2 WO 2010027665 A2 WO2010027665 A2 WO 2010027665A2 US 2009054299 W US2009054299 W US 2009054299W WO 2010027665 A2 WO2010027665 A2 WO 2010027665A2
Authority
WO
WIPO (PCT)
Prior art keywords
type descriptor
type
descriptor
canonical
indirection
Prior art date
Application number
PCT/US2009/054299
Other languages
French (fr)
Other versions
WO2010027665A8 (en
WO2010027665A3 (en
Inventor
Scott D. Mosier
Peter F. Sollich
Frank V . Peschel-Gallee
Patrick H . Dussud
Simon J . Hall
Rudi Martin
Michael M. Magruder
Andrew Pardoe
Original Assignee
Microsoft Corporation
Talluri , Madhusudhan
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 Microsoft Corporation, Talluri , Madhusudhan filed Critical Microsoft Corporation
Priority to RU2011108110/08A priority Critical patent/RU2510073C2/en
Priority to CN2009801351924A priority patent/CN102203757B/en
Priority to EP09811950.6A priority patent/EP2321734B1/en
Priority to BRPI0916699A priority patent/BRPI0916699A2/en
Publication of WO2010027665A2 publication Critical patent/WO2010027665A2/en
Publication of WO2010027665A3 publication Critical patent/WO2010027665A3/en
Publication of WO2010027665A8 publication Critical patent/WO2010027665A8/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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44557Code layout in executable memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0891Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/436Semantic checking
    • G06F8/437Type checking

Definitions

  • object The most fundamental building block of object-oriented programming is called an "object."
  • an object has zero or more methods and zero or more member fields. Accordingly, in order to be properly interpreted by a computing system, the object should be of a particular type understood by the computing system.
  • Primitive types include types that are provided by the programming language itself as basic building blocks for the programmer. Examples of primitive types might include a character, a string, an integer, a floating point number, an array, and so forth.
  • Programming languages typically allow programmers to construct composite types that represent a combination of constituent types, whether those constituent types are primitive types or other composite types. Such composite types can be quite complex. [0002] It is often advantageous to know the type of a particular object.
  • an object in memory during execution time, an object often has an associated type descriptor.
  • the object has a type description pointer that points to a more complete type descriptor.
  • the type descriptor might be used for a variety of purposes. For one, the type descriptor for an object may be evaluated in order to verify that a particular operation may be performed by the object, or to determine that the object is of the same or equivalent type as another object.
  • a frozen object instance is one whose layout is completed at compile time and is included as part of the compiled image. Objects that are not subject to extensive or perhaps any change during run- time are perhaps the best candidates for object freezing, but any object instance with pre-initialized data may be frozen. For instance, a calendar program might provide a daily inspirational quote selected from amongst 1000 predetermined quotes. Each of those 1000 predetermined quote may be represented in a frozen object of type string. Instructions within the module may refer to the frozen object. At run- time, the frozen object is loaded into memory along with much or all of the other portions of the module. However, there would be no need to newly allocate the frozen object at run- time.
  • a frozen object might actually include several type descriptors, a primary type descriptor that is canonical according to a set of canonicalization rules, and an auxiliary type descriptor that is not identical to the primary type descriptor.
  • the auxiliary type descriptor may be used to access the canonical type descriptor.
  • the auxiliary type descriptor can be used to perform the operation, then that auxiliary type descriptor is used to perform the operation.
  • the canonical primary type descriptor is to be used to perform the operation, the auxiliary type descriptor is used to gain access to the canonical primary type descriptor.
  • the primary type descriptor is then used to perform the operation.
  • Figure 1 illustrates a computing system that may implement one of more features described herein;
  • Figure 2 illustrates an architecture in which type descriptions may be used with frozen objects
  • Figure 3 illustrates a flowchart of a method for performing one or more type operations using multiple type descriptors corresponding to the frozen object
  • Figure 4 illustrates a flowchart of an example method of using the auxiliary type descriptor to access the canonical type descriptor
  • Figure 5 illustrates a flowchart of a method for preparing to use the indirection component to allow access to the canonical type descriptor.
  • FIG. 1 illustrates a computing system 100.
  • Computing systems are now increasingly taking a wide variety of forms.
  • Computing systems may, for example, be handheld devices, appliances, laptop computers, desktop computers, mainframes, distributed computing systems, or even devices that have not conventionally considered a computing system.
  • the term "computing system” is defined broadly as including any device or system (or combination thereof) that includes at least one processor, and a memory capable of having thereon computer-executable instructions that may be executed by the processor.
  • the memory may take any form and may depend on the nature and form of the computing system.
  • a computing system may be distributed over a network environment and may include multiple constituent computing systems.
  • a computing system 100 typically includes at least one processing unit 102 and memory 104.
  • the memory 104 may be physical system memory, which may be volatile, non- volatile, or some combination of the two.
  • the term “memory” may also be used herein to refer to non- volatile mass storage such as physical storage media. If the computing system is distributed, the processing, memory and/or storage capability may be distributed as well.
  • the term “module” or “component” can refer to software objects or routines that execute on the computing system. The different components, modules, engines, and services described herein may be implemented as objects or processes that execute on the computing system (e.g., as separate threads).
  • Computing system 100 may also contain communication channels 108 that allow the computing system 100 to communicate with other message processors over, for example, network 110.
  • Communication channels 108 are examples of communications media.
  • Communications media typically embody computer- readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and include any information-delivery media.
  • communications media include wired media, such as wired networks and direct- wired connections, and wireless media such as acoustic, radio, infrared, and other wireless media.
  • the term computer-readable media as used herein includes both storage media and communications media.
  • Embodiments within the scope of the present invention also include computer-readable media for carrying or having computer-executable instructions or data structures stored thereon.
  • Such computer-readable media can be any available media that can be accessed by a general purpose or special purpose computer.
  • Such computer-readable media can comprise physical storage and/or memory media such as RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store desired program code means in the form of computer-executable instructions or data structures and which can be accessed by a general purpose or special purpose computer.
  • Computer-executable instructions comprise, for example, instructions and data which cause a general purpose computer, special purpose computer, or special purpose processing device to perform a certain function or group of functions.
  • Figure 2 illustrates an architecture 200 in which type descriptions may be efficiently used with frozen objects.
  • a "frozen object” is an object that is allocated at compile-time, and thus exists as an object in the compiled executable file.
  • the frozen object is loaded into memory along with potentially other portions or perhaps all of the other components of the image file.
  • the principles described herein are not limited to the use of frozen objects that are not modified once loaded into memory.
  • some embodiments herein reduce or eliminate the need to write to the in-memory representations of the frozen objects. This is advantageous since writing to memory can cause the portions (called pages) of the memory that have been written to be made "private.” That is, the process that wrote to that page forces a private copy of the page to be created.
  • the architecture 200 includes a defining module 210 and a referring module 220.
  • the “modules” may be executable images loaded into memory.
  • the modules 210 and 220 may be loaded into the memory (the volatile portion of memory 104) from storage (the non- volatile portion of the memory 104).
  • the defining module 210 is termed "defining" since it contains a primary type descriptor 211 that corresponds to and defines a particular type.
  • the primary type descriptor 211 defines the particular type in a manner that satisfies a set of canonicalization rules. There may be canonicalized type descriptors for other types as well. However, to avoid undue complication of Figure 2, the type descriptors for only one type are illustrated.
  • the referring module 220 is termed "referring" since it contains a frozen object 222 that is of the type defined by the primary type descriptor. The referring module 220 thus in a sense indirectly refers to the primary type descriptor in the primary module 210.
  • the referring module 222 includes an auxiliary type descriptor 221 corresponding to and defining the same particular type that is defined by the primary type descriptor 211.
  • the referring module 222 also includes sufficient information to provide an association 223 between the frozen object 222 and the auxiliary type descriptor 221.
  • the auxiliary type descriptor 211 is not identical to the canonical primary type descriptor 221.
  • the auxiliary type descriptor 221 may not be a canonical type descriptor in the sense that it might not follow every canonical rule in the set of canonical rules followed by the primary type descriptor 211.
  • the auxiliary type descriptor 221 might essentially be a cloned copy of the primary type descriptor 211, except with perhaps sufficient information to distinguish the primary and auxiliary type descriptors from each other.
  • the auxiliary type descriptor 221 includes sufficient information such that at least one type operation may be performed with the auxiliary type descriptor 221 , rather than having to refer to the canonical primary type descriptor 211.
  • the association 223 between the frozen object 222 and the auxiliary type descriptor 221 may be, for example, a type description pointer in the frozen object itself.
  • the frozen object may also begin with a type description pointer.
  • the frozen object 222 points to the auxiliary type descriptor 221.
  • the primary type descriptor 211 were included in the module 220 instead, the frozen object 221 might instead directly point to the primary type descriptor 211.
  • the referring module 220 there might not be sufficient information to having the frozen object point directly to a primary type descriptor in a different module.
  • the architecture 200 also includes an indirection component 230 through which the auxiliary type descriptor 221 is associated with the primary type descriptor 211.
  • the indirection component 230 is an import address table and may even be part of the referring module 220 itself. One cell of the import address table may be used as a point of indirection between the primary type descriptor 211 and the auxiliary type descriptor 221. Although only one type is illustrated in Figure 2, the indirection component may be used for multiple types.
  • the indirection component 230 is used to associate the two type descriptors as follows. First, potentially at compile-time, the auxiliary type descriptor includes some indication that the type descriptor is auxiliary, and not primary.
  • auxiliary type descriptor 221 is modified to include a pointer to the corresponding portion of the indirection component 230 as represented by arrow 231.
  • the appropriate portion of the indirection component 230 is then modified to include a pointer (represented by arrow 232) to the corresponding primary type descriptor 211.
  • the auxiliary type descriptor 221 may be used to access the primary type descriptor 211.
  • the auxiliary type descriptor in the same module as the frozen object may be used to perform a type operation on the frozen object, only one level of indirection is used to access the auxiliary type descriptor.
  • the indirection component may be written to perhaps only once, without rendering as private those pages written to. Even if a write operation does render private the portion of the indirection component written to, the indirection component 230 may be clustered into a fewer number of pages. Accordingly, fewer pages might be made private as compared to a situation in which a similar number of writes were to be made to the more spread out type description pointers in the module 220 itself.
  • the environment 200 also includes an operations management component 240 that performs type operations.
  • the operations management component determines whether the auxiliary type descriptor is sufficient to perform the type operation, or whether the primary type descriptor is needed to perform the type operation.
  • Figure 3 illustrates a flowchart of a method 300 for performing one or more type operations using multiple type descriptors corresponding to the frozen object. For example, if the frozen object was the frozen object 222 of Figure 2, the multiple type descriptions would include the primary type descriptor 211 and the auxiliary type descriptor 221.
  • the operations management component 240 may simply be an application, operating system or portions thereof.
  • the component 240 determines whether the auxiliary type descriptor will be sufficient to perform the operation (decision block 301). For one of more type operations, it may be determined that the auxiliary type descriptor will be sufficient to perform the operation (Yes in decision block 301). In that case, the operation is performed using the auxiliary type descriptor (act 302). In some cases, the type operation may require that there only be one level of indirection between the frozen object and the type description. The pointer from the frozen object to the auxiliary type descriptor represents that one level of indirection in that case. Thus, these operations may be performed without undue added complexity to access the primary type descriptor through additional indirection.
  • Examples of type operations that might be performed using just the auxiliary type descriptor and that might expect just one level of indirection between the object and the type descriptor include a virtual-call operation or an interface- call operation.
  • type comparisons between two objects may in some cases be made by comparing the type descriptor pointers in each object. If the pointers match, then regardless of whether they both point to a primary type descriptor, or an auxiliary type descriptor, they refer to the same type.
  • a significant percentage of all of the type operations that are performed may be satisfied by using just the auxiliary type descriptor. Accordingly, these operations may be performed quite efficiently without having to even find the primary type descriptor.
  • auxiliary type descriptor For one or more other operations, it may be determined that the auxiliary type descriptor will not be sufficient to perform the operation (No in decision block 301). In that case, the auxiliary type descriptor is used to access the canonical primary type descriptor (act 303). Then, the primary type descriptor may be used to perform the operation (act 304). As an example of a type operation that might require access to the primary type descriptor, suppose a type comparison operation is once again being performed between two objects.
  • FIG. 4 illustrates a flowchart of an example method 400 of using the auxiliary type descriptor to access the canonical type descriptor. There are other methods that may be employed to access the primary type descriptor from the auxiliary type descriptor.
  • the pointer within the auxiliary type descriptor is accessed (act 401). That pointer points directly or indirectly to the primary type descriptor. For instance, in the case of Figure 2, the pointer of the auxiliary type descriptor points (as represented by arrow 231) to the appropriate cell in the indirection component. The pointer that is in the cell of the indirection component (see arrow 232) is then used to access the primary canonical type descriptor (act 402). [0034]
  • type descriptors can be effectively used even if multiple type descriptors correspond to a single object, and even if the primary type descriptor for a particular object resides outside of the module in which the frozen object is allocated.
  • write operations may be more consolidated at run-time, thereby minimizing, and potentially eliminating privatization of pages due to such write operations.
  • Figure 5 illustrates a flowchart of a method 500 for preparing to use the indirection component to allow access to the canonical type descriptor.
  • This method 500 may be performed at load-time in preparation for execution. Prior to performing the method, at compile time, the pointer from the frozen object to the auxiliary type descriptor, and the pointer from the auxiliary type descriptor to the indirection component may have already been set. However, to complete the indirection path to primary type descriptor, a pointer is set from the indirection component to the primary type descriptor. [0036] To do this, the type that corresponds to the appropriate cell of the indirection component is determined (act 501).
  • this type corresponds to a primary type descriptor (act 502).
  • the indirection component is then modified to include the pointer to the canonical type descriptor (act 503).
  • part of the indirection path is created during compile-time, and the final portion of the indirection path is created at run-time.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Stored Programmes (AREA)

Abstract

The efficient use of type descriptors with frozen objects. A frozen object might actually include several type descriptors, a primary type descriptor that is canonical according to a set of canonicalization rules, and an auxiliary type descriptor that is not identical to the primary type descriptor. The auxiliary type descriptor may be used to access the canonical type descriptor. When performing an operation, if the auxiliary type descriptor can be used to perform the operation, then that auxiliary type descriptor may be used. If the canonical type descriptor is to be used to perform the operation, the auxiliary type descriptor is used to gain access to the canonical primary type descriptor. The primary type descriptor is then used to perform the operation.

Description

TYPE DESCRIPTOR MANAGEMENT FOR FROZEN OBJECTS
BACKGROUND
[0001] The most fundamental building block of object-oriented programming is called an "object." Generally speaking, an object has zero or more methods and zero or more member fields. Accordingly, in order to be properly interpreted by a computing system, the object should be of a particular type understood by the computing system. Primitive types include types that are provided by the programming language itself as basic building blocks for the programmer. Examples of primitive types might include a character, a string, an integer, a floating point number, an array, and so forth. Programming languages typically allow programmers to construct composite types that represent a combination of constituent types, whether those constituent types are primitive types or other composite types. Such composite types can be quite complex. [0002] It is often advantageous to know the type of a particular object. Accordingly, in memory during execution time, an object often has an associated type descriptor. In one example, the object has a type description pointer that points to a more complete type descriptor. The type descriptor might be used for a variety of purposes. For one, the type descriptor for an object may be evaluated in order to verify that a particular operation may be performed by the object, or to determine that the object is of the same or equivalent type as another object.
[0003] One particular kind of object is called a "frozen object." A frozen object instance is one whose layout is completed at compile time and is included as part of the compiled image. Objects that are not subject to extensive or perhaps any change during run- time are perhaps the best candidates for object freezing, but any object instance with pre-initialized data may be frozen. For instance, a calendar program might provide a daily inspirational quote selected from amongst 1000 predetermined quotes. Each of those 1000 predetermined quote may be represented in a frozen object of type string. Instructions within the module may refer to the frozen object. At run- time, the frozen object is loaded into memory along with much or all of the other portions of the module. However, there would be no need to newly allocate the frozen object at run- time.
BRIEF SUMMARY
[0004] Embodiments described herein related to the efficient use of type descriptors with frozen objects. In one embodiment, a frozen object might actually include several type descriptors, a primary type descriptor that is canonical according to a set of canonicalization rules, and an auxiliary type descriptor that is not identical to the primary type descriptor. The auxiliary type descriptor may be used to access the canonical type descriptor. When performing an operation, if the auxiliary type descriptor can be used to perform the operation, then that auxiliary type descriptor is used to perform the operation. If the canonical primary type descriptor is to be used to perform the operation, the auxiliary type descriptor is used to gain access to the canonical primary type descriptor. The primary type descriptor is then used to perform the operation. [0005] This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
BRIEF DESCRIPTION OF THE DRAWINGS
[0006] In order to describe the manner in which the above-recited and other advantages and features can be obtained, a more particular description of various embodiments will be rendered by reference to the appended drawings.
Understanding that these drawings depict only sample embodiments and are not therefore to be considered to be limiting of the scope of the invention, the embodiments will be described and explained with additional specificity and detail through the use of the accompanying drawings in which:
[0007] Figure 1 illustrates a computing system that may implement one of more features described herein;
[0008] Figure 2 illustrates an architecture in which type descriptions may be used with frozen objects; [0009] Figure 3 illustrates a flowchart of a method for performing one or more type operations using multiple type descriptors corresponding to the frozen object; [0010] Figure 4 illustrates a flowchart of an example method of using the auxiliary type descriptor to access the canonical type descriptor; and [0011] Figure 5 illustrates a flowchart of a method for preparing to use the indirection component to allow access to the canonical type descriptor. DETAILED DESCRIPTION
[0012] In accordance with embodiments described herein, the principles described herein allow for the efficient use of type descriptors with frozen objects. First, various embodiments of a computing system in which the principles described herein may be employed. Then, various embodiments of the use of type descriptors used with frozen objects will be described with respect to Figures 2 through 5.
[0013] Figure 1 illustrates a computing system 100. Computing systems are now increasingly taking a wide variety of forms. Computing systems may, for example, be handheld devices, appliances, laptop computers, desktop computers, mainframes, distributed computing systems, or even devices that have not conventionally considered a computing system. In this description and in the claims, the term "computing system" is defined broadly as including any device or system (or combination thereof) that includes at least one processor, and a memory capable of having thereon computer-executable instructions that may be executed by the processor. The memory may take any form and may depend on the nature and form of the computing system. A computing system may be distributed over a network environment and may include multiple constituent computing systems. [0014] As illustrated in Figure 1, in its most basic configuration, a computing system 100 typically includes at least one processing unit 102 and memory 104. The memory 104 may be physical system memory, which may be volatile, non- volatile, or some combination of the two. The term "memory" may also be used herein to refer to non- volatile mass storage such as physical storage media. If the computing system is distributed, the processing, memory and/or storage capability may be distributed as well. As used herein, the term "module" or "component" can refer to software objects or routines that execute on the computing system. The different components, modules, engines, and services described herein may be implemented as objects or processes that execute on the computing system (e.g., as separate threads).
[0015] In the description that follows, embodiments are described with reference to acts that are performed by one or more computing systems. If such acts are implemented in software, one or more processors of the associated computing system that performs the act direct the operation of the computing system in response to having executed computer-executable instructions. An example of such an operation involves the manipulation of data. The computer-executable instructions (and the manipulated data) may be stored in the memory 104 of the computing system 100.
[0016] Computing system 100 may also contain communication channels 108 that allow the computing system 100 to communicate with other message processors over, for example, network 110. Communication channels 108 are examples of communications media. Communications media typically embody computer- readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and include any information-delivery media. By way of example, and not limitation, communications media include wired media, such as wired networks and direct- wired connections, and wireless media such as acoustic, radio, infrared, and other wireless media. The term computer-readable media as used herein includes both storage media and communications media.
[0017] Embodiments within the scope of the present invention also include computer-readable media for carrying or having computer-executable instructions or data structures stored thereon. Such computer-readable media can be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise physical storage and/or memory media such as RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store desired program code means in the form of computer-executable instructions or data structures and which can be accessed by a general purpose or special purpose computer. When information is transferred or provided over a network or another communications connection (either hardwired, wireless, or a combination of hardwired or wireless) to a computer, the computer properly views the connection as a computer-readable medium. Thus, any such connection is properly termed a computer-readable medium. Combinations of the above should also be included within the scope of computer-readable media.
[0018] Computer-executable instructions comprise, for example, instructions and data which cause a general purpose computer, special purpose computer, or special purpose processing device to perform a certain function or group of functions. Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described herein. Rather, the specific features and acts described herein are disclosed as example forms of implementing the claims. [0019] Figure 2 illustrates an architecture 200 in which type descriptions may be efficiently used with frozen objects. As previously mentioned, a "frozen object" is an object that is allocated at compile-time, and thus exists as an object in the compiled executable file. Accordingly, at load-time in preparation for execution, the frozen object is loaded into memory along with potentially other portions or perhaps all of the other components of the image file. Often, it might be static data that may be represented in a frozen object. That said, the principles described herein are not limited to the use of frozen objects that are not modified once loaded into memory. However, some embodiments herein reduce or eliminate the need to write to the in-memory representations of the frozen objects. This is advantageous since writing to memory can cause the portions (called pages) of the memory that have been written to be made "private." That is, the process that wrote to that page forces a private copy of the page to be created.
[0020] The architecture 200 includes a defining module 210 and a referring module 220. In this description, the "modules" may be executable images loaded into memory. For instance, referring to Figures 1 and 2, the modules 210 and 220 may be loaded into the memory (the volatile portion of memory 104) from storage (the non- volatile portion of the memory 104).
[0021] The defining module 210 is termed "defining" since it contains a primary type descriptor 211 that corresponds to and defines a particular type. In one embodiment, the primary type descriptor 211 defines the particular type in a manner that satisfies a set of canonicalization rules. There may be canonicalized type descriptors for other types as well. However, to avoid undue complication of Figure 2, the type descriptors for only one type are illustrated. [0022] The referring module 220 is termed "referring" since it contains a frozen object 222 that is of the type defined by the primary type descriptor. The referring module 220 thus in a sense indirectly refers to the primary type descriptor in the primary module 210. In particular, the referring module 222 includes an auxiliary type descriptor 221 corresponding to and defining the same particular type that is defined by the primary type descriptor 211. The referring module 222 also includes sufficient information to provide an association 223 between the frozen object 222 and the auxiliary type descriptor 221.
[0023] The auxiliary type descriptor 211 is not identical to the canonical primary type descriptor 221. For instance, the auxiliary type descriptor 221 may not be a canonical type descriptor in the sense that it might not follow every canonical rule in the set of canonical rules followed by the primary type descriptor 211. In one embodiment, however, the auxiliary type descriptor 221 might essentially be a cloned copy of the primary type descriptor 211, except with perhaps sufficient information to distinguish the primary and auxiliary type descriptors from each other. In another embodiment, the auxiliary type descriptor 221 includes sufficient information such that at least one type operation may be performed with the auxiliary type descriptor 221 , rather than having to refer to the canonical primary type descriptor 211.
[0024] The association 223 between the frozen object 222 and the auxiliary type descriptor 221 may be, for example, a type description pointer in the frozen object itself. For instance, in an embodiment in which the object begins with a type description pointer, the frozen object may also begin with a type description pointer. However, instead of pointing to the primary type descriptor, the frozen object 222 points to the auxiliary type descriptor 221. If the primary type descriptor 211 were included in the module 220 instead, the frozen object 221 might instead directly point to the primary type descriptor 211. However, at the time the referring module 220 was compiled, there might not be sufficient information to having the frozen object point directly to a primary type descriptor in a different module.
[0025] The architecture 200 also includes an indirection component 230 through which the auxiliary type descriptor 221 is associated with the primary type descriptor 211. In one embodiment, the indirection component 230 is an import address table and may even be part of the referring module 220 itself. One cell of the import address table may be used as a point of indirection between the primary type descriptor 211 and the auxiliary type descriptor 221. Although only one type is illustrated in Figure 2, the indirection component may be used for multiple types. [0026] In one embodiment, the indirection component 230 is used to associate the two type descriptors as follows. First, potentially at compile-time, the auxiliary type descriptor includes some indication that the type descriptor is auxiliary, and not primary. This means that one of the fields of the auxiliary type descriptor 221 is modified to include a pointer to the corresponding portion of the indirection component 230 as represented by arrow 231. At run-time, the appropriate portion of the indirection component 230 is then modified to include a pointer (represented by arrow 232) to the corresponding primary type descriptor 211. Thus, using the pointers in the auxiliary type description 221 and the indirection component 230, the auxiliary type descriptor 221 may be used to access the primary type descriptor 211. In addition, to the extent that the auxiliary type descriptor in the same module as the frozen object may be used to perform a type operation on the frozen object, only one level of indirection is used to access the auxiliary type descriptor. [0027] In one embodiment, the indirection component may be written to perhaps only once, without rendering as private those pages written to. Even if a write operation does render private the portion of the indirection component written to, the indirection component 230 may be clustered into a fewer number of pages. Accordingly, fewer pages might be made private as compared to a situation in which a similar number of writes were to be made to the more spread out type description pointers in the module 220 itself.
[0028] The environment 200 also includes an operations management component 240 that performs type operations. In so doing, the operations management component determines whether the auxiliary type descriptor is sufficient to perform the type operation, or whether the primary type descriptor is needed to perform the type operation. As an example, Figure 3 illustrates a flowchart of a method 300 for performing one or more type operations using multiple type descriptors corresponding to the frozen object. For example, if the frozen object was the frozen object 222 of Figure 2, the multiple type descriptions would include the primary type descriptor 211 and the auxiliary type descriptor 221. In one embodiment, the operations management component 240 may simply be an application, operating system or portions thereof. [0029] First, for each operation, the component 240 determines whether the auxiliary type descriptor will be sufficient to perform the operation (decision block 301). For one of more type operations, it may be determined that the auxiliary type descriptor will be sufficient to perform the operation (Yes in decision block 301). In that case, the operation is performed using the auxiliary type descriptor (act 302). In some cases, the type operation may require that there only be one level of indirection between the frozen object and the type description. The pointer from the frozen object to the auxiliary type descriptor represents that one level of indirection in that case. Thus, these operations may be performed without undue added complexity to access the primary type descriptor through additional indirection.
[0030] Examples of type operations that might be performed using just the auxiliary type descriptor and that might expect just one level of indirection between the object and the type descriptor include a virtual-call operation or an interface- call operation. In addition, type comparisons between two objects may in some cases be made by comparing the type descriptor pointers in each object. If the pointers match, then regardless of whether they both point to a primary type descriptor, or an auxiliary type descriptor, they refer to the same type. In one embodiment, a significant percentage of all of the type operations that are performed may be satisfied by using just the auxiliary type descriptor. Accordingly, these operations may be performed quite efficiently without having to even find the primary type descriptor.
[0031] For one or more other operations, it may be determined that the auxiliary type descriptor will not be sufficient to perform the operation (No in decision block 301). In that case, the auxiliary type descriptor is used to access the canonical primary type descriptor (act 303). Then, the primary type descriptor may be used to perform the operation (act 304). As an example of a type operation that might require access to the primary type descriptor, suppose a type comparison operation is once again being performed between two objects. However, in this case, if the type descriptor pointers do not match, and it is determined that at least one of the objects points to an auxiliary type descriptor, then the primary type descriptor corresponding to any auxiliary type descriptors is accessed, and the primary type descriptors are used to verify a type match. In one embodiment, the percentage of type operations that is needed to access the primary type descriptor may be relatively small compared to the percentage of type operations that can complete using just the auxiliary type descriptor. [0032] Figure 4 illustrates a flowchart of an example method 400 of using the auxiliary type descriptor to access the canonical type descriptor. There are other methods that may be employed to access the primary type descriptor from the auxiliary type descriptor. However, the method 400 is suitable as an example. [0033] The pointer within the auxiliary type descriptor is accessed (act 401). That pointer points directly or indirectly to the primary type descriptor. For instance, in the case of Figure 2, the pointer of the auxiliary type descriptor points (as represented by arrow 231) to the appropriate cell in the indirection component. The pointer that is in the cell of the indirection component (see arrow 232) is then used to access the primary canonical type descriptor (act 402). [0034] Thus, type descriptors can be effectively used even if multiple type descriptors correspond to a single object, and even if the primary type descriptor for a particular object resides outside of the module in which the frozen object is allocated. Furthermore, by consolidating write operations to an indirection component, write operations may be more consolidated at run-time, thereby minimizing, and potentially eliminating privatization of pages due to such write operations.
[0035] Figure 5 illustrates a flowchart of a method 500 for preparing to use the indirection component to allow access to the canonical type descriptor. This method 500 may be performed at load-time in preparation for execution. Prior to performing the method, at compile time, the pointer from the frozen object to the auxiliary type descriptor, and the pointer from the auxiliary type descriptor to the indirection component may have already been set. However, to complete the indirection path to primary type descriptor, a pointer is set from the indirection component to the primary type descriptor. [0036] To do this, the type that corresponds to the appropriate cell of the indirection component is determined (act 501). It is then determined that this type corresponds to a primary type descriptor (act 502). In response to this matching operation, the indirection component is then modified to include the pointer to the canonical type descriptor (act 503). Thus, in this embodiment, part of the indirection path is created during compile-time, and the final portion of the indirection path is created at run-time. This permits flexibility at deployment in the locations of the primary type descriptors with respect to the frozen objects in other executable modules. Thus, as long as there is a primary type descriptor somewhere in a collection of executable modules, a frozen object anywhere in the collection may properly refer, even if indirectly, to the primary type descriptor. [0037] The present invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is, therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.

Claims

CLAIMSWhat is claimed is:
1. A computer program product comprising one or more computer- readable media (104) having thereon an executable module (220), the executable module comprising: a frozen object (222) that is an instance of a type canonically described by a canonical type descriptor (211) that conforms to a set of canonicalization rules; an auxiliary type descriptor (221) that is not identical to the canonical type descriptor, but that also serves as a type descriptor for the frozen object, at least for some of operations that use type descriptors for the type; wherein the frozen object is directly or indirectly associated with the auxiliary type descriptor and the canonical type descriptor.
2. A computer program product in accordance with Claim 1, wherein the canonical type descriptor is not present within the executable module.
3. A computer program product in accordance with Claim 2, wherein the canonical type descriptor is present on the computer program product.
4. A computer program product in accordance with Claim 1 , wherein the frozen object is associated with the auxiliary type descriptor by including a pointer that points to the auxiliary type descriptor.
5. A computer program product in accordance with Claim 1, wherein the indirection component is a component that may be written to at run-time to thereby cause the indirection component to point to the canonicalized type descriptor without causing the indirection component or a portion thereof to become private.
6. A computer program product in accordance with Claim 1 , wherein the indirection component is a component that may be written to once at run-time to thereby cause the indirection component to point to the canonicalized type descriptor without causing the indirection component or a portion thereof to become private.
7. A computer program product in accordance with Claim 1, wherein the indirection component is an import address table.
8. A method (300) for performing one or more type operations using a plurality of type descriptions (211, 221) corresponding to a frozen object (222), the plurality of type descriptions including a canonical type descriptor (211) that conforms to a set of canonicalization rules, the method comprising: for a first set of one of more operations, an act of determining (301) that an auxiliary type descriptor (221) will be sufficient to perform the operation, and an act of using the auxiliary type descriptor (302), and not the canonical type descriptor, to perform the operation; and for a second set of one or more operations, an act of determining (301) that the auxiliary type descriptor will not be sufficient to perform the operation, an act of using (303) the auxiliary type descriptor to access the canonical type descriptor; and an act of using (304) the canonical type descriptor to perform the operation.
9. A method in accordance with Claim 8, wherein the act of using the auxiliary type descriptor to access the canonical type descriptor comprises: an act of accessing a pointer within the auxiliary type descriptor, wherein the pointer points directly or indirectly to the canonical type descriptor.
10. A method in accordance with Claim 8, wherein the act of using the auxiliary type descriptor to access the canonical type descriptor comprises: an act of accessing a pointer within the auxiliary type descriptor, wherein the pointer points directly or indirectly to an indirection component that includes a pointer that points directly or indirectly to the canonical type descriptor; and an act of using the pointer that is in the indirection component to access the canonical type descriptor.
11. A method in accordance with Claim 10, further comprising an act of preparing to use the indirection component to allow access to the canonical type descriptor.
12. A method in accordance with Claim 11, wherein the act of preparing comprises: an act of determining a type that corresponds to the indirection component; an act of determining that the type corresponds to the canonical type descriptor; and an act of modifying the indirection component to include the pointer to the canonical type descriptor.
13. A method in accordance with Claim 8, wherein at least one of the second set of operations includes a comparison of a type of the frozen object to the type of another object.
14. A method in accordance with Claim 8, wherein at least one of the first set of operations requires that there only be one level of indirection between the frozen object and the type descriptor that is used to perform the operation.
15. A method in accordance with Claim 8, wherein at least one of the first set of operations is a virtual-call operation.
PCT/US2009/054299 2008-09-03 2009-08-19 Type descriptor management for frozen objects WO2010027665A2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
RU2011108110/08A RU2510073C2 (en) 2008-09-03 2009-08-19 Type descriptor management for frozen objects
CN2009801351924A CN102203757B (en) 2008-09-03 2009-08-19 Type descriptor management for frozen objects
EP09811950.6A EP2321734B1 (en) 2008-09-03 2009-08-19 Type descriptor management for frozen objects
BRPI0916699A BRPI0916699A2 (en) 2008-09-03 2009-08-19 type descriptor management for frozen objects

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US12/203,857 US8316357B2 (en) 2008-09-03 2008-09-03 Type descriptor management for frozen objects
US12/203,857 2008-09-03

Publications (3)

Publication Number Publication Date
WO2010027665A2 true WO2010027665A2 (en) 2010-03-11
WO2010027665A3 WO2010027665A3 (en) 2010-06-24
WO2010027665A8 WO2010027665A8 (en) 2011-07-07

Family

ID=41727204

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2009/054299 WO2010027665A2 (en) 2008-09-03 2009-08-19 Type descriptor management for frozen objects

Country Status (7)

Country Link
US (1) US8316357B2 (en)
EP (1) EP2321734B1 (en)
KR (1) KR20110099214A (en)
CN (1) CN102203757B (en)
BR (1) BRPI0916699A2 (en)
RU (1) RU2510073C2 (en)
WO (1) WO2010027665A2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8755610B2 (en) * 2011-06-10 2014-06-17 Apple Inc. Auto-recognition for noteworthy objects
US8863099B2 (en) * 2012-11-05 2014-10-14 International Business Machines Corporation Compilation and placement of instructions in a memory system
RU2541935C2 (en) 2012-12-25 2015-02-20 Закрытое акционерное общество "Лаборатория Касперского" System and method for deploying preconfigured software
RU2523113C1 (en) 2012-12-25 2014-07-20 Закрытое акционерное общество "Лаборатория Касперского" System and method for target installation of configured software
US8805972B1 (en) 2013-06-26 2014-08-12 Kaspersky Lab Zao Multi-platform operational objective configurator for computing devices
US20220212100A1 (en) * 2021-01-04 2022-07-07 Microsoft Technology Licensing, Llc Systems and methods for streaming interactive applications
US11954023B2 (en) 2022-07-20 2024-04-09 Microsoft Technology Licensing, Llc Garbage collection prefetching state machine

Family Cites Families (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0418638A (en) 1990-05-11 1992-01-22 Fujitsu Ltd Static memory allocation processing method
US5970496A (en) 1996-09-12 1999-10-19 Microsoft Corporation Method and system for storing information in a computer system memory using hierarchical data node relationships
US6061520A (en) 1998-04-07 2000-05-09 Sun Microsystems, Inc. Method and system for performing static initialization
US6868425B1 (en) * 1999-03-05 2005-03-15 Microsoft Corporation Versions and workspaces in an object repository
US6529921B1 (en) * 1999-06-29 2003-03-04 Microsoft Corporation Dynamic synchronization of tables
DE10026478A1 (en) * 2000-05-27 2001-12-20 Abb Patent Gmbh Generating method for application specific input files, involves preparing application specific files by canon-like transformation from generated object descriptions in XML representation
CA2329559A1 (en) * 2000-12-22 2002-06-22 Ibm Canada Limited-Ibm Canada Limitee Method and apparatus for generating serialization code for representing a model in different type systems
US20030046670A1 (en) * 2001-06-15 2003-03-06 Marlow Mark J. Binary object system for automated data translation
US7685261B1 (en) * 2001-06-29 2010-03-23 Symantec Operating Corporation Extensible architecture for the centralized discovery and management of heterogeneous SAN components
US6919891B2 (en) * 2001-10-18 2005-07-19 Microsoft Corporation Generic parameterization for a scene graph
US7036118B1 (en) * 2001-12-20 2006-04-25 Mindspeed Technologies, Inc. System for executing computer programs on a limited-memory computing machine
US20030140058A1 (en) * 2002-01-18 2003-07-24 Vitria Technology, Inc. Method and apparatus for sharing information between applications using common objects
US6826666B2 (en) * 2002-02-07 2004-11-30 Microsoft Corporation Method and system for transporting data content on a storage area network
US6954762B2 (en) * 2002-02-28 2005-10-11 Veritas Operating Corporation System and method for characterizing logical storage devices
US7010783B2 (en) 2002-03-18 2006-03-07 Sun Microsystems, Inc. Method and apparatus for deployment of high integrity software using reduced dynamic memory allocation
US7111279B2 (en) * 2002-10-30 2006-09-19 Hewlett-Packard Development Company, L.P. Intercepting calls to common dialog functions
US7353507B2 (en) 2002-10-30 2008-04-01 Hewlett-Packard Development, L.P. Intercepting function cells
US20050004873A1 (en) * 2003-02-03 2005-01-06 Robin Pou Distribution and rights management of digital content
US6952743B2 (en) * 2003-03-07 2005-10-04 Ivivity, Inc. Interface for distributed processing of SCSI tasks
GB0306610D0 (en) * 2003-03-21 2003-04-30 British Telecomm Conversion of structured information
US20050086642A1 (en) * 2003-10-15 2005-04-21 Martin Runte Tools providing for backwards compatible software
US7743382B2 (en) * 2003-11-03 2010-06-22 Ramal Acquisition Corp. System for deadlock condition detection and correction by allowing a queue limit of a number of data tokens on the queue to increase
US7124291B1 (en) 2003-12-22 2006-10-17 Sun Microsystems, Inc System and method for eliminating static initialization overhead by memory space cloning of a master runtime system process
US7805495B2 (en) * 2005-03-31 2010-09-28 Google Inc. Method and system for transferring web browser data between web browsers
US7992140B2 (en) * 2005-07-29 2011-08-02 Microsoft Corporation Compiler supporting programs as data objects
US7900213B2 (en) * 2005-10-04 2011-03-01 International Business Machines Corporation Generic markup specified object descriptor for a modularized computing application
US20080127129A1 (en) * 2006-08-30 2008-05-29 Microsoft Corporation Compiling logical programs to rewrite systems
US8015556B2 (en) * 2006-10-12 2011-09-06 International Business Machines Corporation Efficient method of data reshaping for multidimensional dynamic array objects in the presence of multiple object instantiations
US7809745B2 (en) * 2007-08-09 2010-10-05 Yahoo! Inc. Method for generating structured query results using lexical clustering
US8347277B2 (en) * 2007-08-17 2013-01-01 International Business Machines Corporation Verifying that binary object file has been generated from source files
US20090070753A1 (en) * 2007-09-07 2009-03-12 International Business Machines Corporation Increase the coverage of profiling feedback with data flow analysis
US8850057B2 (en) * 2007-09-20 2014-09-30 Intel Corporation Healthcare semantic interoperability platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See references of EP2321734A4 *

Also Published As

Publication number Publication date
KR20110099214A (en) 2011-09-07
BRPI0916699A2 (en) 2015-11-17
WO2010027665A8 (en) 2011-07-07
CN102203757B (en) 2013-07-31
WO2010027665A3 (en) 2010-06-24
EP2321734A4 (en) 2016-02-24
RU2510073C2 (en) 2014-03-20
EP2321734A2 (en) 2011-05-18
EP2321734B1 (en) 2021-05-26
US20100058304A1 (en) 2010-03-04
US8316357B2 (en) 2012-11-20
RU2011108110A (en) 2012-09-10
CN102203757A (en) 2011-09-28

Similar Documents

Publication Publication Date Title
US8176142B2 (en) Shared JAVA jar files
EP2321734B1 (en) Type descriptor management for frozen objects
US11249758B2 (en) Conditional branch frame barrier
US10853096B2 (en) Container-based language runtime loading an isolated method
US8839215B2 (en) String cache file for optimizing memory usage in a java virtual machine
US8650537B2 (en) Optimizing an object-oriented program by transforming invocations of synthetic accessor methods
EP0237637A2 (en) A method for the relocation of linked control blocks
US10733095B2 (en) Performing garbage collection on an object array using array chunk references
US8433697B2 (en) Flexible metadata composition
US11474832B2 (en) Intelligently determining a virtual machine configuration during runtime based on garbage collection characteristics
US10496433B2 (en) Modification of context saving functions
US11347487B2 (en) Confining reflective access based on module boundaries
US8745605B2 (en) Execution contexts with polymorphic type implementations
US11593113B2 (en) Widening memory access to an aligned address for unaligned memory operations
Chawdhary et al. Closing the performance gap between doubles and rationals for octagons
US20110107339A1 (en) Inner Process
EP4291988A1 (en) Tracking frame states of call stack frames including colorless roots

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980135192.4

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09811950

Country of ref document: EP

Kind code of ref document: A2

WWE Wipo information: entry into national phase

Ref document number: 2009811950

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2011108110

Country of ref document: RU

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20117007639

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: PI0916699

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20110126