CN103389947A - Memory manager and management method for VxWorks-based photo-etching machine double workpiece table control system - Google Patents

Memory manager and management method for VxWorks-based photo-etching machine double workpiece table control system Download PDF

Info

Publication number
CN103389947A
CN103389947A CN2013103397615A CN201310339761A CN103389947A CN 103389947 A CN103389947 A CN 103389947A CN 2013103397615 A CN2013103397615 A CN 2013103397615A CN 201310339761 A CN201310339761 A CN 201310339761A CN 103389947 A CN103389947 A CN 103389947A
Authority
CN
China
Prior art keywords
memory
control system
block
workpiece
litho machine
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
CN2013103397615A
Other languages
Chinese (zh)
Other versions
CN103389947B (en
Inventor
陈兴林
刘川
史新妍
李慧璐
王伟峰
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.)
Harbin Institute of Technology
Original Assignee
Harbin Institute of Technology
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 Harbin Institute of Technology filed Critical Harbin Institute of Technology
Priority to CN201310339761.5A priority Critical patent/CN103389947B/en
Publication of CN103389947A publication Critical patent/CN103389947A/en
Application granted granted Critical
Publication of CN103389947B publication Critical patent/CN103389947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)

Abstract

The invention discloses a memory manager and a management method for a VxWorks-based photo-etching machine double workpiece table control system, belonging to the technical field of memory management of a photo-etching machine working table control system and aiming at solving the problem of influence on normal operation of the system due to production of a large number of fragments existing in the conventional memory management method for the VxWorks-based photo-etching machine double workpiece table control system. The memory manager comprises an initialization device for initializing memory of the photo-etching machine double workpiece table control system, a memory allocation device for allocating the memory of the photo-etching machine double workpiece table control system, and a memory release device for managing the memory of the photo-etching machine double workpiece table control system. The memory manager and the management method are used for managing the memory of the photo-etching machine double workpiece table control system.

Description

