CN102779072A - Embedded system and dormancy and wake-up method of application process thereof - Google Patents

Embedded system and dormancy and wake-up method of application process thereof Download PDF

Info

Publication number
CN102779072A
CN102779072A CN2012101999536A CN201210199953A CN102779072A CN 102779072 A CN102779072 A CN 102779072A CN 2012101999536 A CN2012101999536 A CN 2012101999536A CN 201210199953 A CN201210199953 A CN 201210199953A CN 102779072 A CN102779072 A CN 102779072A
Authority
CN
China
Prior art keywords
mirror image
dormancy
pcb
internal memory
image data
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
CN2012101999536A
Other languages
Chinese (zh)
Other versions
CN102779072B (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.)
Shanghai Institute of Microsystem and Information Technology of CAS
Original Assignee
Shanghai Institute of Microsystem and Information Technology of CAS
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 Shanghai Institute of Microsystem and Information Technology of CAS filed Critical Shanghai Institute of Microsystem and Information Technology of CAS
Priority to CN201210199953.6A priority Critical patent/CN102779072B/en
Publication of CN102779072A publication Critical patent/CN102779072A/en
Application granted granted Critical
Publication of CN102779072B publication Critical patent/CN102779072B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention provides an embedded system and a dormancy and wake-up method of an application process thereof. The embedded system uses a traditional nonvolatile main storage and a dynamic random access memory (DRAM) internal storage to form a storage framework, the nonvolatile main storage is composed of a boot program storage area, a core storage area, a file system storage area and a progress mirror image backup area, wherein the progress mirror image backup area is divided into a mirror image indexing area and a mirror image data storage area, and can hang application processes in a nonvolatile storage. The embedded system and the dormancy and wake-up method can achieve system-level and single-process dormancy, enable process dormancy and wake-up management to be flexible and convenient, can reduce work load of data backup and recovery of dormancy and wake-up of the traditional embedded system and a large amount of storage spaces occupied by data backup in system dormancy, and accordingly improve operating efficiency of the embedded system.

Description

