CN1120867A - Method and apparatus for memory management - Google Patents

Method and apparatus for memory management Download PDF

Info

Publication number
CN1120867A
CN1120867A CN 94191425 CN94191425A CN1120867A CN 1120867 A CN1120867 A CN 1120867A CN 94191425 CN94191425 CN 94191425 CN 94191425 A CN94191425 A CN 94191425A CN 1120867 A CN1120867 A CN 1120867A
Authority
CN
China
Prior art keywords
module
data
memory block
storage
conventional memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 94191425
Other languages
Chinese (zh)
Other versions
CN1090780C (en
Inventor
格兰特·G·埃科尔斯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Micro Focus Software Inc
Original Assignee
Novell Inc
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 Novell Inc filed Critical Novell Inc
Publication of CN1120867A publication Critical patent/CN1120867A/en
Application granted granted Critical
Publication of CN1090780C publication Critical patent/CN1090780C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • 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/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0615Address space extension
    • G06F12/0623Address space extension for memory modules

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides an environment for DOS executable programs or 'modules' that are constructed so that they can cooperate with other similarly constructed programs in sharing memory used by portions of their code or data. This reduces the overall requirements of conventional memory (102). The modules include transient code and data (403), that may be swapped out of conventional memory, and global code and data (402) that is not swappable and stays resident in conventional memory. The present invention reduces conventional memory requirements by allowing modules to share a single block of conventional memory for transient code and data. Instead of swapping transient blocks of modules to and from disk storage (204), the transient blocks are swapped between conventional memory and extended (111) or expanded memory (406). This significantly reduces transfer time compared to overlay schemes, improving performance.

Description

The method and apparatus of storage administration
Technical field:
The field that the present invention relates generally to is a computer memory system, relates in particular to a kind of storage management system of controlling and optimizing the storer that uses a computer.
Background technology
Common computer system is made up of number of modules or element.Computer system comprises a central processing unit such as microprocessor (CPU).Microprocessor is a program control facility, energy acquisition, decipher and execution command.Computer system also comprises the memory element that is used for storage system operation software, application program instructions and data.These memory elements can be ROM (read-only memory) (ROM), random-access memory (ram), perhaps resemble mass storages such as disk or tape, perhaps any other suitable memory storage.
The operation of computer system is to be controlled by the instruction of a series of being referred to as " operating system ".Operating system is used for controlling the basic function such as computer systems such as I/O, and generally be stored in this nonvolatil memory element of ROM or can pack RAM into later on and the magnetic disk memory that in RAM, moves in.The example of operating system has MS-DOS or PC-DOS.Computer system is used for executive utility.
Handle in the operating process at some, when to some data execution command, CPU may also need temporarily to store these data.In addition, CPU must access control application program of handling and the operating system of controlling this program run.The RAM of a kind of being called " primary memory " just provides this information for CPU.
The memory element that is called primary memory is a kind of resource of deficiency, and it need dynamically distribute to user, data, program or processing procedure.The storage user who fights for this deficiency resource has application program, TSR (" interrupting resident " program) and other processing procedures.For example, application program comprises word processing program, electrical form, plotter program, database or the like.Some application program can be stored among the ROM.But generally application storage in such as jumbo memory devices such as disc drivers.On initialized basis, the application program that will carry out CPU is sent to RAM from mass storage.
Also use TSR program on the computer system.This program provides " hot key " and " pop-up type window ", and is used for carrying out background job, as show a clock in the corner of video display, perhaps monitors the active situation of disc driver etc.Write TSR for many other application programs, and the user usually wishes resident several TSR in their computing machine simultaneously.Because each TSR needs its storage space of depositing, so TSR added to the storage demand that also will increase in the system to primary memory.
Primary memory generally is such as storer at the bottom of the silicon of RAM.In other words, dynamic RAM (DRAM) can be used as primary memory.Primary memory RAM can be used as conventional memory block (conventional memory), extended area (extended memory) and extension storage district (expanded memory) visits.Conventional memory block
Conventional memory block is a CPU zone of easy visit among the RAM.Preferably store required data of CPU and instruction in the conventional memory block.But the size of conventional memory block is limited, and this can limit the memory space of data and instruction in the conventional memory block.
Early stage microcomputer has 16 bit address buses, and they provide the address space of 64K.Along with application program to the memory space growth of requirement, microcomputer must overcome the limitation of 16 bit address buses.Like this, the IBM personal computer has just been introduced a kind of segmentation addressing scheme (segmented addressing scheme) of supporting 20 bit address buses.20 bit address buses provide the address space of 1024K or 1M, and this space is 16 times of 16 buses.Originally to have limited conventional memory block artificially be 640K for She Ji IBM PC and system software.384K address space from 640K to 1M gives in the future and uses, and mainly leaves ROM for and uses.Because is later Computer Design one-tenth backward compatible with original I BM PC, and use identical PC-DOS, MS-DOS operation system, so on modern computer, the restriction of conventional memory block 640K continues retraining the memory space that application program can be used.The extended area
The extended area is the RAM greater than 1024 kilobyte, if microprocessor has the address wire of sufficient amount, and then can be directly to its addressing.For example, Intel 80286 microprocessors have 24 addressing capability, and can be to first 15M extended area addressing more than 1M memory block.Intel 80386 and 80486 microprocessors have 32 addressing capability, and can be to the extended area addressing of first about 4 GB more than 1M memory block.The extension storage district
The extension storage district is also referred to as " extension storage standard (expanded memory specifi-cation) " (EMS), and it keeps a part of extended area that can not directly visit as the extension storage district, and is divided into the page.The each address space that can directly visit to CPU changes to one page extension storage district, and EMS can visit endless memory block virtually like this.But the EMS conversion page will be taken time.If required data be not arranged in the EMS page of the memory block that can directly visit, EMS must access the current content in the page so, and calls in the page that comprises desired data from the extension storage district.Because this skipping needs the time, so can reduce computer processing speed.Have, EMS is general and be not suitable for all application software again.If feasible, be necessary for and utilize EMS specially to write application software.Storage map
Fig. 1 has described the storage map of primary memory RAM on the conventional computing machine, promptly be one based on microprocessor 8088/8086 family and the computing machine that under MS-DOS, moves, as IBM personal computer etc.The storage map of Fig. 1 is not unique possible storage map, but the typical storage map of an example.The bottom-up management of storage map, storage unit zero (101) is positioned at the bottom, continuously upwards until the highest unit in the storer of top.Storage map has three base regions.First district comprises minimum memory block 640K, is called conventional memory block 102.Although be not that all systems all comprise whole 640K, and can some storage spaces keep need not, conventional memory block 102 is made up of RAM fully, allows read operation and write operation.
Conventional memory block 102 is used for storage system software, application software, user data and other code and data, also has TSR and device driver.As shown in Figure 1, MS-DOS assigns to store itself code 106 and related data 107 with the lowest part of memory block.On this, MS-DOS stores application software, TSR and device driver, concentrates with unit 112 among the figure and represents.
More than the conventional memory block is 384K reserved storage area 103, in its memory address between 640K RAM circle and 1024K.Reserved storage area 103 is mainly occupied by ROM, is read-only device.ROM in the reserved storage area comprises the ROM of system, shows ROM, perhaps also has other ROM that uses such as peripherals such as hard disk drive or net terminating mouths.Except ROM, reserved storage area 103 also comprises the storer of other particular type, pastes impact damper (video frame buffer) etc. as video pictures.
System ROM supports the basic operation of computing machine, generally occupies in (for example) reserved storage area 103 the highest 64K from 960K to 1024K.In the reserved storage area 103 remaining space or need not, perhaps be used for other purpose, comprise the ROM that supports other peripherals or the EMS page.
As mentioned above, extended area 111 comprises all memory blocks that 1M is above.The microprocessor that has 24 bit addressing abilities such as 80286 grades can be to the addressing of 16M memory block, promptly also can comprise the extended area of 15M except the reserved storage area 103 of 1M and conventional memory block 102.Can be such as the microprocessors with 32 bit addressing abilities such as 80386 and 80486 to the addressing of 4G memory block, promptly except the reserved storage area 103 of 1M and conventional memory block 102, also can comprise the extended area of 4095M.The zone of extended area 111 just is positioned at more than the 1M, is sometimes referred to as higher memory district (high memory area) 113.
Along with TSR increase and application program becomes big, the space contention is more fierce in the conventional memory block.Be preferably in when keeping using TSR and provide more conventional memory block as application program.
Can perhaps, increase the adoptable conventional memory space of application program by the memory space that reduces the TSR use, the number that reduces TSR by TSR being repositioned in the memory block in addition, conventional memory block.
People do not wish to reduce the number of TSR, because this can reduce function or reduce performance.It is unpractiaca reducing the used conventional memory space of each TSR, because this need rewrite each TSR.
Because TSR has occupied some former conventional storage spaces that can be used by application software, so if these programs are moved to memory block beyond the conventional memory block 102, it is that application software is used that more storage space then can be arranged.A kind of art methods is arranged, and it is by moving to reserved storage area 103 to TSR from conventional memory block 102, increase the memory space of the conventional memory block 102 that can be the application program use.
In order to realize this purpose, must at first determine untapped memory space in the reserved storage area 103.Must determine that also TSR occupies the memory space of conventional memory block.Then, must be mapped to reserved storage area to abundant unappropriated RAM in the extended area, thereby provide storage space for TSR.Then, TSR is repositioned onto in the virtual storage of reserved storage area 103.
This kind art methods has shortcoming.At first, it can only use unappropriated reserved storage space.It can not use the reserved storage area of having distributed to ROM, video pictures frame buffer or having done other use.Also have, must guarantee that to relocating of TSR all point to its new unit again to quoting of they.
The another kind of art methods that relocates from conventional memory block is called " covering (over-lay) ".But covering is the program operating part memory block that changes on demand and swap out.The shortcoming that covers is that requirement uses the program that covers to be connected with an overlay management device, and this overlay management device is controlled function and data that access is arranged in areal coverage.
Fig. 2 A and 2B have described a routine covering scheme.At first referring to Fig. 2 A, RAM first 1024 byte, that CPU can do to visit represents with storage block 201.Storage block 201 comprises a conventional memory block 102.Conventional memory block 102 comprises zone 202 at lower place, address, is used for storage such as operating system codes such as DOS.The remainder 112 of conventional memory block 102 in the DOS district more than 202, reserved storage area is below 103, is used for application storing, TSR and device driver or the like.
Some application program is too big, can not be stored in fully in the conventional memory block 112.For example, the application program that Word Perfect comes to this, it is a word-processing application.Therefore, at any one constantly, only some Word Perfect is stored in the memory block 112.Remainder then is stored in such as magnetic disk memory 204 and waits in other storer.When needs certain applications program, they are sent to memory block 112 from magnetic disk memory 204.
In the example of Fig. 2 A, piece A203 represents a part of application program, and it is stored in the memory block 112.Piece B205 and piece C206 are other two parts that application program is divided into, and they are stored in the magnetic disk memory.Magnetic disk memory 204 is by a bus or other transmitting device 207 and RAM201 coupling.
When calling or use function among the piece A203, piece A203 resides in the memory block 112.When other functions of needs, must send the code that this function is provided to memory block 201 from magnetic disk memory 204.Referring now to Fig. 2 B,, piece B205 is sent to memory block 112 from magnetic disk memory 204.Thus, the APD piecemeal A203 that originally resided in the memory block 112 is sent to magnetic disk memory 204.The B205 of piece shown in the figure has occupied more memory block 112 than piece A203.All does not need equally size, but its storage space can not surpass spendable address space in the memory block 112.
The shortcoming that covers is, they will swap out from a disk file swap-in, this execution time and reduce performance of can extending.Some program needs some codes and data always to reside in the conventional memory block.And covering does not provide the method for resident conventional memory block code of any identification and data.When swap block A203 and piece B205, they are by whole transposing.Piece A203 can stay in the memory block 112 without any part.Therefore, this program can not be used the covering scheme.Some TSR can not be transformed into areal coverage.These TSR comprise the TSR that those provide inner DOS function.For example, the Netware DOS client software of producing by the Novell incorporated company of Utah (Utah) state Pu Luowo (Provo).
Therefore, prior art does not provide a kind of system, and this system can reduce conventional memory space that TSR uses but non-any sacrifice in performance.
Summary of the invention
The invention provides the executable program of DOS, these programs are so constructed, and promptly they can share the memory block of its partial code or data use to the Program Coordination of other similar structure.This has reduced the aggregate demand to conventional memory block.In the present invention, these programs are called as module, and they can be that application program, TSR or any other are transformed into the executable file of this module form.Module does not comprise the transient code and the data that can swap out from conventional memory block, and commutative and reside in global code and data in the conventional memory block.
By the global data that resides in memory block piece is provided, module of the present invention can be called other module and interrupt handling routine and other code or data outside or asynchronous use.Therefore, the present invention is than the more programmatic interface of soverlay technique support.
The present invention allows module to share the conventional memory block of monolithic, and this has just reduced the demand to conventional memory block.No matter how many modules has, and the size of giving the conventional storage block of their uses is the same.It is enough big that distributed store blocks is wanted, and is enough to store the transient code or the data of largest block in the module of sharing conventional storage block.
Not the module transient state piece magnetic disk memory that changes to and swap out, and the transient state piece in conventional memory block and expansion or the interval exchange of extension storage.This compares widely with the covering scheme and has reduced the delivery time, has improved performance.
Summary of drawings
Fig. 1 is a storage map, shows the storage administration of a conventional computer system.
Fig. 2 A and 2B show the covering scheme of a prior art.
Fig. 3 shows modular structure of the present invention.
Fig. 4 A-4E shows the operation of storage manager.
Fig. 5 is a process flow diagram, shows pre-initial (pre-init) operation of the present invention.
Fig. 6 is a process flow diagram, shows the initial (real-init) operation of reality of the present invention.
Fig. 7 is the process flow diagram of a calling module of the present invention.
Fig. 8 is the block scheme of realization computer system of the present invention.
Fig. 9 shows a VMCB data block.
Preferred forms of the present invention
A kind of method of the system convention memory block that more effectively uses a computer now will be described.In the following description, in order more fully to set forth the present invention, will describe in detail such as many concrete contents such as type of computer system, memory address unit, memory spaces.But,, obviously do not need these particular contents just can put into practice the present invention for those skilled in the art.In other cases, understand the present invention unnecessary difficulty is arranged, well-known characteristics no longer is described in detail in detail here in order not make.
The present invention provides a kind of method and apparatus of shared conventional storage space for TSR and other program, and it has reduced the demand to conventional memory block.TSR and all programs are constituted " module ", and the module management control module conventional memory block that changes to and swap out.In preferred embodiment of the present invention, the only resident at every turn module in conventional memory block.All the other module stores are in extended area or extension storage district, and this has been avoided waste of time, reduced the exchange with disk.
Fig. 4 A-4E shows the operation of module management.Fig. 4 A has described the storage map about conventional memory block, reserved storage area, extended area and extension storage district.Conventional memory block 102 comprises DOS memory block 202 in lower memory block, is the space of specializing in the usefulness of module management 401 above the DOS district 202 in conventional memory block 102.At module management is a zone more than 401, and the system of specializing in uses the global code of module and the usefulness of data.Being stored in global code and data field more than 402 is the zone of usefulness of specializing in the transient state piece of module.Transient state piece module 403 has a upper bound 404, and this upper bound is to remain unchanged in system and determined by the maximum transient state piece of any module in the system.In conventional memory block 102, and following space of reserved storage area more than 404, the upper bound is used by other application program and processing procedure.
Reserved storage area 103 is used for ROM and extension storage district 406.At reserved storage area is extended area 111 (more than 1024 kilobyte) more than 103.Extended storage 111 is being stored the transient state piece 405 of modules A.Extension storage district 406 comprises module B and C transient state piece 407 and 408 separately.
After depositing in global code and data in the global area 402 and defining the upper bound 404 of transient state piece 403, module management just can be visited them when calling module.Referring to Fig. 4 B, need to consider the situation of module B.Module B may comprise the code that resides in the global area 402.When calling module B, module management is transferred to the transient state piece 407 of module B the transient state piece 403 of conventional memory block 102 from extension storage district 406.At this moment, any transient state piece of other module conventional memory block that all swapped out.Then, the process of calling module B just addressable it, just look like that module B resides in the conventional memory block always.Shown in Fig. 4 B, the transient state piece 407 of module B does not use all spendable address spaces in the transient state piece 403.But the upper bound 404 of transient state piece 403 keeps motionless.
Fig. 4 C-4E has described the process of another module of module invokes.Shown in Fig. 4 C, the transient state piece 408 of module C resides in the transient state piece 403 of conventional memory block 102.Module C is by module management calling module A.Module management is followed the tracks of calling module and purpose module.The transient state piece 408 of module C and 405 exchanges of the transient state piece of modules A.Referring to Fig. 4 D, the transient state piece 405 of modules A is stored in the transient state piece 403 now.Notice that the transient state piece 405 of modules A has occupied all address spaces of transient state piece 403.After modules A was carried out its invoked function, shown in Fig. 4 E, module management was again transient state piece 408 exchanges of the transient state piece 405 of modules A with module C.Modular structure
In the present invention, the code of module is constituted different kinds with data, thereby the way of module in the conventional memory block of general management is provided.These classes comprise a function dispatch list (transfer table), transient code and data, global code and data, and start-up code and data.Fig. 3 shows the form of module.
The structure of module 301 comprises 302,303 and 304 3 zones.Zone 302 comprises a transfer table 305 and a transient state group (transient group) 306.Zone 303 comprises global code and data, and zone 304 comprises start-up code and data.Transient state district 302 comprises " tradable " code and data.That is to say that these data can change to and swap out between conventional memory block and enhancing memory block (expanding or expansion).Transfer table
The function that transfer table 305 representation modules are supported.Whenever all can swap out transfer table (being also referred to as transient code).Therefore interrupt handling routine (or any code segment that can directly visit) can not be present in the transient code section.In the transfer table first inlet (first entry) is the pointer of module initial program.Transfer table is made up of the pointer of four predefine functions at least, and wherein the predefine function is that all modules are shared, and they are initial (init), dump, version (version) and statistical function.
Initially: function of initializing is an initialize routine in the module, that this initialize routine is carried out is pre-initial (pre-init), be that initial module obtains necessary parameter, and carrying out reality subsequently, initial (real-init) really packs module into suitable section.The hook vector carries out in this reality initial procedure.
Dump: the dump function helps the release of resource.If what return after the inspection (CX=FFFh) to DumpSec is a critical section state, then dump request meeting failure.If module work is good, the failure that then has no reason, so a null value is returned in the inspection of DumpSec, this expression real-turn storage is safe.The request of real-turn storage can not be failed.If the dump inspection of a module has been failed, notify all previous module dump cancellations of checking so.(being CX=FFFEh).
Version: the main version and the minor release of version function acquisition module.This function provides the versatility of intermodule.Other subfunction of this version function is also set up versatility at intermodule.All the other subfunctions (01h=0Bh) also help the each other relevant communication that connects foundation, disconnection etc. of module (multicast multi-casting).
For example, when stopping, first task have a multicast to call (_ Notify handling procedure subfunction 01h, PSP stops).This subfunction is the part of the predetermined function of tonic chord.
Statistics: statistical function obtains the statistics to module.This function is optional.Statistics is used for modular debugging.Statistical framework is the preferential impact damper of a length, and first word table of statistical framework table is shown with the byte number of imitating statistical information.Other all statistical information need be recorded between statistics size (stat size) and the statistics end field (stat end field).
Can be for module provide other specific function, they are followed after these predefined functions.Termination zero (DDO) is followed after the public function and all other functions of module definition in transfer table.This allows module management know how many functions are module support, thereby avoids exceeding the request of this number.Transient data
Be similar to transient code, transient data has special requirement.The data of some type can not be present in the transient state group.These restricted types comprise storehouse and forward the data of another module to.For the reason of aspect of performance, all non-global datas should be arranged in the transient data section.Transient data exchanges between enhancing memory block and conventional memory block.Global code and data
Those must reside in code and data in the conventional memory block global area 303 storage.For example, the code and the data that can be stored in the global area 303 comprise the interrupt handling routine that uses global code, without calling processor far away (far callhandler), the storehouse of module management access, and forward the data that other module is gone to.Can create the module of a no memory in global area.The promoter region
The promoter region comprises setup code.Code provides pre-initial and real initial operation.At pre-baseline, each module provides the data block of a VMCB structure to a module management.Module utilizes initial program to pass through the required initial storage amount of this VMCB structure report (comprising the overall situation and transient state memory paragraph).Particularly, the VMCB_InitImageParaLength parameter-definition preloaded total size.
Module management determines have how many memory spaces to change to and to swap out at initially real and run duration with VMCB_InitImageParaLength.The method of this determination module storage allocation has been avoided obscuring, and has simplified and make memory paragraph keep independently process.When moving global data section and protected mode data segment simultaneously, it independently is useful keeping memory paragraph.If module depends on other module of packing into, can check the dependence of module so in the pre-starting stage.Puppet is initially marked (AX=-1) import this process into.
At real baseline, require module that global code/data are removed from the unit of its storage.When module management calls Elementary Function when reality is initial, defined the destination of this group in the BX register.After this process, module must be carried out the necessary arrangement of any transfer global group.Carry out these and arrange group to guarantee that position that data refer is new rather than DOS pack into.Module management:
What manage each module and multiplex adapter (multiplexor) is module management.Application program proposes all call request to module management, and module management is guided request into its appropriate purpose ground, no matter the destination is another module (children) or multiplex adapter.Module management also guarantees answer is turned back to their suitable calling program places.
Each module is called other module by module management.Both made a module call the multiplex adapter of its certain layer, it also proposes call request to module management, calls specific multiplex adapter by module management then.Similarly, call when a particular module returns when a certain, this calls from multiplex adapter and returns specific modules through module management.
A task of module management is that all the other intersegmental API Calls of assurance are undertaken by correct line.Therefore, module management must know whether a certain given required module of user application of having packed into.Call the module of other module through supervision.Module management is also handled the module and the function of asynchronous call.
Module management can make API numeral number calling function and module.Module management also learns by calling program module identifier (ID) who is calling that function.Module identifier (ID) is alloted in advance.Because module management is handled all API on the basis of numbering, the individual feature in module management and the module does not have inherent dependence or connects each other.Thereby the module of non-request type (Requester model) part can be module as the TSR storage manager.Here it is gives the ability of the various TSR of support of module management.
The basic service that module management provides all modules all to need, especially those permissions and help all and adorned the service that intermodule calls.Therefore, module management has the request type of all levels.
Module management is not only packed into and each module of dump (comprising multiplex adapter), and it also is all resume module stores service (distributing and management).Module management is taked memory transactions for its module.
Whether the given module of module management decision uses the storage class of extension storage district, extended area, conventional memory block or any support, but does not influence module itself.Therefore, can from these relevant memory blocks, discharge single children's module.
Children's module still must meet some demand that storage is used.In case so, they just can obtain all and handle the benefit of memory mechanism by module management for it.
Module management also is responsible for load time-provisioning API.Any module is all configurable.For example, the connection table is wanted the connection of some, and perhaps IPX wants to support many ECB, or bigger or less impact damper.In these examples, module management is that module is worked.
In addition, in order to optimize performance, a user may want a module is contained in the memory block that does not exchange, and no matter the storage class of using.Ideal situation is to be managed the variation of best configuration by module management.API of module outfit for this ability of needs.
Because module management can not be learnt all possible configuration exchange, so requester (Requester) comprises an API, module can be stipulated the option that itself disposes in this API, comprises the token (token) of discerning these options.This be one by tabledriven API, can when starting module, call, so that from NETCFG file analysis configuration information.
When module management loaded, it read the module that it will be packed into from a certain file in current or other particular category.Module management is by the order of files specify those modules of packing into.
During loading module, acquiescence is used current directory.If you want that from a different catalogue load module, you can come assigned catalogue with this module=order in configuration file so.Such as: VLM=C: NWCLIENT CONNVLM
You can also be the configuration file prescribed path on module command is capable.Such as: VLM C=C: NWCLIENT NETCFG
Have one group the acquiescence module by hard coded to module management, they provide basic function.But available NETCFG covers default option.The calling module management
For nation's module management calling processor far away finds the address, application program is carried out interruption 2Fh with the 7A20h and the BX=0h of AX register.Module management returns an address among the ES:BX, and it is the pointer of call address far away (module management).With the AX zero clearing, allow application program know that module management has been handled and call.With the numbering calling system
Module management uses the numbering calling system of module in a kind of unique recognition system.Function is also called by numbering.This protocol requirement application program provides three essential informations to module management, comprises CALLER_ID, DEST_ID and DEST_FUNC.The size of these three numberings is all identical with WORD.
CALLER_ID and DEST_ID are the numberings of unique identification particular module.Module management changes to suitable module with these numberings and suitably calls.
DEST_FUNC represents which function calling program wants to carry out.The purpose function is defined within the individual module.These functions are by 305 definition of module converts table section.
These three required unit co-operation are in each funcall of native system management.When a certain application program proposed a module invokes, module management must obtain call address far away.It is how to retrieve call address far away that following code has exemplified application program.data?segmentvlmCallAddress dword 0data?endscodesegment。。。
mov ax,7A20h
mov bx,0
int 2Fh
or ax,ax
jnz NO_VLM
mov word?Ptr?vlmCalLAddress,bx
mov word?ptr?vlmCallAddress+2,ES
。NO_VLM:
。code?ends
Following code has exemplified non-module application program utilization call address far away to carry out _ VLMNotify request, thus return the version of module management module.mov ax,0push ax ;CALLER_IDmov ax,VLM_ID_VLM ;(01h)push ax ;DEST_IDmov ax,VLM_NOTIFY ;(01h)push ax ;DEST_FUNCmov bx,0 ;GET?VERSION?SUB-FUNCcall VLMCallAddress
Put it briefly, calling program is at first pushed to storehouse with its oneself identifier (ID).(the CALLER_ID non-zero of module, and application program is with zero) then, calling program pushes the identifier of wanting the purpose identifier, the especially multiplex adapter that call or the identifier of specific children's module.At last, calling program pushes the function numbering of hope.
(perhaps only system) function that two reservations are arranged: function zero-sum function two is respectively applied for initialization and dump.Function one and three also is that various modules are used from start to finish.One and three are respectively applied for the General Notifications function that has many subfunctions and module statistics.
When returning, module management is removed CALLER_ID, DEST_ID and DEST_FUNC from storehouse, so application program needn't be done like this.This is commonly referred to Pascal and calls rule.
Module management uses AX and two registers of BP.BP uses for module management is inner.The unavailable BP of application program carries out any parameter request.BP can be used to three required values are pushed to storehouse.Application program can only be come return code with AX.
Module management also provides a kind of method of handling asynchronous call.Calling function provides a pointer for a storage block, and this storage block comprises purpose identifier, purpose function, caller identification, also has any register that calls required foundation.So, can ask, and certain time is afterwards carried out this request.When module management was determined to carry out required code, module management can be postponed run time version.The calling program of function can be regained control before finishing in that function is actual.Module management is initial in advance
Fig. 5 shows the process flow diagram of the pre-initial operation of the present invention.In step 501, module management carries out self configuration (NET.CFG and VLM=file).Configuration can comprise a new or attached module table.Then, in step 502, the module management module on the current table of at every turn packing into.Step 503 covers API (load overlay API) load module with packing into.Step 504 when sign is provided with, is called Elementary Function " pseudo-initial ".In step 505, the module of packing into provides a VMCB data block for module management.In step 506, the storage demand of module management read module, i.e. initialization storage demand, any overall storage demand, and transient state storage demand.
In step 507, the parameter that module management is used module deposits a module parameter table in.Parameter comprises initialization storage demand, overall storage demand (if there is), transient state storage demand, and the function number of module.
Module management enters decision block 508.At decision block 508, " being last module? " proposed problem.Be vacation if this is assigned a topic, then indicate to obtain more module stores information, and module management return step 505.If the proposition of decision block 508 is true, then expression has obtained the storage demand of all modules, and module management enters step 509.
In step 509, module management is collected data from the module parameter table, to determine the required memory block of global data.Then, module management is distributed to the global data storage to the address space in the conventional memory block.
In step 510, module management is discerned the maximum transient state storage demand of module to be installed.The size definition of maximum transient state piece the size of transient state piece 403 in the conventional memory block.In step 510, module management is that the transient state storage block of a certain size is distributed at least the same big RAM of largest block with module to be installed.
In step 511, module management determines which address space to store the transient state piece of each module with.Preferential order is at first for the extended area, is extended memory then, is conventional memory block after again.The user is configured module management, with the memory block of a certain type of special use.Module management determines in step 512 whether a certain memory block type can be used.If certain storage class can not be used, then module management is selected the storage class sound out previously.
Fig. 9 shows a routine VMCB data block.Module management is real initial
Behind pre-initial program, load module under the situation that pseudo-initial mark is not set again, thus carry out real initial program.Fig. 6 has shown the operation of real initial program.In step 601, module management is made as zero with pseudo-initial mark.In step 602, first module of packing into.In step 603, call initialize routine.In step 604, hang up any interrupt vector that is used for this module.In step 605, other resource of distribution module.In step 606, global code and data are moved to the addresses distributed space.In step 607, the transient state piece of module is copied in the address space of distributing to this module transient state piece (in expansion, expansion or conventional memory block).Formulate piece 608, proposing the proposition of " whether at last module ".If proposition is for true, then real initial procedure finishes in step 609, and module management is ended and resided at this.If the proposition at decision block 608 places is false, then system returns step 602.The dress module
Fig. 7 shows the process flow diagram of dress module.In step 701, module management receives that one calls, to visit a module.At decision block 702, " serving other request? " proposed proposition.If proposition is for true, then module management is in the current identifier of step 703 storage, thereby calls when withdrawing from when end, can carry out new calling.
If the proposition at decision block 702 places is false, then system enters decision block 704, and " the DEST identifier is effective? " proposed proposition.If proposition is for true, then module management enters decision block 705.If proposition is for false, then module management returns one and makes mistakes.At decision block 705, " function is effective? " proposed proposition.If proposition is for true, then system enters decision block 706.If proposition makes mistakes for vacation then module management return.
At decision block 706, " caller identification=0? " is proposed proposition.If proposition then replace caller identification with current module identifier, and system enters step 707 for true.If proposition is for false, then system enters step 707.
In step 707, be currently located at any module in the transient state piece copy to into its in strengthening the memory block in the addresses distributed space.Therefore in " local (home) " address space (the distribution address space of this module), upgrade any to the code of this module or the change of data.In step 708, the addresses distributed spatial mappings transient state piece of module that is called from strengthen the memory block.In step 709, be stored in being numbered in the transfer table in the transient state memory block by conditioning function with reference to having now.In step 710, calling function.When returning, check caller identification in 711.If necessary, the calling module map to the transient state piece.In step 712, calling function or invoked procedure are returned in control.
When an application call one functions of modules, last example just can be used.When the global storage of a module is being called in a transient state memory function, and when the transient state piece of another module of module invokes in the transient state memory block, also can use the present invention.In the overall situation was called transient state, operational process was identical with application call process among Fig. 7.Overall situation requestor's caller identification is zero.When transient state is called transient state, suitable caller identification is pushed, thereby when map was returned calling program and return control, the request transient code was in fact in storer.Otherwise, may have some other processes and be returned storer by map, this can cause unsettled environment to computer system.
The present invention can move on any computer system.Fig. 8 shows typical implementation computer system of the present invention.Computer system comprises a CPU801, RAM (primary memory) 802, ROM (ROM (read-only memory)) 803, and the I/O (I/O) 804 that all is coupled with system bus 807.I/O piece 804 waits other system by bus 805 visits such as mass storage 806.
CPU801 control computer, execution command and deal with data CPU801 are by system bus 807 and remaining components communicate.CPU receives the input data by system bus 807 from remaining parts of computing machine, and sends output data by system bus to the computing machine remaining part.System bus 807 generally includes an address bus, a data bus and other various control lines.The width of address and data bus is the same with type with the number of control line all to be changed to some extent from a kind of computer system to another kind of computer system.
Each parts of computer system (comprising RAM802, ROM803 and storage mapping I/O804) comprise many single memories unit.In order to allow CPU801 to visit these unit, distribute a specific address for each unit.Each address is can be by the particular combinations of the binary value of address bus transmission.Because the unit of most memory devices is more than one, so usually the address assignment of all unit of single memory is become a continuous piece.Also often distribute address (being mapped into storer) for these pieces in the mode that links to each other.
But may there be gap, unappropriated address or gives over to the address that utilizes in the future.
The computer system of Fig. 8 is just as an example.The present invention can carry out on any computer system.
Therefore, a kind of method and apparatus that is used for storage administration has been described.

Claims (1)

1. the method that the application program in a computer system first memory address scope is relocated is characterized in that, comprises the following steps:
Discern the first of described application program, this part need be arranged in the described first memory address scope as an overall piece;
Distribute the address space in the described first memory address scope, to store described overall piece;
Discern the second portion of described application program, this part need not to be arranged in the described first memory address scope as a transient state piece;
Distribute in the second memory address scope but not the address space in the described first memory address scope, to store described transient state piece;
Distribute the address space in the described first memory address scope, with the described transient state piece of temporary transient storage.
CN94191425A 1993-03-09 1994-03-08 Method and apparatus for memory management Expired - Lifetime CN1090780C (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US2831293A 1993-03-09 1993-03-09
US08/028,312 1993-03-09

Publications (2)

Publication Number Publication Date
CN1120867A true CN1120867A (en) 1996-04-17
CN1090780C CN1090780C (en) 2002-09-11

Family

ID=21842743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN94191425A Expired - Lifetime CN1090780C (en) 1993-03-09 1994-03-08 Method and apparatus for memory management

Country Status (6)

Country Link
EP (1) EP0688449A4 (en)
JP (1) JPH08507630A (en)
CN (1) CN1090780C (en)
AU (1) AU6253794A (en)
CA (1) CA2157572C (en)
WO (1) WO1994020905A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1607508B (en) * 2003-10-16 2010-05-26 国际商业机器公司 System and method of adaptively reconfiguring buffers
CN101086717B (en) * 2006-06-05 2010-06-02 国际商业机器公司 System and method for storing transient state information

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4943910A (en) * 1987-04-14 1990-07-24 Kabushiki Kaisha Toshiba Memory system compatible with a conventional expanded memory
US4926322A (en) * 1987-08-03 1990-05-15 Compag Computer Corporation Software emulation of bank-switched memory using a virtual DOS monitor and paged memory management
US5280599A (en) * 1989-01-09 1994-01-18 Kabushiki Kaisha Toshiba Computer system with memory expansion function and expansion memory setting method
US5175830A (en) * 1989-06-16 1992-12-29 International Business Machines Corporation Method for executing overlays in an expanded memory data processing system
US5167030A (en) * 1989-08-23 1992-11-24 Helix Software Company, Inc. System for dynamically allocating main memory to facilitate swapping of terminate and stay resident communication program to increase available memory space
US5146580A (en) * 1989-10-25 1992-09-08 Microsoft Corporation Method and system for using expanded memory for operating system buffers and application buffers
US5237669A (en) * 1991-07-15 1993-08-17 Quarterdeck Office Systems, Inc. Memory management method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1607508B (en) * 2003-10-16 2010-05-26 国际商业机器公司 System and method of adaptively reconfiguring buffers
CN101086717B (en) * 2006-06-05 2010-06-02 国际商业机器公司 System and method for storing transient state information

Also Published As

Publication number Publication date
CA2157572A1 (en) 1994-09-15
EP0688449A4 (en) 1997-08-27
WO1994020905A1 (en) 1994-09-15
EP0688449A1 (en) 1995-12-27
CA2157572C (en) 1998-12-01
JPH08507630A (en) 1996-08-13
CN1090780C (en) 2002-09-11
AU6253794A (en) 1994-09-26

Similar Documents

Publication Publication Date Title
RU2571366C2 (en) Virtual non-uniform memory access architecture for virtual machines
EP1674987B1 (en) Systems and methods for exposing processor topology for virtual machines
US20060253682A1 (en) Managing computer memory in a computing environment with dynamic logical partitioning
CN1008484B (en) Processor i/o and interrupt filters
US20080162834A1 (en) Task Queue Management of Virtual Devices Using a Plurality of Processors
US6925546B2 (en) Memory pool configuration system
CN101065740A (en) USB On-The-Go controller
JP4562107B2 (en) Direct memory access engine to support multiple virtual direct memory access channels
JPS62281039A (en) Dynamic provision of virtual memory source to control program
CN101135982A (en) Method and device for managing information transmission interruption resources
US20110219373A1 (en) Virtual machine management apparatus and virtualization method for virtualization-supporting terminal platform
JP2007249708A (en) Memory area allocation controller, memory area allocation control program and memory area allocation control method
US12001880B2 (en) Multi-core system and method of controlling operation of the same
US7447829B2 (en) Heap and stack layout for multithreaded processes in a processing system
US20070136549A1 (en) Information processing apparatus, controller and file reading method
KR100369280B1 (en) Apparatus and method for specifying maximum interactive performance in a logical partition of a computer system independently from the maximum interactive performance in other partitions
CN1782993A (en) Improved operating system performance
EP1164480A2 (en) Method, System and program product for a partitioned processing environment
CN1090780C (en) Method and apparatus for memory management
CN1920731A (en) System and method for implementing operation system separation
US8060680B2 (en) Method of allocating memory
JP6951962B2 (en) How to handle the OpenCL kernel and the computing equipment that carries it out
KR20000016944A (en) Increasing i/o performance through storage of packetized operational information in local memory
CN1270253C (en) Large-scale integrated circuit comprising central processing unit
CN103631648A (en) Task processing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CX01 Expiry of patent term

Expiration termination date: 20140308

Granted publication date: 20020911