Memory manager and management method based on the litho machine double-workpiece-table control system of VxWorks
Technical field
The present invention relates to memory manager and management method based on the litho machine double-workpiece-table control system of VxWorks, belong to the memory management technology field of litho machine workstation control system.
Background technology
Vxworks operating system is a embedded real-time operating system, and its memory management is an important research topic, is also a difficult problem that will solve in practical implementation.Traditional EMS memory management process has matching method, buddy algorithm, primary distribution at first repeatedly to use algorithm etc.Wherein, first-fit arithmetic is to carry out managing internal memory by two chained lists, and internal memory is all with the length of chained list, to be directly proportional distribution or the time of reclaiming, and is temporal uncertain, limited the use of matching method in real-time system at first; Buddy algorithm can, because a fritter internal memory affects the merging of two internal memories, more fragment occurs, and the size of memory block must be 2 n, so the service efficiency of internal memory is also lower; Algorithm is repeatedly used in primary distribution,, although well solved the speed issue of distribution and the release of first-fit arithmetic and buddy algorithm, meets the requirement of real-time, and it can not split and merge adjacent memory block, therefore also can produce a large amount of fragments.Too much fragment in Installed System Memory, can affect the normal operation of system, particularly in embedded real time system, also can have influence on stability and the real-time of system.
Therefore, in the litho machine double-workpiece-table control system based on VxWorks, adopt above-mentioned EMS memory management process, caused the fragment in the control system too much, affect the normal operation of system, and make real-time and the poor stability of system.
Summary of the invention
The present invention is because meeting produces a large amount of fragments for the EMS memory management process that solves existing litho machine double-workpiece-table control system based on VxWorks, and affect the normally problem of operation of system, a kind of memory manager and management method of the double-workpiece-table of the litho machine based on VxWorks control system is provided.
The memory manager of the double-workpiece-table of the litho machine based on VxWorks control system of the present invention, it comprises:
The apparatus for initializing that is used for initialization litho machine double-workpiece-table control system internal memory;
Be used for the Memory Allocation device that litho machine double-workpiece-table control system internal memory is distributed;
Be used for the internal memory releasing means that litho machine double-workpiece-table control system internal memory is managed.
Described apparatus for initializing comprises:
The device that is used for all parameters of the movement locus of storage litho machine double-workpiece-table and control system;
Be used for litho machine double-workpiece-table control system internal memory is divided into the system function device of three memory fields, described three memory fields are system kernel memory field, adjustable memory field and heap memory district, and three memory fields are divided into respectively the memory block formation of differing in size; Described system kernel memory field comprises: be used for forbidding user's access system kernel memory field and the device that the system kernel memory field is protected;
Be used for setting up corresponding task according to the control system situation, adaptive control system internal memory, and the device of the corresponding control system region of memory of initialization; Perhaps the user, according to actual conditions, manually inputs corresponding parameter, carries out the device of internal memory initialization;
Two chained lists that are used for the order physical memory of connection control system internal memory;
Be used for coming by a bitmap device of first clear position of specified control Installed System Memory;
Be used for automatically adjusting the device of memory headroom task;
Be used for manually adjusting the device of memory headroom task;
Be used for according to current parameter initialization global variable MemPart, utilize interface function memInit () to complete the initialized interface function device of control system internal memory;
This interface function device comprises: the device of organizing memory block formation MEM_BLOCK and MEM_BLOCK_HEAD by data structure MEM_PART.
Described Memory Allocation device comprises:
Utilize interface function memMalloc (UNIT32size) to search the memory queue larger than size, and check whether this memory queue has the free memory piece, when the free memory piece is arranged, continue to check whether the free memory size can split, in the time splitting, the memory block that splits is inserted corresponding formation, in the time can not splitting, whole free memory piece is distributed; When there is no the free memory piece, continue downwards to search, find the memory queue that does not often use, finish final the distribution, then upgrade the interface function device of the variable in the memory queue head.
Described internal memory releasing means comprises:
Utilize interface function memFree (void*pBuf), the memory headroom that points to by pBuf deducts the header structure size sizeof (MEM_BLOCK) of fixed memory block, obtain pointing to the structured fingers of this fixed memory block, thereby directly find this memory block structure distributing on chained list within the time of Constant Grade; Then check on the order chained list whether a previous or rear fixed memory block reclaims with current wish that memory block piece number equates and idle, if so, just merging these two memory blocks is a large memory block, is suspended in corresponding memory block formation; If not, current wish is reclaimed the memory block structure and be inserted into the tail of the queue of correspondence memory piece formation, complete the interface function device that internal memory discharges.
Based on the EMS memory management process of the litho machine double-workpiece-table control system of VxWorks, it comprises:
The initialization step that is used for initialization litho machine double-workpiece-table control system internal memory;
Be used for the Memory Allocation step that litho machine double-workpiece-table control system internal memory is distributed;
Be used for the internal memory release steps that litho machine double-workpiece-table control system internal memory is managed.
Described initialization step comprises:
The step that is used for all parameters of the movement locus of storage litho machine double-workpiece-table and control system;
Be used for litho machine double-workpiece-table control system internal memory is divided into the system function step of three memory fields, described three memory fields are system kernel memory field, adjustable memory field and heap memory district, and three memory fields are divided into respectively the memory block formation of differing in size; Described system kernel memory field comprises: be used for forbidding user's access system kernel memory field and the step that the system kernel memory field is protected;
Be used for setting up corresponding task according to the control system situation, adaptive control system internal memory, and the step of the corresponding control system region of memory of initialization; Perhaps the user, according to actual conditions, manually inputs corresponding parameter, carries out the step of internal memory initialization;
Two chained lists that are used for the order physical memory of connection control system internal memory;
Be used for coming by a bitmap step of first clear position of specified control Installed System Memory;
Be used for automatically adjusting the step of memory headroom task;
Be used for manually adjusting the step of memory headroom task;
Be used for according to current parameter initialization global variable MemPart, utilize interface function memInit () to complete the initialized interface function step of control system internal memory;
This interface function step comprises: the step of organizing memory block formation MEM_BLOCK and MEM_BLOCK_HEAD by data structure MEM_PART.
Described Memory Allocation step comprises:
Utilize interface function memMalloc (UNIT32size) to search the memory queue larger than size, and check whether this memory queue has the free memory piece, when the free memory piece is arranged, continue to check whether the free memory size can split, in the time splitting, the memory block that splits is inserted corresponding formation, in the time can not splitting, whole free memory piece is distributed; When there is no the free memory piece, continue downwards to search, find the memory queue that does not often use, finish final the distribution, then upgrade the interface function step of the variable in the memory queue head.
Described internal memory release steps comprises:
Utilize interface function memFree (void*pBuf), the memory headroom that points to by pBuf deducts the header structure size sizeof (MEM_BLOCK) of fixed memory block, obtain pointing to the structured fingers of this fixed memory block, thereby directly find this memory block structure distributing on chained list within the time of Constant Grade; Then check on the order chained list whether a previous or rear fixed memory block reclaims with current wish that memory block piece number equates and idle, if so, just merging these two memory blocks is a large memory block, is suspended in corresponding memory block formation; If not, current wish is reclaimed the memory block structure and be inserted into the tail of the queue of correspondence memory piece formation, complete the interface function step that internal memory discharges.
Advantage of the present invention:
Memory manager of the present invention and EMS memory management process can be adjusted according to ruuning situation the memory management of litho machine double-workpiece-table control system, have the advantage of efficient administration.It makes the distribution of embedded system and release efficiency all reach Constant Grade, all larger minimizings of the inside and outside fragment of Installed System Memory.
Description of drawings
Fig. 1 is the process flow diagram that in the EMS memory management process of the double-workpiece-table of the litho machine based on VxWorks control system of the present invention, litho machine double-workpiece-table control system internal memory is distributed;
Fig. 2 is that the internal memory that in EMS memory management process of the present invention, litho machine double-workpiece-table control system internal memory is managed discharges process flow diagram.
Embodiment
Embodiment one: below in conjunction with Fig. 1 and Fig. 2, present embodiment is described, the memory manager of the described double-workpiece-table of litho machine based on VxWorks of present embodiment control system, it comprises:
The apparatus for initializing that is used for initialization litho machine double-workpiece-table control system internal memory;
Be used for the Memory Allocation device that litho machine double-workpiece-table control system internal memory is distributed;
Be used for the internal memory releasing means that litho machine double-workpiece-table control system internal memory is managed.
Present embodiment is identical with the implementation procedure of embodiment five, and its double-workpiece-table all refers to work stage and the mask platform of litho machine.
Embodiment two: present embodiment is described further embodiment one, and the described apparatus for initializing of present embodiment comprises:
The device that is used for all parameters of the movement locus of storage litho machine double-workpiece-table and control system;
Be used for litho machine double-workpiece-table control system internal memory is divided into the system function device of three memory fields, described three memory fields are system kernel memory field, adjustable memory field and heap memory district, and three memory fields are divided into respectively the memory block formation of differing in size; Described system kernel memory field comprises: be used for forbidding user's access system kernel memory field and the device that the system kernel memory field is protected;
Be used for setting up corresponding task according to the control system situation, adaptive control system internal memory, and the device of the corresponding control system region of memory of initialization; Perhaps the user, according to actual conditions, manually inputs corresponding parameter, carries out the device of internal memory initialization;
Two chained lists that are used for the order physical memory of connection control system internal memory;
Be used for coming by a bitmap device of first clear position of specified control Installed System Memory;
Be used for automatically adjusting the device of memory headroom task;
Be used for manually adjusting the device of memory headroom task;
Be used for according to current parameter initialization global variable MemPart, utilize interface function memInit () to complete the initialized interface function device of control system internal memory;
This interface function device comprises: the device of organizing memory block formation MEM_BLOCK and MEM_BLOCK_HEAD by data structure MEM_PART.
MemPart is data structure, and memInit () is the internal memory initialization function, and MEM_BLOCK is the memory block structure, and MEM_BLOCK_HEAD is the queue heads structure.
Present embodiment is identical with the implementation procedure of embodiment six, and wherein manually the corresponding parameter of input can be for the size of memory block formation and memory block formation etc.The memory block formation of differing in size is the MEM_BLOCK structure.
Described apparatus for initializing can be adjusted the memory headroom task automatically, and the priority ratio of this task is lower, just in system, adjusts dynamically internal memory in free time.When adjusting, the memory block that does not often use is split into the high memory block of frequency of utilization, it, likely by other task preemption, carries out from the tail end of respective queue while splitting large memory block in split process.
Apparatus for initializing can also manually be adjusted memory headroom, the application of an embedded system is mainly for some aspect, during an embedded system of exploitation, can allow system continuous working a period of time, draw system according to statistical value and use the rule of internal memory, then adjust internal memory according to the rule of system, previous stage, the operation of embedded system was a test, entered real application after the algorithm adjustment.
The same with first-fit arithmetic on the physical arrangement of apparatus for initializing have two chained lists: an idle chained list, used chained list for one, and the variation that different is on data structure, on logical organization, also have a chained list to connect all order physical memories; Used simultaneously the concept of the bitmap in the buddy algorithm, different is to only have a bitmap to specify the position of first free time; Simultaneously also with reference to primary distribution, repeatedly use the thought of algorithm, whole memory field is divided into many memory block formations of differing in size, i.e. MEM_BLOCK structure.MEM_BLOCK is as follows for the memory block structure.
Typedef?struct?block
{
UNIT8 men_type; Give during/* initialization different piece * of each piece/
UNIT8 free; / * whether idle */
UNIT16 block_size; / * memory block size */
Block * next; The next * of the idle chained list in/* family/
Block * pre; A upper * of the idle chained list of/*/
Block * orde_next; The next * of/* order chained list/
Block * order_pre; A upper * of/* order chained list/
}MEM_BLOCK;
This apparatus for initializing proposes:
(1) head node of the idle chained list of each equal-sized memory block formation, i.e. the head node of MEM_BLOCK_HEAD structure, the number of the memory block formation of its fixed size, the length of formation and size are all that the user is controlled;
(2) head node comprises the statistics territory, can adjust automatically when statistical value reaches some, namely increases or reduce the length of the memory queue of a certain fixed size;
(3) user also can, according to use or the test case of oneself, manually readjust the internal memory of memory field and arrange.
MEM_BLOCK_HEAD is as follows for the queue heads structure:
Typedef?struct?block_head
{
UNIT8 statistic; / * statistic */
UNIT8 left_num; In/* formation the free memory piece count */
UNIT16 block_size; / * memory block size */
MEM_BLOCK * pHead; / * sensing memory block formation */
}MEM_BLOCK_HEAD;
The method is organized two above-mentioned structures by data structure MEN_PART, thereby forms the internal memory layout of whole capable of regulating memory field, is below the data structure of MEN_PART.
Typedef?struct?part
{
UNIT8 malloc_times; The number of times * of/* use heap memory/
UNIT32 all_mallocsize; The total amount * of/* use heap memory/
MEM_BLOCK * pOrderList; * sensing order chained list */
MEM_BLOCK * pUsedList; The own use of/* sensing chained list */
UNIT16 which_free; The formation at the memory block place of which of/* free time remain in addition */
MEM_BLOCK_HEAD * * blockHead; / * points to the memory block that differs in size and counts *
UNIT8 blockHead_num; The memory queue that/* differs in size count */
}MEM_PART;。
At first the realization of memory manager or EMS memory management process uses the system function in VxWorks that memory headroom is divided into three memory fields, can forbid like this user's access system kernel memory field, plays the effect of memory protect.The heap memory district prevents that the application of huge memory block from setting up, and when the memory block in adjustable memory field, during all less than the space of request, will use malloc from the heap space application, can prevent the systemic breakdown that Memory Allocation is unsuccessfully brought like this.
According to the function of memory manager, the present invention defines respectively its interface function and realizes in detail.
(1) internal memory initialization interface:
memInit(
UNIT8 block_queue_num, the number * of/* memory block formation/
UNIT8 adjust_type, the type * of/* Memory adjustments/
UNIT8 block_num[], the corresponding number of queues * of/*/
Memory block number * in UNIT16 block_number/* formation/
)
The internal memory initialization interface comes the adjustable memory field of initialization according to the parameter of input.
This interface distributes fixed block by calling memPartAlloc (), fixing memory block of the common composition of the free memory piece of MEM_BLOCK structure and application, the actual size of each fixed memory block is internal memory and MEM_BLOCK structure sum: sizeof (the MEM_BLOCK)+block_size of actual allocated to the user.The purpose of doing like this is the memory block that can assign to according to the user, calculates rapidly the position of MEM_BLOCK, and then for the later stage internal memory, reclaims and lay the foundation fast.Whole adjustable EMS memory management process can change dynamically according to the parameter in this interface, has increased larger dirigibility.
In this interface, the adjust_type parameter is that the explanation user will select automatically adjust or will use manual adjustment.If selected dynamic adjustment, this function just discharges the task of task tadjust by name, as long as the available free time of system is just carried out dynamic adjustment automatically.Also can select manual adjustment.
The number of whole formation determined by parameter b lock_queur_num, and the user can set this parameter by the concrete demand of system, thereby need to determine what memory block formations that vary in size.
Parameter b lock_num[] in the number of memory block, i.e. parameter b lock_num in the corresponding corresponding formation of value explanation.Numerical value during initialization for the first time in this array is all identical, by user oneself, is set.System is after operation a period of time, and the user also can be by calling the memCheck interface and then adjusting the capable of regulating memory headroom.The main task of this interface is exactly to carry out initialization global variable MemPart according to current parameter, and namely the MEM_PART structure, complete the initialization of internal memory.Automatically adjust the task of memory headroom: antoAdjust ():
Self-adjusting task is in memInit, determine whether discharging according to parameter adjust_type, if parameter adjust_type be l discharge this task, otherwise do not discharge.This interface can not be called by the user but call in the memInit interface.The main policies of adjusting is: when system one has nothing to do, this task will be checked the statistic statistic in each memory block formation, and maximizing and minimum value, check that whether maximal value reaches a certain value is ultimate value, if the value of reaching the limit of start to adjust.Its corresponding memory queue of the large explanation of statistic uses frequent, memory queue corresponding to the value that statistic is little is opposite, at this moment task just is divided into the k piece to 1 memory block corresponding to the memory queue of statistical value minimum, or the k piece is merged into size be the memory block of statistical value maximum, then these pieces are mounted to the afterbody of chained list of correspondence.If the adjust_type value is 0, this task can not be released, because very strong basic just the having no time of application of some real-time allows system oneself safeguard internal memory.But the user can first be placed on the system that designs in actual application environment and test, allow the capable of regulating memory management module understand the Memory Allocation rule of this system, and then reinitialize nonresident portion in capable of regulating, and making its number of times of cutting apart, merging still less, real-time is stronger.
Manual Memory adjustments interface: memAdjust ():
Manually Memory adjustments can be according to the present case of whole memory block formation, as statistical value, rest block, large memory block is split as the situation of little memory block, little memory block forms the situation of large memory block, the access times of heap memory, the use amount of heap memory, the sendouts of a maximum heap memory etc., statistics draws system and uses the rule of internal memory.Then adjust internal memory according to these rules.This interface is to reinitialize array block_num[according to statistical value], namely by test, draw memory block number corresponding in the Memory Allocation rule of current system and each formation, and then re invocation memInit function reinitializes to Installed System Memory.
Embodiment three: describe below in conjunction with Fig. 1, present embodiment is described further embodiment two, and the described Memory Allocation device of present embodiment comprises:
Utilize interface function memMalloc (UNIT32size) to search the memory queue larger than size, and check whether this memory queue has the free memory piece, when the free memory piece is arranged, continue to check whether the free memory size can split, in the time splitting, the memory block that splits is inserted corresponding formation, in the time can not splitting, whole free memory piece is distributed; When there is no the free memory piece, continue downwards to search, find the memory queue that does not often use, finish final the distribution, then upgrade the interface function device of the variable in the memory queue head.
Present embodiment is identical with the implementation procedure of embodiment seven, need to repeat, the memory queue that does not wherein often use is the very little formation of the value of statistic, can realize searching by the statistic threshold value is set, during less than this threshold value, differentiate its memory queue for often not using when the value of statistic.When Memory Allocation finishes, upgrade the variable in queue heads.
The Memory Allocation device is according to distributing request size, reasonably storage allocation space.
Memory Allocation interface function memMalloc (UNIT32Size):
The memory headroom size of this interface assignment is Size byte.This interfaces process is as follows: at first search the memory queue larger than size, and check whether this formation has the free memory piece, if have, continue to check whether the free memory size can split, if it can split, the internal memory that splits is inserted corresponding formation,, if can not split, whole memory block is distributed.If there is no remaining memory block, continue downwards to search, find the memory queue that does not often use, i.e. the very little formation of the value of statistic, repeat above process, distributes the variable in rear renewal queue heads.The detailed process that this interface is carried out as shown in Figure 1.
Embodiment four: describe below in conjunction with Fig. 2, present embodiment is described further embodiment three, and the described internal memory releasing means of present embodiment comprises:
Utilize interface function memFree (void*pBuf), the memory headroom that points to by pBuf deducts the header structure size sizeof (MEM_BLOCK) of fixed memory block, obtain pointing to the structured fingers of this fixed memory block, thereby directly find this memory block structure distributing on chained list within the time of Constant Grade; Then check on the order chained list whether a previous or rear fixed memory block reclaims with current wish that memory block piece number equates and idle, if so, just merging these two memory blocks is a large memory block, is suspended in corresponding memory block formation; If not, current wish is reclaimed the memory block structure and be inserted into the tail of the queue of correspondence memory piece formation, complete the interface function device that internal memory discharges.
Present embodiment is identical with the implementation procedure of embodiment eight, the release of internal memory, the namely recovery of internal memory.While merging two memory blocks and be a large memory block, only keep a structured fingers.
The user can select memory headroom " automatically to adjust autoAdjust () " or " manually adjusting memAdjust () " as required.
Self-adjusting task is in memInit, and corresponding apparatus for initializing, determine whether discharging this task according to parameter adjust_type, if parameter adjust_type be l discharge this task, otherwise do not discharge.
Manually adjust if select, the memInit interface reinitializes array block_num[according to statistical value], namely by test, drawn the Memory Allocation rule of current system, the memory block number of correspondence in each formation, and then re invocation memInit function, corresponding apparatus for initializing, reinitialize Installed System Memory.
Whether present embodiment is used for reclaiming memory headroom, reclaims designated space at every turn and all will search for its front and rear node of physics chained list, according to the Determines of memory block, need to merge.
Internal memory realizing interface function memFree (void*pBuf):
The internal memory realizing interface mainly is responsible for the recovery of internal memory, makes it reclaim internal memory at Constant Grade in time as much as possible.Its detailed process as shown in Figure 2.
Embodiment five: below in conjunction with Fig. 1 and Fig. 2, present embodiment is described, the EMS memory management process of the described double-workpiece-table of litho machine based on VxWorks of present embodiment control system, it comprises:
The initialization step that is used for initialization litho machine double-workpiece-table control system internal memory;
Be used for the Memory Allocation step that litho machine double-workpiece-table control system internal memory is distributed;
Be used for the internal memory release steps that litho machine double-workpiece-table control system internal memory is managed.
Embodiment six: present embodiment is described further embodiment five, and the described initialization step of present embodiment comprises:
The step that is used for all parameters of the movement locus of storage litho machine double-workpiece-table and control system;
Be used for litho machine double-workpiece-table control system internal memory is divided into the system function step of three memory fields, described three memory fields are system kernel memory field, adjustable memory field and heap memory district, and three memory fields are divided into respectively the memory block formation of differing in size; Described system kernel memory field comprises: be used for forbidding user's access system kernel memory field and the step that the system kernel memory field is protected;
Be used for setting up corresponding task according to the control system situation, adaptive control system internal memory, and the step of the corresponding control system region of memory of initialization; Perhaps the user, according to actual conditions, manually inputs corresponding parameter, carries out the step of internal memory initialization;
Two chained lists that are used for the order physical memory of connection control system internal memory;
Be used for coming by a bitmap step of first clear position of specified control Installed System Memory;
Be used for automatically adjusting the step of memory headroom task;
Be used for manually adjusting the step of memory headroom task;
Be used for according to current parameter initialization global variable MemPart, utilize interface function memInit () to complete the initialized interface function step of control system internal memory;
This interface function step comprises: the step of organizing memory block formation MEM_BLOCK and MEM_BLOCK_HEAD by data structure MEM_PART.
Embodiment seven: describe below in conjunction with Fig. 1, present embodiment is described further embodiment six, and the described Memory Allocation step of present embodiment comprises:
Utilize interface function memMalloc (UNIT32size) to search the memory queue larger than size, and check whether this memory queue has the free memory piece, when the free memory piece is arranged, continue to check whether the free memory size can split, in the time splitting, the memory block that splits is inserted corresponding formation, in the time can not splitting, whole free memory piece is distributed; When there is no the free memory piece, continue downwards to search, find the memory queue that does not often use, finish final the distribution, then upgrade the interface function step of the variable in the memory queue head.
Embodiment eight: describe below in conjunction with Fig. 2, present embodiment is described further embodiment seven, and the described internal memory release steps of present embodiment comprises:
Utilize interface function memFree (void*pBuf), the memory headroom that points to by pBuf deducts the header structure size sizeof (MEM_BLOCK) of fixed memory block, obtain pointing to the structured fingers of this fixed memory block, thereby directly find this memory block structure distributing on chained list within the time of Constant Grade; Then check on the order chained list whether a previous or rear fixed memory block reclaims with current wish that memory block piece number equates and idle, if so, just merging these two memory blocks is a large memory block, is suspended in corresponding memory block formation; If not, current wish is reclaimed the memory block structure and be inserted into the tail of the queue of correspondence memory piece formation, complete the interface function step that internal memory discharges.
Dram distribution and release function are as shown in the table:
Table
Figure BDA00003628290500111
Figure BDA00003628290500121

Claims (8)

1. the memory manager of the double-workpiece-table of the litho machine based on a VxWorks control system, is characterized in that, it comprises:
The apparatus for initializing that is used for initialization litho machine double-workpiece-table control system internal memory;
Be used for the Memory Allocation device that litho machine double-workpiece-table control system internal memory is distributed;
Be used for the internal memory releasing means that litho machine double-workpiece-table control system internal memory is managed.
2. the memory manager of the double-workpiece-table of the litho machine based on VxWorks control system according to claim 1, is characterized in that,
Described apparatus for initializing comprises:
The device that is used for all parameters of the movement locus of storage litho machine double-workpiece-table and control system;
Be used for litho machine double-workpiece-table control system internal memory is divided into the system function device of three memory fields, described three memory fields are system kernel memory field, adjustable memory field and heap memory district, and three memory fields are divided into respectively the memory block formation of differing in size; Described system kernel memory field comprises: be used for forbidding user's access system kernel memory field and the device that the system kernel memory field is protected;
Be used for setting up corresponding task according to the control system situation, adaptive control system internal memory, and the device of the corresponding control system region of memory of initialization; Perhaps the user, according to actual conditions, manually inputs corresponding parameter, carries out the device of internal memory initialization;
Two chained lists that are used for the order physical memory of connection control system internal memory;
Be used for coming by a bitmap device of first clear position of specified control Installed System Memory;
Be used for automatically adjusting the device of memory headroom task;
Be used for manually adjusting the device of memory headroom task;
Be used for according to current parameter initialization global variable MemPart, utilize interface function memInit () to complete the initialized interface function device of control system internal memory;
This interface function device comprises: the device of organizing memory block formation MEM_BLOCK and MEM_BLOCK_HEAD by data structure MEM_PART.
3. the memory manager of the double-workpiece-table of the litho machine based on VxWorks control system according to claim 2, is characterized in that,
Described Memory Allocation device comprises:
Utilize interface function memMalloc (UNIT32size) to search the memory queue larger than size, and check whether this memory queue has the free memory piece, when the free memory piece is arranged, continue to check whether the free memory size can split, in the time splitting, the memory block that splits is inserted corresponding formation, in the time can not splitting, whole free memory piece is distributed; When there is no the free memory piece, continue downwards to search, find the memory queue that does not often use, finish final the distribution, then upgrade the interface function device of the variable in the memory queue head.
4. the memory manager of the double-workpiece-table of the litho machine based on VxWorks control system according to claim 3, is characterized in that,
Described internal memory releasing means comprises:
Utilize interface function memFree (void*pBuf), the memory headroom that points to by pBuf deducts the header structure size sizeof (MEM_BLOCK) of fixed memory block, obtain pointing to the structured fingers of this fixed memory block, thereby directly find this memory block structure distributing on chained list within the time of Constant Grade; Then check on the order chained list whether a previous or rear fixed memory block reclaims with current wish that memory block piece number equates and idle, if so, just merging these two memory blocks is a large memory block, is suspended in corresponding memory block formation; If not, current wish is reclaimed the memory block structure and be inserted into the tail of the queue of correspondence memory piece formation, complete the interface function device that internal memory discharges.
5. the EMS memory management process of the double-workpiece-table of the litho machine based on a VxWorks control system, is characterized in that, it comprises:
The initialization step that is used for initialization litho machine double-workpiece-table control system internal memory;
Be used for the Memory Allocation step that litho machine double-workpiece-table control system internal memory is distributed;
Be used for the internal memory release steps that litho machine double-workpiece-table control system internal memory is managed.
6. the EMS memory management process of the double-workpiece-table of the litho machine based on VxWorks control system according to claim 5, is characterized in that,
Described initialization step comprises:
The step that is used for all parameters of the movement locus of storage litho machine double-workpiece-table and control system;
Be used for litho machine double-workpiece-table control system internal memory is divided into the system function step of three memory fields, described three memory fields are system kernel memory field, adjustable memory field and heap memory district, and three memory fields are divided into respectively the memory block formation of differing in size; Described system kernel memory field comprises: be used for forbidding user's access system kernel memory field and the step that the system kernel memory field is protected;
Be used for setting up corresponding task according to the control system situation, adaptive control system internal memory, and the step of the corresponding control system region of memory of initialization; Perhaps the user, according to actual conditions, manually inputs corresponding parameter, carries out the step of internal memory initialization;
Two chained lists that are used for the order physical memory of connection control system internal memory;
Be used for coming by a bitmap step of first clear position of specified control Installed System Memory;
Be used for automatically adjusting the step of memory headroom task;
Be used for manually adjusting the step of memory headroom task;
Be used for according to current parameter initialization global variable MemPart, utilize interface function memInit () to complete the initialized interface function step of control system internal memory;
This interface function step comprises: the step of organizing memory block formation MEM_BLOCK and MEM_BLOCK_HEAD by data structure MEM_PART.
7. the EMS memory management process of the double-workpiece-table of the litho machine based on VxWorks control system according to claim 6, is characterized in that,
Described Memory Allocation step comprises:
Utilize interface function memMalloc (UNIT32size) to search the memory queue larger than size, and check whether this memory queue has the free memory piece, when the free memory piece is arranged, continue to check whether the free memory size can split, in the time splitting, the memory block that splits is inserted corresponding formation, in the time can not splitting, whole free memory piece is distributed; When there is no the free memory piece, continue downwards to search, find the memory queue that does not often use, finish final the distribution, then upgrade the interface function step of the variable in the memory queue head.
8. the EMS memory management process of the double-workpiece-table of the litho machine based on VxWorks control system according to claim 7, is characterized in that,
Described internal memory release steps comprises:
Utilize interface function memFree (void*pBuf), the memory headroom that points to by pBuf deducts the header structure size sizeof (MEM_BLOCK) of fixed memory block, obtain pointing to the structured fingers of this fixed memory block, thereby directly find this memory block structure distributing on chained list within the time of Constant Grade; Then check on the order chained list whether a previous or rear fixed memory block reclaims with current wish that memory block piece number equates and idle, if so, just merging these two memory blocks is a large memory block, is suspended in corresponding memory block formation; If not, current wish is reclaimed the memory block structure and be inserted into the tail of the queue of correspondence memory piece formation, complete the interface function step that internal memory discharges.
CN201310339761.5A 2013-08-06 2013-08-06 Based on memory manager and the management method of the litho machine double-workpiece-table control system of VxWorks Active CN103389947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310339761.5A CN103389947B (en) 2013-08-06 2013-08-06 Based on memory manager and the management method of the litho machine double-workpiece-table control system of VxWorks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310339761.5A CN103389947B (en) 2013-08-06 2013-08-06 Based on memory manager and the management method of the litho machine double-workpiece-table control system of VxWorks

Publications (2)

Publication Number Publication Date
CN103389947A true CN103389947A (en) 2013-11-13
CN103389947B CN103389947B (en) 2016-01-20

Family

ID=49534225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310339761.5A Active CN103389947B (en) 2013-08-06 2013-08-06 Based on memory manager and the management method of the litho machine double-workpiece-table control system of VxWorks

Country Status (1)

Country Link
CN (1) CN103389947B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104181901A (en) * 2014-09-04 2014-12-03 哈尔滨工业大学 Upper computer centralized management and multi-level control system based on VxWorks
CN108108307A (en) * 2016-11-24 2018-06-01 中移(杭州)信息技术有限公司 A kind of method for processing resource and terminal
CN108536609A (en) * 2017-03-02 2018-09-14 迈普通信技术股份有限公司 Memory fragmentation manages system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001356920A (en) * 2000-06-16 2001-12-26 Mitsubishi Electric Corp Memory allocation system
US20020099919A1 (en) * 2000-12-19 2002-07-25 Thales Method of memory management
CN1427342A (en) * 2001-12-21 2003-07-02 上海贝尔有限公司 Internal storage management system and its distribution method
US20050198460A1 (en) * 2001-02-13 2005-09-08 International Business Machines Corporation System and method for managing memory compression transparent to an operating system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001356920A (en) * 2000-06-16 2001-12-26 Mitsubishi Electric Corp Memory allocation system
US20020099919A1 (en) * 2000-12-19 2002-07-25 Thales Method of memory management
US20050198460A1 (en) * 2001-02-13 2005-09-08 International Business Machines Corporation System and method for managing memory compression transparent to an operating system
CN1427342A (en) * 2001-12-21 2003-07-02 上海贝尔有限公司 Internal storage management system and its distribution method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104181901A (en) * 2014-09-04 2014-12-03 哈尔滨工业大学 Upper computer centralized management and multi-level control system based on VxWorks
CN104181901B (en) * 2014-09-04 2016-07-06 哈尔滨工业大学 Multilevel control system is managed concentratedly based on VxWorks host computer
CN108108307A (en) * 2016-11-24 2018-06-01 中移(杭州)信息技术有限公司 A kind of method for processing resource and terminal
CN108536609A (en) * 2017-03-02 2018-09-14 迈普通信技术股份有限公司 Memory fragmentation manages system and method
CN108536609B (en) * 2017-03-02 2022-02-22 迈普通信技术股份有限公司 Memory fragment management system and method

Also Published As

Publication number Publication date
CN103389947B (en) 2016-01-20

Similar Documents

Publication Publication Date Title
Yan et al. Blogel: A block-centric framework for distributed computation on real-world graphs
US9396030B2 (en) Quota-based adaptive resource balancing in a scalable heap allocator for multithreaded applications
CN105389210A (en) Storage space management method and device
CN104731799B (en) Main memory DBM device
WO2022028033A1 (en) Hierarchical mapping-based automatic balancing storage method for ceph storage system
CN103365784B (en) The method of Memory recycle and distribution and device
CN105975398A (en) Method for memory fragmentation management
CN103914265A (en) Cluster fine-grained memory management method
CN104572501B (en) Access trace locality analysis-based shared buffer optimization method in multi-core environment
CN103389947A (en) Memory manager and management method for VxWorks-based photo-etching machine double workpiece table control system
US7035989B1 (en) Adaptive memory allocation
CN101847127A (en) Memory management method and device
CN103455433B (en) EMS memory management process and system
CN108845958A (en) A kind of mapping of interleaver and dynamic EMS memory management system and method
CN106557427A (en) The EMS memory management process and device of shared drive data base
CN108829523A (en) Memory source distribution method, device, electronic equipment and readable storage medium storing program for executing
CN107515788A (en) A kind of method and device of Memory Allocation
CN106126731A (en) A kind of method and device obtaining Elasticsearch paged data
CN107912063A (en) A kind of method for recovering internal storage and device
CN102722452A (en) Memory redundancy eliminating method
CN105426126B (en) The construction method and device of cloud storage client multichannel constant rate of speed IO cachings
CN102143206A (en) Storage pool regulation method, device and system for cluster storage system
WO2023116011A1 (en) Traffic forwarding method and apparatus, device and storage medium
CN111190737A (en) Memory allocation method for embedded system
CN110175075A (en) Android system Memory Optimize Method and device

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