CN101251810A - Method for optimizing embedded type operating system process scheduling based on SPM - Google Patents

Method for optimizing embedded type operating system process scheduling based on SPM Download PDF

Info

Publication number
CN101251810A
CN101251810A CNA2008100611353A CN200810061135A CN101251810A CN 101251810 A CN101251810 A CN 101251810A CN A2008100611353 A CNA2008100611353 A CN A2008100611353A CN 200810061135 A CN200810061135 A CN 200810061135A CN 101251810 A CN101251810 A CN 101251810A
Authority
CN
China
Prior art keywords
process scheduling
code
operating system
data
spm
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.)
Pending
Application number
CNA2008100611353A
Other languages
Chinese (zh)
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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CNA2008100611353A priority Critical patent/CN101251810A/en
Publication of CN101251810A publication Critical patent/CN101251810A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method for scheduling and optimizing a course of an embedded type operating system based on a SPM. The invention reorganizes a source code of the embedded type operating system, wherein the code and data relevant to course scheduling are separated independently and compiled to the SPM by an addressing and compiling technology of a cross compiler. Through putting the code and data relevant to the course scheduling of the embedded type operating system to the SPM, the invention can effectively improve the real-time of the course scheduling.

Description

Method for optimizing embedded type operating system process scheduling based on SPM
Technical field
The present invention relates to the optimizing embedded type operating system process scheduling technology, particularly relate to a kind of method for optimizing embedded type operating system process scheduling based on SPM.
Background technology
ScratchPad Memory is the general designation of a class storer, and the common feature of this class storer is that they all connect up together with CPU, and promptly this class storer and CPU are integrated on the chip.The benefit of doing like this is, can improve the integrated level of chip, makes chip itself just have certain access capability, can be so that the development of SOC (System On Chip).Simultaneously because this class memory distance CPU is very near, so their read or write speed will be quickened accordingly.
High-end in the market processor chips much are integrated with the storer in the sheet, as: Intel PXA27X etc.At present their function mainly is to process Cache in the device sheet, or for the internal memory of the special use of user.Usually they all with the main memory unified addressing, so just made things convenient for developer's development.Based on the general characteristic of internal memory in the sheet, use now more be with SRAM as internal memory in the sheet, main cause is that it has good readwrite performance.But because the volume restrictions of SRAM is general big or small about 256K so the interior internal memory of sheet all is a low capacity at present, as: Intel PXA272.
SRAM is the abbreviation of Static RAM, and it is a kind of static access memory, does not promptly need the periodic refreshing circuit just can preserve the data of its storage inside.Normal memory unlike DRAM needs refresh circuit like that, at set intervals, regularly will be once to the DRAM refresh charge, otherwise inner data promptly can disappear.Because like this, SRAM has higher readwrite performance.But SRAM also has its shortcoming, and its integrated level is lower, and the DRAM internal memory of same capability needs smaller volume than SRAM, therefore, if there is the SRAM storer on the mainboard, then will take a part of area, and this is insupportable to embedded system.General on mainboard the system of integrated SRAM, normally desktop system.
SRAM is owing to there being readwrite performance preferably, so its special-purpose is arranged in computer system.SRAM is having several usages on the mainboard at present: a kind of is the high-speed cache that places between CPU and the main memory, and this high-speed cache has two kinds of specifications: a kind of is the high-speed cache that is fixed on the mainboard, promptly usually said Cache; Another kind is to be inserted in the high-speed cache that expands usefulness on the draw-in groove.Also have in order to quicken the transmission of CPU internal data, high-speed cache has also been designed in inside at CPU, so at Pentium CPU the notion of on-chip cache and second level cache is just arranged, general level cache is built the inside of CPU in being in, and L2 cache is the outside that is integrated in CPU.The obvious speed of SRAM is fast, does not need periodic refreshing, but other shortcoming is also arranged, and is exactly the price height, and volume is big, so can't be as the main memory of large usage quantity on mainboard.
Another using method of SRAM is ScratchPad Memory on the sheet, is called for short SPM.Cache can't control cache for the programmer normally by hardware controls; SPM then is a storage space on the sheet that addresses as internal memory, therefore, when the programmer can be by coding, the address controlled, thus visit SPM.
Up to the present also do not have correlative study to relate to and utilize the optimization of the interior high-performance SPM of sheet embedded type operating system process scheduling.This design that relates to hardware performance is different from the improvement on the software, and hardware is the basis of whole software, so high performance internal memory can significantly improve the process scheduling performance, improves system real time.
Summary of the invention
The object of the present invention is to provide a kind of method for optimizing embedded type operating system process scheduling based on SPM.
The technical scheme that the present invention solves its technical matters employing is as follows:
1) SPM tissue:
With the piece is unit, and SPM is divided into process scheduling code area, process scheduling data field and expansion area;
2) extraction of process scheduling code and data and tissue:
Extract correlative code and data from the relevant portion of operating system, and they are focused in two files; A file is deposited the code of embedded type operating system process scheduling module specially, and another file is deposited the data of embedded type operating system process scheduling module specially;
Extraction process or is assisted to carry out by Software tool by hand; The manual extraction read source code and analyzed extraction by the programmer; It is under the help of Software tool the code and the data pick-up of embedded type operating system process scheduling module to be come out that Software tool assists to carry out this;
3) compiler addressing compiling:
Via the guidance of way of compiling control file, cross-compiler is a binary file with compilation of source code, and the way of compiling control file has determined the address of each module in the binary file to distribute.The process scheduling module of embedded OS is addressed to assigned address.Wherein, the code of the process scheduling module of embedded OS is addressed to the process scheduling code area, and the data of the process scheduling module of embedded OS are addressed to the process scheduling data field.
The present invention compares with background technology, and the useful effect that has is:
The present invention utilizes this high-performance memory of SPM that the process scheduling of general embedded OS is optimized, and data and code relevant with process scheduling in the embedded OS are compiled to the SPM memory headroom.The source code of embedded OS is reorganized, and wherein relevant with process scheduling code and data are independently separated, and utilize the addressing technique of compiling of cross-compiler, and it is compiled among the SPM.Pass through program loader, under the guidance of compiling information, with binary executable by specifying requirement, be loaded into the designated space in Installed System Memory space respectively, wherein relevant with process scheduling code and data are loaded into code area and the data field among the SPM, and other parts are loaded into the main memory space.
(1) real-time.The time that the method for utilizing SPM Optimizing operation system process to dispatch can reduce process switching greatly.
(2) low energy consumption.Utilize the low-power consumption characteristic of SPM, power consumption when reducing the operation of embedded OS plays energy-conservation effect.
Description of drawings
Fig. 1 is an implementation process synoptic diagram of the present invention;
Fig. 2 is the synoptic diagram of SPM tissue;
Fig. 3 is the synoptic diagram of the embedded OS compilation of source code condition diagram of routine;
Fig. 4 is a way of compiling control file synoptic diagram.
Embodiment
The present invention is a kind of method for optimizing embedded type operating system process scheduling based on SPM, below in conjunction with Fig. 1 its specific implementation process is described.
1) SPM tissue:
According to the characteristics of SPM, it is the division of unit that the SRAM space is carried out with the piece, and the benefit of doing like this is with the code area of process scheduling module and the data field physically separates and the minimizing internal fragmentation.Can adapt at any time along with the continuous variation of system in addition.
In Fig. 2, code area and data field are made up of the piece of some specific sizes, but code area and data field separate in physical space, so just can avoid the chaotic and conflict of data and code.Expansion area wherein is unnecessary SPM space, can be embedded into formula operating system and be merged together management as common memory and main memory.
The binary file address distributed intelligence decision that the concrete size of process scheduling code area and process scheduling data field is exported after to compilation of source code according to compiler.This address distributed intelligence comprises the start address and the end address of process scheduling code and data, so their size can be calculated.Each district among the SPM all is the piece formation by the size of 4K (consistent with the block size of main memory), so when being code area and data field distribution space, be unit with the piece.
2) extraction of process scheduling code and data and tissue:
Embedded type operating system process scheduling code and data are not to be present in the unique file in common source code tissue, and promptly the process scheduling code is with in the middle of data may be distributed in the different multiple source file of quantity.This has just caused code relevant with process scheduling and DATA DISTRIBUTION not to be concentrated, and can be not easy to load and concentrate loading code and data to arrive the memory headroom of appointment in different logical space zones after compiling.Fig. 3 is conventional embedded OS compilation of source code condition diagram, compiling forms the binary image file to the embedded OS source code through cross-compiler among the figure, but code and the data relevant with process scheduling such as process priority table wherein, process switching code, process control block (PCB) are dispersed in the different address spaces.
In order to concentrate code relevant in the embedded OS and data, need extract correlative code and data from the relevant portion of operating system, and they are focused in two files with process scheduling.In these two files, a file is deposited the code of embedded type operating system process scheduling module specially, another file is deposited the data of embedded type operating system process scheduling module specially, and these two files also are to need compiler that it is compiled as the embedded OS source file.But such organizational form just can make full use of the function of cross-compiler, and source file is carried out the addressing compiling.
Code and data that different embedded OSs is relevant with process scheduling are different, and this need study embedded OS.Disclosed embedded OS UCOS-II is an example with source code, the code relevant with process scheduling is in files such as os_task.c, os_core.c, and data are in files such as ucos-II.h, therefore, need from the file that contains correlative code, isolate all correlative codes and data, set up file storage respectively.In two files, one is the code source file, and one is data source file.Two files can addressed compiling in compiler.
Extraction process during actual the realization both can be manual, also can be assisted to carry out by Software tool.The manual extraction read source code and analyzed extraction by the programmer.It is under the help of Software tool the code and the data pick-up of embedded type operating system process scheduling module to be come out that Software tool assists to carry out this.
3) compiler addressing compiling:
Compiler is responsible for the embedded OS source code is compiled as binary file as required, and the address of the instruction and data in this binary file is to calculate according to the requirement of way of compiling control file.So, can obtain by the compiler option output information file is set usually so compiler will clearly obtain the code situation of whole procedure part.Program loader is loaded into assigned address by the program address space distribution information with program.
As shown in Figure 4, the way of compiling control file comprises information such as source filename, start address, peak excursion.Wherein source filename is the filename of source code.Start address is exactly the internal memory start address that source module need be compiled to.Peak excursion is the bulk that source file is compiled as binary image.In the addressing compilation phase, this start address value is and passes through SPM cross-reference that organizational planning crosses.Promptly the start address here and SPM planned be used for as the initial value in the space of process scheduling module running environment consistent.Via the guidance of way of compiling control file, cross-compiler is a binary file with compilation of source code, and the way of compiling control file has determined the address of each module in the binary file to distribute.Compiled binary operation system image file according to the address distributed intelligence, is loaded into the specified memory space by program loader, like this could normal operation.Therefore the process scheduling module of embedded OS is addressed to assigned address.Wherein, the code of the process scheduling module of embedded OS is addressed to the process scheduling code area, and the data of the process scheduling module of embedded OS are addressed to the process scheduling data field.