The dormancy of a kind of embedded system and application process thereof and awakening method
Technical field
The present invention relates to a kind of embedded system technology field, particularly relate to the dormancy and the awakening method of a kind of embedded system and application process thereof.
Background technology
Process is important concept in the operating system, and in the operating system of hierarchical structure, process is the base unit of system assignment resource, also is under multitasking, the base unit of process CPU scheduling.Process is the operational process of program on a data set; It is the base unit that system carries out resources allocation and scheduling; And processor just needs the existence of description process and can reflect the physical entity that changes if will discern the administration-management reason of going forward side by side to process, and promptly the static state of process is described.The static state of process is described by three parts and is formed PCB (process control block (PCB)), program segment and set of data structures.PCB comprises the descriptor of process, control information and resource information, and system is according to the existence of PCB aware processes and grasp state of a process to reach the purpose of control process activity.The program part of process describe process the function that will accomplish.And data set is the operand of the indispensable workspace of process.
Management to process is one of most important function in the operating system.Process is cancelled from being created to, and experience the different stages, and from the system resource angle, process has 3 kinds of basic status usually:
1) ready state (Ready): this is that process has had other resources except that processor, because the exclusivity of processor resource so temporarily can not move, need wait other process releasing and processing device resources.
2) running status (Running): process obtains processor resource, and its program is carried out, and in the single processor system, has only a process to be in running status; When not having other processes to carry out (like all processes all at blocked state), can automatically perform the idle process of system usually.
3) blocked state (Blocked): process temporarily can not be moved because of the generation of waiting for certain incident, like the interruption of waiting facilities, wait for the signal of other processes etc., in this state, though the processor free time also can't use.
In operating system, be one of most important work to the scheduling of process.Simultaneously can only handle a process on each processor; For reasonable use system resource, the way that can adopt timesharing to carry out usually lets a plurality of process shared storage resources, and execution time of processor is divided into shorter interlude section; Each process was moved according to the time period that is assigned to; Arrived when the time period, just carried out than changing next process, and the next process that has the operating system decision to carry out.Because the existence of process scheduling, in the lifetime of process, the residing state of process always constantly changes along with the variation of external condition and the propelling of self.
The scheduling of process relates to that the conversion of state relates between process, the switching between the preservation of current process state, new process scheduling operation and process.For the ease of management, control process, the special data structure-PCB that system is provided with comes the surface of record the process with it, describes the motion change process of process.Utilize PCB to control and manage all information of each process during system call, so PCB is unique sign that the system senses process exists.Process and PCB are one to one.
Generally speaking, comprise following content among the PCB:
(1) Process identifier: Process identifier is that internal system is used to identify the numbering that a process is given, and is called the internalname of process.
(2) information of processor, the CPU field data of preserving when promptly process becomes other states by executing state becomes ready state once more with this process of box lunch, and recovering information during the program that is scheduled allocation process machine makes process can continue normal the execution.Generally include the content (content of totalizer and indexing applications unit) of PSW PSW, general-purpose register, the content of programmable counter and the pointer of user stack etc.
(3) process scheduling information comprises process status, the priority of process, the out of Memory that process scheduling is required, information such as incident
(4) the process control information comprises the address of the data of program, resource inventory, the synchronous and communication mechanism of process, information such as indicator linking.
Through the operation to PCB, thereby system is relevant course allocation resource makes the execution that is able to be scheduled of relevant process; And the completion process requires the relevant address of functional programs section, and is stopped field data after the execution also all in PCB because of certain reason in the program process.At last, after process is carried out end, then come the shared various resources of release process through discharging PCB.
Principle features based on above-mentioned process characteristic, process status conversion, system call; The tradition embedded system is in process status conversion, system call process; The corresponding PCB controll block information of the work at present state of process perhaps is kept in the memory dram or is kept in the exchange partition; When system's power down or when closing; The corresponding PCB controll block information of the process that those are moving in the system or the process of hang-up will all be lost; When the system restart process or when starting the application process be forced closed once more, all need start this application process based on the storage code of the application program of depositing in the file system, bring problems such as internal memory waste, poor in timeliness thereby need pass through the multistep repetitive operation during duty before will recovering this process simultaneously and closing last time; Existing embedded system has the dormancy awakening function; Can realize fast quick-recovery to a certain extent based on the dormancy awakening implementation process duty of system; The startup of quickening process; Yet; It is to be the power consumption that unit reduces system with the system that system hibernates is waken up, need preserve the PCB controll block information of all processes in the internal memory during system hibernates, and the suspend process when needing bigger nonvolatile memory space to come the storage system dormancy simultaneously is relevant Backup Data; Though the backup information of can assurance preserving can be based on the nonvolatile memory system dormancy behind the electricity under the system time quickly recovers to the duty before the process dormancy, during with system hibernates the nonvolatile memory of all process PCB controll block information back-ups in the internal memory and sacrifice larger capacity is brought.
Given this, how based on the management of process-level further reduce power consumption and the system hibernates of embedded system, the workload in the wakeup process realizes that the duty that application program quickly recovers to before hanging up has become a problem demanding prompt solution.
Summary of the invention
The shortcoming of prior art in view of the above; The object of the present invention is to provide the dormancy and the awakening method of a kind of embedded system and application process thereof, be used for solving existing in the prior art embedded system process sleep procedure and load when data backup is excessive to cause internal memory waste and wakeup process that workload is relatively large, system running speed slow and the problem of poor in timeliness.
For realizing above-mentioned purpose and other relevant purposes; The present invention proposes a kind of application process dormancy and awakening method of embedded system; Said embedded system comprises cpu controller, non-volatile main memory and DRAM internal memory at least; Wherein, said non-volatile main memory is made up of boot memory block, kernel memory block, file system storage section and process mirror back-up district, it is characterized in that:
Said process mirror back-up zoning is divided into mirror image index area and mirror image data conservation zone;
Application process is hung up, and then this process discharges cpu resource entering dormant state;
During said embedded system application process dormancy, this process is suspended to said nonvolatile memory, promptly this process corresponding process control block (PCB) information in said DRAM internal memory is displaced the DRAM internal memory; Perhaps the corresponding process control block (PCB) information of the work at present state of said process still is retained in the DRAM internal memory; Perhaps close this process, and discharge shared DRAM memory headroom;
Application process is waken up, and then this process obtains the cpu resource and the state of resuming work;
When said embedded system application process is waken up, wake this process up based on the corresponding process control block (PCB) information of the said process of the current hang-up of preserving in the said DRAM internal memory; Or wake the process of being hung up up based on the process mirror back-up data in the said process mirror back-up district; Promptly the process control block (PCB) Backup Data of this process of preserving in the said mirror image data conservation zone is loaded into the DRAM internal memory with this process of quick startup, and discharges index record and process control block (PCB) backup data information that this process is preserved in said process mirror back-up district based on the index record of this process of preserving in the said process index area; Or directly restart a process, promptly during the associated storage information when all this process is hung up in the DRAM internal memory and mirror back-up district, directly the storage code based on said process corresponding application program starts this process.
Alternatively, when the application process of said embedded system is waken up, may further comprise the steps at least:
1) system wake-up process order;
2) progress information is preserved situation in the said DRAM internal memory of scanning;
3) whether preserve this process in the said DRAM internal memory and hang up the preceding corresponding process control block (PCB) relevant information of duty, if, then get into next step, if not, then go to step 5);
4) hang up preceding process control block (PCB) relevant information based on this process in the said DRAM internal memory and wake this process up, quickly recover to the duty before this process is hung up, go to step 13);
5) the said process mirror image data backup instances of hanging up in the said process mirror back-up of the scanning district;
6) judge the mirror image index record of whether preserving this process in the said mirror image index area, if, then go to step 8), if not, then get into next step;
7) directly restart this process based on this process code of preserving in the file storage area, go to step 13);
8) judge whether have available memory space to load said process mirror back-up data in the said DRAM internal memory, if, then go to step 10), if not, then get into next step;
9) the process control block (PCB) relevant information that suspension time in the said DRAM internal memory is surpassed the process of certain hour section backups in the said mirror back-up district and discharges its shared DRAM internal memory; Or directly use not frequent application process to close some to discharge its shared internal memory, to obtain sufficient memory headroom;
10) in process control block (PCB) mirror back-up data load to the said DRAM internal memory of mirror image index note based on this process in the said mirror image index area with this process in the said mirror image data conservation zone;
11) wake this process up based on the mirror back-up data of this process that is loaded on said DRAM internal memory, quickly recover to the duty before process is hung up;
The process control block (PCB) mirror back-up data of this process of preserving in the index record information of this process of 12) preserving in the said mirror image of the release index area and the said mirror image data conservation zone;
13) wake up or the startup process.
Alternatively, said dormancy comprises system-level dormancy and one process dormancy.Said system-level dormancy is the dormancy of embedded system or closes, and makes the application process of moving in the DRAM internal memory get into dormant state; Said one process dormancy is that single application process gets into dormant state.
Alternatively, during the system-level dormancy of said embedded system, said sleep procedure may further comprise the steps at least:
1) system closing or sleep command;
2) scan each Process Attributes in the internal memory successively by Process identifier;
3) judge whether current process is application process, if, then go to step 5), if not, then get into next step;
4) this process is a system process, need not to back up the process control block (PCB) information of current process, and goes to step 13);
5) judge whether the current application process needs to hang up, if then go to step 7), if not, then gets into next step;
6) this application process is the needs rev down process rev, need not to back up the process control block (PCB) information of current process, and goes to step 13);
7) suspend process mirror image data backup preservation situation in the scan procedure mirror back-up district;
8) judge whether process mirror back-up district has the satisfied storage block of depositing the backup of current application process mirror image data, if, then go to step 10), if not, then get into next step;
9) move, the discrete storage block in the arrangement, merging process mirror image data backup area, with storage availability piece in forming continuously;
10) preserve current process mirror back-up data based on continuous in the process mirror image data backup area, storage availability piece;
Process control block (PCB) index indications, backup process controll block storage start address and the length of 11) preserving current process are in the concordance list of process mirror image index area;
12) preserve the corresponding process control block (PCB) information of this process work at present state in the appropriate address of the mirror image data conservation zone of this process index record appointment;
13) in the internal memory process whether by whole scannings, if then get into next step, if not, then go to step 2);
14) system closing or dormancy.
Alternatively, during said embedded system one process dormancy, sleep procedure may further comprise the steps at least:
1) process is hung up or shutdown command;
2) scanning DRAM internal memory operating position;
3) judge whether current process need close, if, then get into next step, if not, then go to step 5);
4) discharge the process control block (PCB) relevant information of the current process of preserving among the DRAM, and go to step 12);
5) this process is hung up, and judges whether to displace internal memory, if, then get into next step, if not, then go to step 12);
6) suspend process mirror image data backup preservation situation in the scan procedure mirror back-up district;
7) judge whether process mirror back-up district has the satisfied storage block of depositing the backup of current application process mirror image data, if, then go to step 9), if not, then get into next step;
8) move, the discrete storage block in the arrangement, merging process mirror image data backup area, with storage availability piece in forming continuously;
9) preserve current process mirror back-up data based on continuous in the process mirror image data backup area, storage availability piece;
10) upgrade the concordance list that process mirror image index area is preserved; Add the corresponding record of this process mirror image data, index indications, backup process controll block storage start address and the length of preserving the process control block (PCB) of current process are in the concordance list of process mirror image index area;
11) preserve the corresponding process control block (PCB) information of this process work at present state in the appropriate address of the mirror image data conservation zone of this process index record appointment;
12) dormancy or rev down process rev.
In addition, another object of the present invention provides a kind of embedded system, it is characterized in that, said embedded system comprises at least:
Cpu controller, non-volatile main memory and DRAM internal memory;
Said non-volatile main memory is made up of boot memory block, kernel memory block, file system storage section and process mirror back-up district;
Said process mirror back-up zoning branch has mirror image index area and mirror image data conservation zone;
Said mirror image index area is used for preserving process mirror image concordance list, and said process mirror image concordance list is used for writing down the corresponding process control block (PCB) index indications of suspend process and writes down start address and the length that the corresponding process control block (PCB) of said process is stored in said mirror image data conservation zone; Said mirror image data conservation zone is used for preserving the Backup Data of the pairing process control block (PCB) of suspend process.
As stated, the dormancy and the awakening method of a kind of embedded system of the present invention and application process thereof have following beneficial effect:
This embedded system has mirror image index area and mirror image data conservation zone with the process mirror back-up zoning branch of the storage architecture of traditional non-volatile main memory and DRAM internal memory formation; Can realize that application process suspends to nonvolatile memory; The mirror back-up data of preserving when hanging up based on process realize the preceding duty of the fast quick-recovery hang-up of application process; With the process is that unit reduces system hibernates, the workload when waking up; Based on embedded system process provided by the invention dormancy and the method feasible system level of waking up and the dormancy of one process; Make the process dormancy, wake up management more flexibly, convenient, the shared a large amount of storage spaces of data backup in the time of can reducing workload and the system hibernates of data backup and recovery of traditional embedded system dormancy awakening, thus the quick dormancy that realizes the embedded system process with wake up.
Description of drawings
Fig. 1 is shown as Embedded System Structure synoptic diagram among the present invention.
Fig. 2 is shown as embedded system one process dormancy method schematic flow sheet of the present invention.
Fig. 3 is shown as the system-level dormancy method schematic flow sheet of embedded system of the present invention.
Fig. 4 is shown as embedded system process awakening method schematic flow sheet of the present invention.
The element numbers explanation
1 cpu controller
2 non-volatile main memories
20 NOR Flash storeies
201 Bootloader (boot memory block)
21 NAND Flash storeies
210 Kernel (kernel memory block)
211 Rootfs (file system storage section)
212 process mirror memory areas
2120 mirror image index areas
2121 mirror image data conservation zones
S1~S12, S21~S34, S41~S54 step
Embodiment
Below through specific instantiation embodiment of the present invention is described, those skilled in the art can understand other advantages of the present invention and effect easily by the content that this instructions disclosed.The present invention can also implement or use through other different embodiment, and each item details in this instructions also can be based on different viewpoints and application, carries out various modifications or change under the spirit of the present invention not deviating from.
See also Fig. 1 to Fig. 4.Need to prove; The diagram that is provided in the present embodiment is only explained basic conception of the present invention in a schematic way; Satisfy only show in graphic with the present invention in relevant assembly but not component count, shape and plotted when implementing according to reality; Kenel, quantity and the ratio of each assembly can be a kind of random change during its actual enforcement, and its assembly layout kenel also maybe be more complicated.
Of Fig. 1; The present invention provides a kind of embedded system; Said embedded system comprises cpu controller 1, non-volatile main memory 2 and DRAM internal memory 3 at least; Wherein, non-volatile main memory 2 comprises NOR Flash storer 20 and NAND Flash storer 21, and said non-volatile main memory 2 is made up of boot memory block 200, kernel memory block 210, file system storage section 211 and process mirror back-up district 212; Said process mirror back-up district 212 divides has mirror image index area 2120 and mirror image data conservation zone 2121; Said mirror image index area 2120 is used for preserving process mirror image concordance list, and said process mirror image concordance list is used for writing down the corresponding PCB index indications of suspend process and writes down start address and the length that the corresponding PCB of said process stores in said mirror image data conservation zone; Said mirror image data conservation zone 2121 is used for preserving the Backup Data of the pairing PCB of suspend process.
Embedded system of the present invention combines traditional non-volatile main memory and constitutes with the DRAM internal memory embedded storage architecture system; In said non-volatile main memory, mark off a process mirror back-up district; Embedded system dormancy or only need in said process mirror back-up district, to preserve the status information of required application process when closing; And the status information of unwanted system process need not to preserve; Can reduce the workload of data backup and the storage space of saving Backup Data greatly, simultaneously said embedded system started fast.
Another object of the present invention provides a kind of dormancy and awakening method of embedded system application process.With reference to shown in Figure 1, said embedded system comprises cpu controller, non-volatile main memory and DRAM internal memory at least, and wherein, said non-volatile main memory is made up of boot memory block, kernel memory block, file system storage section and process mirror back-up district; Said process mirror back-up zoning branch has mirror image index area and mirror image data conservation zone.
Application process is hung up, and then this process discharges cpu resource entering dormant state.When system sends sleep command to an application process; If hang up and displace internal memory; Then preserve the corresponding PCB information of current process duty to process mirror back-up district; And discharge the shared DRAM internal memory of current process, otherwise just hang up this process, the corresponding PCB controll block information of work at present state still is retained among the DRAM.
Particularly, said dormancy comprises system-level dormancy and one process dormancy.Said system-level dormancy is the embedded system dormancy or closes, and the application process of moving in the DRAM internal memory is hung up got into dormant state; Said one process dormancy is that single application process is hung up the entering dormant state.
Principle and effect for further illustrating one process dormancy of the present invention see also Fig. 2, and Fig. 2 is shown as the dormancy schematic flow sheet of embedded system one process of the present invention.
As shown in Figure 2, in step S1, system is during to a certain application process dormancy, and cpu controller sends to be hung up or shutdown command, then goes among the step S2.
In step S2, the operating position of system scan DRAM internal memory then gets among the step S3.
In step S3, judge whether current process need close, and if not, then goes to step S5, if then get among the step S4.
In step S4, discharge the PCB relevant information of the current process of preserving among the DRAM, and go among the step S12.
In step S5, this process is hung up, and judges whether to displace the DRAM internal memory, if, then get among the step S6, if not, then go among the step S12.
In step S6, scan the operating position of the mirror image data backup area of suspend process in the said process mirror back-up district, get among the step S7.
In step S7, judge whether said process mirror back-up district has the satisfied storage block of depositing the backup of current application process mirror image data, if, then go among the step S9, if not, then get into step S8.
In step S8, move, put in order, merge the discrete storage block in the said process mirror image data backup area, with storage availability piece in forming continuously, get among the step S9.
In step S9, in said process mirror image data backup area, continuously, preserve current process mirror back-up data in the storage availability piece, get into step S10.
In step S10; Upgrade the concordance list that said process mirror image index area is preserved; Add the corresponding record of this process mirror image data, PCB index indications, backup PCB storage start address and the length of preserving current process get among the step S11 in the concordance list of said process mirror image index area.
In step S11, preserve the corresponding PCB information of this process work at present state in the appropriate address of the said mirror image data conservation zone of this process index record appointment, get among the step S12.
In step S12, to accomplish the preceding duty of dormancy and preserve, this moment, this process can get into dormant state.By on can know when individual process is only hung up, whether back up its work at present state related data to nonvolatile memory according to the attribute decision of this process, the one process dormancy realizes with the process being that unit reduces system power dissipation, makes process dormancy management more flexible.
Embedded system is closed or during dormancy, is related to closing and dormancy of multi-process among the present invention.At this moment; System will preserve all hang-up in the current internal memory but the corresponding PCB information of duty of the application process that need not to close to the mirror back-up district, the corresponding PCB information of duty of system process and the application process that need close need not backup in the current internal memory.For further illustrating the principle and the effect of the system-level dormancy of embedded system of the present invention, see also Fig. 3, Fig. 3 is shown as the system-level dormancy schematic flow sheet of embedded system of the present invention.
In step S21, cpu controller sends system and hangs up or shutdown command, then goes among the step S22.
In step S22, system scans each Process Attributes in the internal memory successively by Process identifier, then gets among the step S23.
In step S23, judge whether current process is application process, if, then go to step S25, if not, then get among the next step S24.
In step S24, this process is a system process, need not to back up the PCB information of current process, and goes among the step S33.
In step S25, judge whether the current application process needs to hang up, if then go among the step S27, if not, then gets among the next step S26.
In step S26, this application process is the needs rev down process rev, need not to back up the PCB controll block information of current process, and goes to step S33.
In step S27, scan the mirror image data backup instances of suspend process in the said process mirror back-up district, then get among the next step S28.
In step S28, judge whether said process mirror back-up district has the storage block that satisfies the mirror image data backup of depositing the current application process, if, then go to step S30, if not, then get among the next step S29.
In step S29, move, the discrete storage block in the arrangement, merging process mirror image data backup area, with storage availability piece in forming continuously, then get among the next step S30.
In step S30, preserve current process mirror back-up data based on continuous in the said process mirror image data backup area, storage availability piece, then get among the next step S31.
In step S31, the PCB index indications of preservation current process and said PCB storage start address and length then get among the next step S32 in the concordance list of said process mirror image index area.
In step S32, the PCB information that this process work at present state is corresponding is saved in the appropriate address of said mirror image data conservation zone of this process index record appointment, then gets among the next step S33.
In step S33, in the internal memory process whether by whole scannings, if, then get into next step, if not, then go to step S12, then get among the next step S34.
In step S34, the duty of accomplishing before said embedded system is hung up or closed is preserved, and this moment, system can get into dormancy or closed condition.By on can know; During embedded system dormancy of the present invention; Only the status information with required application process suspends in the said nonvolatile memory, and the status information of system process need not backup, can reduce the workload of data backup and the storage space of saving Backup Data greatly.
To the dormancy method of embedded system application process among the present invention, then the method waken up of application process comprises:
1) wakes this process up based on the corresponding PCB information of the current process of preserving among the DRAM.
2) wake the process of being hung up up based on the process mirror back-up data in the said process mirror back-up district; If the Backup Data of corresponding PCB information when preserving this process hang-up in the said process mirror back-up district; The mirror back-up data of state were to the DRAM internal memory before the PCB Backup Data that the index record of this process of then preserving based on said process index area loads this process of preserving in said mirror image data district was hung up said process, and started this process fast and discharge index record and the PCB backup information of preserving in the corresponding said process mirror back-up district of this process based on the said mirror back-up data that are loaded in the DRAM.
3) directly restart a process, promptly during the associated storage information when all this process is hung up in said DRAM internal memory and the process mirror back-up district, then directly start this process based on the storage code of application process.
Wake principle and effect up for what further illustrate the application process of embedded system described in the present invention, see also Fig. 4, Fig. 4 is shown as the schematic flow sheet that wakes up of said embedded system application process of the present invention.
In step S41, system sends the wakeup process order, then gets among the step S42.
In step S42, scan progress information preservation situation in the said DRAM internal memory, then get among the step S43.
In step S43, judge that whether preserving this process in the said DRAM internal memory hangs up the preceding corresponding PCB relevant information of duty, if, then get into next step, if not, then go among the step S45.
In step S44, hang up preceding process control block (PCB) relevant information based on this process in the said DRAM internal memory and wake this process up, quickly recover to the duty before this process is hung up, then go to step S53.
In step S45, scan the said process mirror image data backup instances of hanging up in the said process mirror back-up district, then go to step S46.
In step S46, judge the mirror image index record of whether preserving this process in the said mirror image index area, if, then go to step S48, if not, then get into next step S47.
In step S47, directly the storage code based on this application process restarts this process, goes among the step S53.
Whether in step S48, judging has available memory space to load said process mirror back-up data in the said DRAM internal memory, if, then go to step S50, if not, then get among the next step S49.
In step S49; The PCB relevant information that suspension time in the said DRAM internal memory is surpassed the process of certain hour section backups in the said mirror back-up district and discharges its shared DRAM internal memory; Or directly use not frequent application process to close some to discharge its shared internal memory; To obtain sufficient memory headroom, then get among the next step S50.
In step S50, in process control block (PCB) mirror back-up data load to the said DRAM internal memory of mirror image index record based on this process in the said mirror image index area, then get among the next step S51 this process in the said mirror image data conservation zone.
In step S51, wake this process up based on the mirror back-up data of this process that is loaded on said DRAM internal memory, quickly recover to the duty before process is hung up, then get among the next step S52.
In step S52, discharge the PCB mirror back-up data of this process of preserving in the said mirror image data conservation zone, then get among the next step S53.
In step S53, discharge the index record of this process of preserving in the said mirror image index area, then get among the next step S54.
In step S54, accomplish waking up or starting of said process.By on can know; When application process is waken up, duty before the fast quick-recovery of the mirror back-up data implementation process of preserving when hanging up based on this process is hung up, the workload when being unit reduction system wake-up with the process; Improve the speed of system wake-up, improved work efficiency.
In sum; The present invention provides the dormancy of a kind of embedded system and application process thereof and the method for waking up; This embedded system constitutes storage architecture by traditional non-volatile main memory and DRAM internal memory, and non-volatile main memory is made up of boot memory block, kernel memory block, file system storage section and process mirror back-up district again, wherein; Process mirror back-up zoning branch has mirror image index area and mirror image data conservation zone; Can realize that application process suspends to nonvolatile memory, the mirror back-up data of preserving when hanging up based on application process realize the preceding duty of the fast quick-recovery hang-up of application process, are that unit reduces system hibernates, the workload when waking up with the process.The dormancy of feasible system level of the present invention and one process; Make the process dormancy, wake management up more flexibly, conveniently; The shared a large amount of storage spaces of data backup in the time of can reducing workload and the system hibernates of traditional embedded system dormancy and the data backup that wakes up and recovery, thus the operational efficiency of embedded system improved.So the present invention has effectively overcome various shortcoming of the prior art and the tool high industrial utilization.
The foregoing description is illustrative principle of the present invention and effect thereof only, but not is used to limit the present invention.Any be familiar with this technological personage all can be under spirit of the present invention and category, the foregoing description is modified or is changed.Therefore, have common knowledge the knowledgeable in the affiliated such as technical field, must contain by claim of the present invention not breaking away from all equivalence modifications of being accomplished under disclosed spirit and the technological thought or changing.