Claims (1)

1. method for optimizing embedded type operating system process scheduling based on SPM is characterized in that:
1) SPM tissue:
With the piece is unit, and SPM is divided into process scheduling code area, process scheduling data field and expansion area;
2) extraction of process scheduling code and data and tissue:
Extract correlative code and data from the relevant portion of operating system, and they are focused in two files; A file is deposited the code of embedded type operating system process scheduling module specially, and another file is deposited the data of embedded type operating system process scheduling module specially;
Extraction process or is assisted to carry out by Software tool by hand; The manual extraction read source code and analyzed extraction by the programmer; It is under the help of Software tool the code and the data pick-up of embedded type operating system process scheduling module to be come out that Software tool assists to carry out this;
3) compiler addressing compiling:
Via the guidance of way of compiling control file, cross-compiler is a binary file with compilation of source code, and the way of compiling control file has determined the address of each module in the binary file to distribute.The process scheduling module of embedded OS is addressed to assigned address.Wherein, the code of the process scheduling module of embedded OS is addressed to the process scheduling code area, and the data of the process scheduling module of embedded OS are addressed to the process scheduling data field.
CNA2008100611353A 2008-03-11 2008-03-11 Method for optimizing embedded type operating system process scheduling based on SPM Pending CN101251810A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008100611353A CN101251810A (en) 2008-03-11 2008-03-11 Method for optimizing embedded type operating system process scheduling based on SPM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008100611353A CN101251810A (en) 2008-03-11 2008-03-11 Method for optimizing embedded type operating system process scheduling based on SPM

Publications (1)

Publication Number Publication Date
CN101251810A true CN101251810A (en) 2008-08-27

Family

ID=39955210

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008100611353A Pending CN101251810A (en) 2008-03-11 2008-03-11 Method for optimizing embedded type operating system process scheduling based on SPM

Country Status (1)

Country Link
CN (1) CN101251810A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495760A (en) * 2011-10-20 2012-06-13 江西省南城县网信电子有限公司 Method for optimizing embedded system based on process scheduling
CN102890658A (en) * 2012-11-07 2013-01-23 武汉科技大学 Scratch pad memory (SPM)-based input/output buffer implementation method based in embedded system
CN103677717A (en) * 2013-12-20 2014-03-26 武汉科技大学 3D picture display optimization achieving method oriented to mobile intelligent terminal
CN104714834A (en) * 2013-12-14 2015-06-17 中国航空工业集团公司第六三一研究所 Space-determined task scheduling method
CN103677717B (en) * 2013-12-20 2016-11-30 武汉科技大学 A kind of 3D picture display optimization implementation method towards mobile intelligent terminal
CN106325822A (en) * 2016-08-25 2017-01-11 江苏绿扬电子仪器集团有限公司 Method for improving DSP (digital signal processor) operation performance
CN111966472A (en) * 2020-07-02 2020-11-20 佛山科学技术学院 Process scheduling method and system for industrial real-time operating system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495760A (en) * 2011-10-20 2012-06-13 江西省南城县网信电子有限公司 Method for optimizing embedded system based on process scheduling
CN102890658A (en) * 2012-11-07 2013-01-23 武汉科技大学 Scratch pad memory (SPM)-based input/output buffer implementation method based in embedded system
CN102890658B (en) * 2012-11-07 2016-03-02 武汉科技大学 Based on the input and output buffering implementation method of SPM in a kind of embedded system
CN104714834A (en) * 2013-12-14 2015-06-17 中国航空工业集团公司第六三一研究所 Space-determined task scheduling method
CN103677717A (en) * 2013-12-20 2014-03-26 武汉科技大学 3D picture display optimization achieving method oriented to mobile intelligent terminal
CN103677717B (en) * 2013-12-20 2016-11-30 武汉科技大学 A kind of 3D picture display optimization implementation method towards mobile intelligent terminal
CN106325822A (en) * 2016-08-25 2017-01-11 江苏绿扬电子仪器集团有限公司 Method for improving DSP (digital signal processor) operation performance
CN111966472A (en) * 2020-07-02 2020-11-20 佛山科学技术学院 Process scheduling method and system for industrial real-time operating system
CN111966472B (en) * 2020-07-02 2023-09-26 佛山科学技术学院 Process scheduling method and system of industrial real-time operating system