Claims (7)

1. the dormancy of an embedded system application process and awakening method, said embedded system comprises cpu controller, non-volatile main memory and DRAM internal memory at least, wherein, said non-volatile main memory by boot memory block, kernel memory block,
File system storage section and process mirror back-up district form, and it is characterized in that:
Said process mirror back-up zoning is divided into mirror image index area and mirror image data conservation zone;
Application process is hung up, and then this process discharges cpu resource entering dormant state;
During said embedded system application process dormancy, this process is suspended to said nonvolatile memory, promptly this process corresponding process control block (PCB) information in said DRAM internal memory is displaced the DRAM internal memory; Perhaps the corresponding process control block (PCB) information of the work at present state of said process still is retained in the DRAM internal memory; Perhaps close this process, and discharge shared DRAM memory headroom;
Application process is waken up, and then this process obtains the cpu resource and the state of resuming work;
When said embedded system application process is waken up, wake this process up based on the corresponding process control block (PCB) information of the said process of the current hang-up of preserving in the said DRAM internal memory; Or wake the process of being hung up up based on the process mirror back-up data in the said process mirror back-up district; Promptly the process control block (PCB) Backup Data of this process of preserving in the said mirror image data conservation zone is loaded into the DRAM internal memory with this process of quick startup, and discharges index record and process control block (PCB) backup data information that this process is preserved in said process mirror back-up district based on the index record of this process of preserving in the said process index area; Or directly restart a process, promptly during the associated storage information when all this process is hung up in the DRAM internal memory and mirror back-up district, directly the storage code based on said process corresponding application program starts this process.
2. the dormancy of embedded system application process according to claim 1 and awakening method is characterized in that, when the application process of said embedded system is waken up, may further comprise the steps at least:
1) system wake-up process order;
2) progress information is preserved situation in the said DRAM internal memory of scanning;
3) whether preserve this process in the said DRAM internal memory and hang up the preceding corresponding process control block (PCB) relevant information of duty, if, then get into next step, if not, then go to step 5);
4) hang up preceding process control block (PCB) relevant information based on this process in the said DRAM internal memory and wake this process up, quickly recover to the duty before this process is hung up, go to step 13);
5) the said process mirror image data backup instances of hanging up in the said process mirror back-up of the scanning district;
6) judge the mirror image index record of whether preserving this process in the said mirror image index area, if, then go to step 8), if not, then get into next step;
7) directly restart this process based on this process code of preserving in the file storage area, go to step 13);
8) judge whether have available memory space to load said process mirror back-up data in the said DRAM internal memory, if, then go to step 10), if not, then get into next step;
9) the process control block (PCB) relevant information that suspension time in the said DRAM internal memory is surpassed the process of certain hour section backups in the said mirror back-up district and discharges its shared DRAM internal memory; Or directly use not frequent application process to close some to discharge its shared internal memory, to obtain sufficient memory headroom;
10) in process control block (PCB) mirror back-up data load to the said DRAM internal memory of mirror image index note based on this process in the said mirror image index area with this process in the said mirror image data conservation zone;
11) wake this process up based on the mirror back-up data of this process that is loaded on said DRAM internal memory, quickly recover to the duty before process is hung up;
The process control block (PCB) mirror back-up data of this process of preserving in the index record information of this process of 12) preserving in the said mirror image of the release index area and the said mirror image data conservation zone;
13) wake up or the startup process.
3. the dormancy of embedded system application process according to claim 1 and awakening method is characterized in that: said dormancy comprises system-level dormancy and one process dormancy.
4. the dormancy of embedded system application process according to claim 3 and awakening method is characterized in that: said system-level dormancy is the dormancy of embedded system or closes, and makes the application process of moving in the DRAM internal memory get into dormant state; Said one process dormancy is that single application process gets into dormant state.
5. the dormancy of embedded system application process according to claim 4 and awakening method is characterized in that, during the system-level dormancy of said embedded system, said sleep procedure may further comprise the steps at least:
1) system closing or sleep command;
2) scan each Process Attributes in the internal memory successively by Process identifier;
3) judge whether current process is application process, if, then go to step 5), if not, then get into next step;
4) this process is a system process, need not to back up the process control block (PCB) information of current process, and goes to step 13);
5) judge whether the current application process needs to hang up, if then go to step 7), if not, then gets into next step;
6) this application process is the needs rev down process rev, need not to back up the process control block (PCB) information of current process, and goes to step 13);
7) suspend process mirror image data backup preservation situation in the scan procedure mirror back-up district;
8) judge whether process mirror back-up district has the satisfied storage block of depositing the backup of current application process mirror image data, if, then go to step 10), if not, then get into next step;
9) move, the discrete storage block in the arrangement, merging process mirror image data backup area, with storage availability piece in forming continuously;
10) preserve current process mirror back-up data based on continuous in the process mirror image data backup area, storage availability piece;
Process control block (PCB) index indications, backup process controll block storage start address and the length of 11) preserving current process are in the concordance list of process mirror image index area;
12) preserve the corresponding process control block (PCB) information of this process work at present state in the appropriate address of the mirror image data conservation zone of this process index record appointment;
13) in the internal memory process whether by whole scannings, if then get into next step, if not, then go to step 2);
14) system closing or dormancy.
6. the dormancy of embedded system application process according to claim 4 and awakening method is characterized in that, during said embedded system one process dormancy, sleep procedure may further comprise the steps at least:
1) process is hung up or shutdown command;
2) scanning DRAM internal memory operating position;
3) judge whether current process need close, if, then get into next step, if not, then go to step 5);
4) discharge the process control block (PCB) relevant information of the current process of preserving among the DRAM, and go to step 12);
5) this process is hung up, and judges whether to displace internal memory, if, then get into next step, if not, then go to step 12);
6) suspend process mirror image data backup preservation situation in the scan procedure mirror back-up district;
7) judge whether process mirror back-up district has the satisfied storage block of depositing the backup of current application process mirror image data, if, then go to step 9), if not, then get into next step;
8) move, the discrete storage block in the arrangement, merging process mirror image data backup area, with storage availability piece in forming continuously;
9) preserve current process mirror back-up data based on continuous in the process mirror image data backup area, storage availability piece;
10) upgrade the concordance list that process mirror image index area is preserved; Add the corresponding record of this process mirror image data, index indications, backup process controll block storage start address and the length of preserving the process control block (PCB) of current process are in the concordance list of process mirror image index area;
11) preserve the corresponding process control block (PCB) information of this process work at present state in the appropriate address of the mirror image data conservation zone of this process index record appointment;
12) dormancy or rev down process rev.
7. an embedded system is characterized in that, comprises at least:
Cpu controller, non-volatile main memory and DRAM internal memory;
Said non-volatile main memory is made up of boot memory block, kernel memory block, file system storage section and process mirror back-up district;
Said process mirror back-up zoning branch has mirror image index area and mirror image data conservation zone;
Said mirror image index area is used for preserving process mirror image concordance list, and said process mirror image concordance list is used for writing down the corresponding process control block (PCB) index indications of suspend process and writes down start address and the length that the corresponding process control block (PCB) of said process is stored in said mirror image data conservation zone; Said mirror image data conservation zone is used for preserving the Backup Data of the pairing process control block (PCB) of suspend process.
CN201210199953.6A 2012-06-18 2012-06-18 Embedded system and dormancy and wake-up method of application process thereof Active CN102779072B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210199953.6A CN102779072B (en) 2012-06-18 2012-06-18 Embedded system and dormancy and wake-up method of application process thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210199953.6A CN102779072B (en) 2012-06-18 2012-06-18 Embedded system and dormancy and wake-up method of application process thereof

Publications (2)

Publication Number Publication Date
CN102779072A true CN102779072A (en) 2012-11-14
CN102779072B CN102779072B (en) 2014-06-25

Family

ID=47123991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210199953.6A Active CN102779072B (en) 2012-06-18 2012-06-18 Embedded system and dormancy and wake-up method of application process thereof

Country Status (1)

Country Link
CN (1) CN102779072B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927226A (en) * 2013-01-15 2014-07-16 晨星软件研发(深圳)有限公司 Electronic device dormancy response setting method and electronic device
WO2015131679A1 (en) * 2014-08-28 2015-09-11 中兴通讯股份有限公司 Task process processing method and device
CN107357680A (en) * 2013-12-02 2017-11-17 华为技术有限公司 Data processing equipment and the method for data processing
CN107589969A (en) * 2017-09-06 2018-01-16 郑州云海信息技术有限公司 A kind of (SuSE) Linux OS dormancy quick start method based on NVDIMM
CN108021220A (en) * 2017-10-25 2018-05-11 努比亚技术有限公司 A kind of terminal applies control method, terminal and computer-readable recording medium
CN109408149A (en) * 2018-10-30 2019-03-01 青岛海信传媒网络技术有限公司 Starting method, apparatus, equipment and the storage medium of application program
CN109426563A (en) * 2017-08-31 2019-03-05 华为技术有限公司 A kind of process management method and device
CN109426525A (en) * 2017-08-18 2019-03-05 华为技术有限公司 A kind of method and device that the sleep state for computer wakes up
CN110716758A (en) * 2018-06-26 2020-01-21 阿里巴巴集团控股有限公司 Program running method, device, equipment and storage medium
CN111506351A (en) * 2020-04-03 2020-08-07 珠海市一微半导体有限公司 Deep sleep method, wake-up method and sleep and wake-up method for system on chip
CN111796921A (en) * 2020-06-30 2020-10-20 西安微电子技术研究所 Embedded multi-core operating system scheduling method, scheduling device, electronic equipment and storage medium
CN112462926A (en) * 2020-12-09 2021-03-09 北京元心科技有限公司 Power management method and device in mobile terminal, electronic equipment and computer storage medium
CN113467841A (en) * 2021-05-17 2021-10-01 翱捷智能科技(上海)有限公司 Dual-operating-system equipment and quick sleeping and awakening method thereof
WO2021197239A1 (en) * 2020-03-31 2021-10-07 华为技术有限公司 Device sleep method and computing device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1818870A (en) * 2006-03-16 2006-08-16 浙江大学 Memory mirror starting optimization of built-in operation system
CN1825283A (en) * 2006-03-31 2006-08-30 浙江大学 Method for implementing hardware image starting optimizing of embedded operating system
CN101710253A (en) * 2009-11-25 2010-05-19 安凯(广州)微电子技术有限公司 Deep-sleep method of embedded system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1818870A (en) * 2006-03-16 2006-08-16 浙江大学 Memory mirror starting optimization of built-in operation system
CN1825283A (en) * 2006-03-31 2006-08-30 浙江大学 Method for implementing hardware image starting optimizing of embedded operating system
CN101710253A (en) * 2009-11-25 2010-05-19 安凯(广州)微电子技术有限公司 Deep-sleep method of embedded system

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103927226A (en) * 2013-01-15 2014-07-16 晨星软件研发(深圳)有限公司 Electronic device dormancy response setting method and electronic device
CN107357680A (en) * 2013-12-02 2017-11-17 华为技术有限公司 Data processing equipment and the method for data processing
WO2015131679A1 (en) * 2014-08-28 2015-09-11 中兴通讯股份有限公司 Task process processing method and device
CN105468441A (en) * 2014-08-28 2016-04-06 中兴通讯股份有限公司 Processing method and apparatus for task process
CN109426525A (en) * 2017-08-18 2019-03-05 华为技术有限公司 A kind of method and device that the sleep state for computer wakes up
CN109426563A (en) * 2017-08-31 2019-03-05 华为技术有限公司 A kind of process management method and device
CN107589969A (en) * 2017-09-06 2018-01-16 郑州云海信息技术有限公司 A kind of (SuSE) Linux OS dormancy quick start method based on NVDIMM
CN108021220A (en) * 2017-10-25 2018-05-11 努比亚技术有限公司 A kind of terminal applies control method, terminal and computer-readable recording medium
CN110716758A (en) * 2018-06-26 2020-01-21 阿里巴巴集团控股有限公司 Program running method, device, equipment and storage medium
CN109408149A (en) * 2018-10-30 2019-03-01 青岛海信传媒网络技术有限公司 Starting method, apparatus, equipment and the storage medium of application program
CN109408149B (en) * 2018-10-30 2022-02-25 青岛海信传媒网络技术有限公司 Application program starting method, device, equipment and storage medium
WO2021197239A1 (en) * 2020-03-31 2021-10-07 华为技术有限公司 Device sleep method and computing device
EP4116825A4 (en) * 2020-03-31 2023-05-24 Huawei Technologies Co., Ltd. Device sleep method and computing device
CN111506351A (en) * 2020-04-03 2020-08-07 珠海市一微半导体有限公司 Deep sleep method, wake-up method and sleep and wake-up method for system on chip
CN111796921A (en) * 2020-06-30 2020-10-20 西安微电子技术研究所 Embedded multi-core operating system scheduling method, scheduling device, electronic equipment and storage medium
CN111796921B (en) * 2020-06-30 2023-05-30 西安微电子技术研究所 Scheduling method and scheduling device for embedded multi-core operating system, electronic equipment and storage medium
CN112462926A (en) * 2020-12-09 2021-03-09 北京元心科技有限公司 Power management method and device in mobile terminal, electronic equipment and computer storage medium
CN113467841A (en) * 2021-05-17 2021-10-01 翱捷智能科技(上海)有限公司 Dual-operating-system equipment and quick sleeping and awakening method thereof
CN113467841B (en) * 2021-05-17 2024-06-11 翱捷智能科技(上海)有限公司 Dual-operating-system equipment and rapid dormancy and awakening method thereof