Similar Documents

Publication Publication Date Title
Cooper-Balis et al. Fine-grained activation for power reduction in DRAM
CN100573474C (en) The method and system of the cache memory bank selection of power optimization is provided
US9244883B2 (en) Reconfigurable processor and method of reconfiguring the same
CN100407102C (en) Software-based control of microprocessor power dissipation
CN100549945C (en) In the embedded system based on the implementation method of the instruction buffer of SPM
CN102073596B (en) Method for managing reconfigurable on-chip unified memory aiming at instructions
CN101739358B (en) Method for dynamically allocating on-chip heterogeneous memory resources by utilizing virtual memory mechanism
CN201540564U (en) Dynamic distribution circuit for distributing on-chip heterogenous storage resources by utilizing virtual memory mechanism
CN101763316B (en) Method for dynamically distributing isomerism storage resources on instruction parcel based on virtual memory mechanism
CN101346701A (en) Reducing number of memory bodies under power supply
CN1720494A (en) Register file gating method to reduce microprocessor power dissipation
Cui et al. DTail: a flexible approach to DRAM refresh management
CN101251810A (en) Method for optimizing embedded type operating system process scheduling based on SPM
CN103246542A (en) Intelligent cache and intelligent terminal
Davis Modern DRAM architectures
CN100377086C (en) Method for realizing operating procedure directly from file system in embedded system
KR20170127948A (en) Memory module and system including the same
CN112434025A (en) Method, system, device and medium for optimizing index persistence
CN1145887C (en) Status bits for cache memory
CN102567220A (en) Cache access control method and Cache access control device
Siddique et al. Lmstr: Local memory store the case for hardware controlled scratchpad memory for general purpose processors
CN116149554B (en) RISC-V and extended instruction based data storage processing system and method thereof
CN101853209B (en) Method for managing network node memory of wireless sensor
Wehmeyer et al. Fast, Efficient and Predictable Memory Accesses
CN105404591A (en) Processor system and storer control method for same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20080827