Also Published As

Publication number Publication date
CN102779072B (en) 2014-06-25

Similar Documents

Publication Publication Date Title
CN102779072B (en) Embedded system and dormancy and wake-up method of application process thereof
CN102841674B (en) Embedded system based on novel memory and hibernation and awakening method for process of embedded system
US6986068B2 (en) Arithmetic processing system and arithmetic processing control method, task management system and task management method
CN102122250B (en) Computer system and operating system switching method thereof
CN102866934B (en) Based on dormancy and the waken system of the embedded device of non-volatile random access memory
CN101542442B (en) Multiprocessor control unit, its control method, and integrated circuit
US7647483B2 (en) Multi-threaded parallel processor methods and apparatus
CN102135910B (en) Method for switching operating systems and electronic device using same
CN100375034C (en) Method and system for implementing thread sleep in computer system
US9104500B1 (en) Lock-free job scheduler for multi-processor systems
CN102495756A (en) Method and system for switching operating system between different central processing units
CN104050137A (en) Method and device for operating inner cores in heterogeneous operation system
JP2002099433A (en) System of computing processing, control method system for task control, method therefor and record medium
CN104199730A (en) Single-thread multi-task processing method based on synchronous I/O multiplexing mechanism
CN111506351A (en) Deep sleep method, wake-up method and sleep and wake-up method for system on chip
CN103412755A (en) Hardware real-time operation system
CN105573825A (en) Cross-operating system inter-task synchronization method and device
CN102736928B (en) Fast wake-up computer system method and computer system
CN111225434B (en) Application response method, system, storage medium and communication module
CN103019849A (en) Method for managing virtual machine in cloud computing environment
CN102279762A (en) Method for improving service efficiency of internal memory on mobile phone platform
WO2008157455A2 (en) Notifying user mode scheduler of blocking events
JP2009037403A (en) Valid activation method for core memory in multi-core processor
CN103257894A (en) Program management method and electronic terminal
CN103218031A (en) Electronic device and sleep method

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