CN100470482C - Method of initializing multiple devices using job scheduler - Google Patents

Method of initializing multiple devices using job scheduler Download PDF

Info

Publication number
CN100470482C
CN100470482C CNB2004101017133A CN200410101713A CN100470482C CN 100470482 C CN100470482 C CN 100470482C CN B2004101017133 A CNB2004101017133 A CN B2004101017133A CN 200410101713 A CN200410101713 A CN 200410101713A CN 100470482 C CN100470482 C CN 100470482C
Authority
CN
China
Prior art keywords
initialization
job
state
initialized
work
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.)
Expired - Fee Related
Application number
CNB2004101017133A
Other languages
Chinese (zh)
Other versions
CN1637711A (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.)
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics Co Ltd
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 Samsung Electronics Co Ltd filed Critical Samsung Electronics Co Ltd
Publication of CN1637711A publication Critical patent/CN1637711A/en
Application granted granted Critical
Publication of CN100470482C publication Critical patent/CN100470482C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Abstract

Provided is a method of initializing multiple devices using a job scheduler. The method includes determining whether the devices to be initialized satisfy requirements for initialization, performing an initialization job on a device that has satisfied the requirements for initialization, determining whether another device that has satisfied the requirements for initialization exists, and performing the above-described steps until the initialization of all other devices has finished.

Description

Use the method for the many devices of scheduling program initialization
Technical field
The present invention relates to apparatus for initializing, more particularly, a kind of providing is provided is designed to use the scheduling technology method of the means of the many devices of initialization effectively.
Background technology
The products that comprise many devices increase at large, so and must will install initialization successively owing to product characteristics is the service of generator.
In addition, because product becomes complicated and huge day by day, the quantity of the type of the device of composition product and device increases.Therefore, when determining the value of product, the device initialization process has become more important.Thereby, install initialized crucial purpose and be in the possible shortest time, to carry out stable initialization.
Fig. 1 is the process flow diagram of example of the processing of the traditional apparatus for initializing of expression.
Provide the single device of the predetermined function of specific service for execution, device driver must stand to be used to drive the initialization process of this device before this device is ready to its service is provided.
That is to say, when by the device driver (step S100) of starting of embedded operation system control device, check to require to satisfy whether (step S110) to determine these installing initialized hardware and/or software requirement.If initialization requires not satisfy, then device driver remains on stand-by state and whether satisfied device is periodically checked to observe those requirements.If it is satisfied to be somebody's turn to do requirement, then initial value (step S120) is set according to this requirement.Then, carry out to check that whether to be the initialization of device driver be provided with all initial values (step S130) to observe.If all initial values are set up, then device is initialised to enter stand-by state before related service is provided.That is to say, carry out service standby initialization (step S140).Then, the device initialization process stops (step S150).On the other hand, be set up (step S130), then handle to turn back to and check initialization requirement (step S110) if not all initial values.
Fig. 2 is the process flow diagram of the example of the traditional initialization of the expression processing of installing more.
When triangular web comprised many devices, all installed so that the initialized reservation service that needs each device to be provided for this system initialization successively.For example, when when comprising three devices A, B and C in system as shown in the step S210-S230 of Fig. 2, device A, B and C are by initialization sequentially.
The specific nonrestrictive example of device initial method can be that sequentially to carry out various device drivers initialized based on the linux kernel in the linux system of x86 with actuating unit.In this case, each device driver module is surveyed the device that it is supported, this device of its initialization is also in a predefined manner to linux kernel registration related service then.Because be initialised by all device driver modules are repeated all devices of above-mentioned processing, so this processing needs a few minutes to guide.
Therefore, clear as can be known from Fig. 1 and 2, when each device was initialised, traditional device initialization process all stood cpu idle time of causing because of the execution in step S110 of latent period and repetition and step S130.Because the plenty of time is used to the initialization device slower than CPU, so cpu idle time increases, this has reduced the efficient of device initialization process again.Therefore, wish very much to have the many devices of a kind of initialization effectively and the method for not wasting cpu resource.
Summary of the invention
The invention provides a kind of use the scheduling technology effectively initialization be included in the method for the many devices in the system.
An aspect of of the present present invention provides a kind of method of using the many devices of scheduling program initialization.This method comprises: determine whether the device that will be initialised satisfies initialized requirement; About satisfying the device of initialized requirement is carried out initial work; Determine whether to exist another device that satisfies initialized requirement; Finish up to the initialization of every other device with the execution above-mentioned steps.Determine that the step whether device satisfies initialized requirement can comprise: the scheduling table of the device that will be initialised that registered in advance is all.Preferably and optionally, determine this scheduling table based on information about the CPU time that is used for initial work of distributing.
The step of carrying out initial work can comprise: for the device that satisfies initialized requirement is provided with preassigned initial value; Check whether all initial values are set up, and if all initial values be set up, then carry out initialization before related service is provided, to enter stand-by state.Preferably and optionally, this method also comprises: deletion has been initialised with the scheduling information of the device that entered stand-by state before related service is provided.
This method also can comprise: even be set up about the not every initial value of current device, also carry out the initial work that has satisfied another device of initialized requirement.
Description of drawings
The description that its exemplary embodiment is carried out in conjunction with the drawings, above and other characteristics of the present invention and advantage will become clear, wherein:
Fig. 1 is the process flow diagram of example of the processing of the traditional apparatus for initializing of expression;
Fig. 2 is the process flow diagram of the example of the traditional initialization of the expression processing of installing more;
Fig. 3 is the diagrammatic sketch of expression according to the scheduling method of the embodiment of the invention;
Fig. 4 is the process flow diagram of expression according to whole processing of the apparatus for initializing of the embodiment of the invention;
Fig. 5 is that expression is carried out the process flow diagram of initialized processing according to the embodiment of the invention by the scheduling program; With
Fig. 6 is the process flow diagram of expression according to the processing of the apparatus for initializing of the embodiment of the invention.
Embodiment
Now with reference to accompanying drawing the methods of installing according to the initialization of exemplary embodiment of the present invention are described more.
Fig. 3 is the diagrammatic sketch of expression according to the scheduling method of the embodiment of the invention.
In Fig. 3, each little square is represented the wherein least unit of the time of CPU work.Below, foursquare width is called as " ticktack (tick) ".
In addition, each vertically is decorated with the CPU execution time that hatched square representative is used for apparatus for initializing A, each flatly is decorated with the CPU execution time that hatched square representative is used for apparatus for initializing B, and each does not have hatched square to represent cpu idle time.For example, in Fig. 3, when apparatus for initializing A, CPU execution time and cpu idle time are respectively 5 and 9 ticktacks.When apparatus for initializing B, CPU execution time and cpu idle time all are 5 ticktacks.
When using traditional method,, are 24 ticktacks (14 ticktacks (device A) add 10 ticktacks (device A)) so be used for the CPU time of two devices of initialization because the initialization of device B is followed in the initialized back of device A.
Yet in the present invention, the cpu idle time during each device initialization process is suitably used to reduce the initialization time amount.That is to say that when using scheduling as shown in FIG. 3, the initialized CPU time that is used for of cost is 14 ticktacks, this is than fast 10 ticktacks of conventional art.
Fig. 4 is the process flow diagram of expression according to whole processing of the apparatus for initializing of the embodiment of the invention.
Form each device of particular system for initialization, carry out that the required information of initialization is registered in the physical storage areas in this particular system or the independent database of realizing by software in (step S410).This information can comprise device identification, the information about initiation parameter, initialization command, initialized particulars and other information.
Use the information of this registration, system CPU is indicated the scheduling program executing apparatus initial work that is realized by software then.Then, the device initial work stops (step S430).When system start-up, the scheduling program can be used as background processor work.
The example of the data structure related with initial work comprises: enumerated data type (job_state), the duty that representative is enumerated; And structured data type (device_job), representative is used for the initialized working unit of device (unit jobs).
That is to say that enumerated data type job_state may be defined as:
enum?job_state={hold,do,drop,done,fail}
Wherein, ' hold ' represents the state that function ' do ' wherein can't be performed, ' do ' is the state that wherein definite do_func can be performed in structured data type device_job, ' drop ' wherein installs not exist or disabled state, and ' fail ' wherein installs the state that initialization has been failed.
Structured data type device_job also can be defined as follows:
struct?device_job{
priority_level?level;
job_state?lastJobState;
job_state(*decide_func)(device_job?&);
unsigned?long?decide_timeout;
job_state(*do_func)(device_job?&);
unsigned?long?do_timeout;
};
Here, ' level ' represents the priority ranking of initial work, and ' lastJobState ' is the job_state data type of the last duty of indication device_job, and ' (* decide_func) (device_job; ) ' be the job_state data type that the pointer of the function of determining duty is pointed in representative.' decide_timeout ' is the maximum time length in microsecond that work rests on ' hold ' state, ' (* do_func) (device_job ﹠amp; ) ' be the job_state data type that the pointer of the function that will be performed in the time of will being ' do ' is in working order pointed in representative.The state of the work that just is being performed at this moment, also is determined.The maximum time length that on behalf of do_func, ' do_timeout ' be performed in microsecond.
To use above-mentioned data structure to describe the initialized example of dish device now.
The dish device driver remains on ' hold ' state, surpasses minimum rotations per minute (RPM) on request up to the disk drive rotating speed.If satisfied the RPM requirement, then use direct memory access (DMA) (DMA) to read superblock.Then, if the particulars that read from this superblock are satisfied, this dish is installed then.
If initialization routine is defined as ' module_init ', it is as follows then to carry out the initial registration that is used for initialized device work in ' module_init ' routine:
int?module_init(void)
{
device_job*dj;
/ * Priority_level is 10, and decide_func is isSpinUp, and decide_timeout is 4secs,
Do_func is doReadSuperBlock, and do_timeout be 1msec*/
dj=addDeviceJob(10,isSpinUp,4000000,doReadSuperBlock,1000);
return0;
}
In this case, decide_func and do_func can be achieved as follows:
Char DmaBuffer[BLOCK_SIZE]; / * be used to the impact damper * that uses DMA to read dish/
job_state?isSpinUp(device_job&DJ)
{
If/* is as the result who surveys, disk drive does not exist yet and is not supported, and then turns back to drop
State */
if(!ProbeDiscDrive())return?drop;
If/* RPM does not reach minimum SpinUpRPM, then turn back to the hold state, otherwise, return
To do state */
if(regRPM<MinSpinUpRPM)return?hold;
else?returndo;
}
job_state?doReadSuperB?lock(device_job?&?DJ)
{
/ * drives DMA so that piece 0 (superblock) is read in DmaBuffer.*/
if(initiateDMA(DmaBuffer,0)){
If/* DMA reads success is set, then definite next decide_func and do_func also return
To hold state */
setDeviceJob(11,DJ,DMADone,100000,doMount,1000000);
/ * Priority_level is 11, and decide_func is DMADone, and decide_timeout is 100
Msecs, do_func are doMount, and do_timeout be 1sec*/
return?hold;
Else return drop; If/* its failure, then turn back to drop state */
}
job_state?isDMADone()
{
If (isDoneDMA ()) return do; If/* DMA transmission is finished, then turn back to do state */
Else hold; If it does not also finish/*, then turn back to hold state */
}
job_state?doMount()
{
If/* reads the particulars display disc of DmaBuffer and successfully installed, then turn back to
Done state */
if(mount(DmaBuffer))return?done;
Else return fail; If this dish of/* fails to be mounted, then turn back to fail state */
}
What Fig. 5 was expression according to the embodiment of the invention carries out the process flow diagram of the processing of initial work (step S420) by the scheduling program.
In order to carry out initial work, at first, determine whether to exist the work of satisfying the initialized requirement of actuating unit (step S510).All devices are checked that this requirement is to determine whether they are satisfied.This requirement comprises the condition that all can be realized in software, produce such as logical expression, time and random number.
Preferably and optionally, device driver determines whether be satisfied carrying out initialized requirement.The processing that is used for initialized registration device_job is described below:
List DJL; The tabulation * of the right of priority link of/* device_job/
device_job*addDeviceJob(priority_level?level,
job_state(*decide_func)(device_job?&),
unsigned?long?decide_timeout,
job_state(*do_func)(device_job?&);
unsigned?long?do_timeout)
{
device_job*nDJ=new?device_job;
nDJ->level=level;
nDJ->decide_func=decide_func;
nDJ->decide_timeout=decide_timeout;
nDJ->do_func=do_func;
nDJ->do_timeout=do_timeout;
DJL.addlist (nDJ); / * with the newcomer add to device_job tabulation */
return?nDJ;
}
Simultaneously, provide the processing that is used for carrying out practically initial work below:
While (! DJL.isEmpty ())/* carries out continuously, up to there not being device_job to be retained in tabulation
Middle */
{
device_job*DJ;
/ * obtains will be according to the device worker with highest priority of level of priority and dispatching method execution
Do */
DJ=DJL.getDeviceJob();
/ * install WatchDog Timer with check decide timeout*/
WD=setWatchDog(getCurrentTime(),DJ->decide_timeout,
decide_timeout_handler());
/ * carry out decide_func be provided with a last duty */
DJ->lastJobState=DJ->decide_func(*DJ);
DO_STATE:
switch(DJ->lastJob?State)
{
Case hold :/* is at the hold state, except make WatchDog Timer do nothing overtime */
break;
case?do:
DeleteWatchDog (WD); / * deletion house dog */
WD=setWatchDog(getCurrnetTime(),DJ->do_timeout,
do_timeout_handler());
/ * carry out do_func be provided with a last duty */
DJ->lastJobState=DJ->do_func(*DJ);
Goto DO_STATE; / * forward to DO_STATE routine */
case?drop:
case?done:
case?fail:
Default :/* under drop, done, fail or other situation, from tabulation deletion device_job*/
DeleteWatchDog (WD); / * deletion house dog */
DJL.removeList (DJ); / * from the current device_job* of device_job tabulation deletion/
break;
}/*switch*/
}/*while*/
After the work of initialization requirement has been satisfied in definite existence, the work that selection will be performed according to the scheduling agreement from the work of satisfying this requirement.Can use the initial work information (step S410) or the device information that are retained in intrasystem registration to formulate the scheduling agreement, perhaps the scheduling agreement can be specific to operating system.For example, can select first work of meeting the demands.In addition, can formulate the scheduling agreement by known dispatching method.
Selected in case work (step S520), then carry out the work of selecting (step S530), if any the initial work that is performed is retained in (step S540) in the scheduling program, then this processing determines whether to exist the work of satisfying initialized requirement (step S510) then.
Fig. 6 is the process flow diagram of expression according to the processing of the apparatus for initializing of the embodiment of the invention.
Specifically, for the work (the step S530 among Fig. 5) of carrying out selection, preassigned initial value is set up (step S610), is examined then to determine whether that the work of current selection is provided with all initial values (step 620).In this case, can be by all possible description of program execution, comprise distribution, the address that the position of branch will occur, the predetermined equations of the function that will carry out by device driver and comprise the script of particulars of the work of execution, can be designated in initial value is provided with.If the work to current selection is provided with all initial values (step 620), then this device is initialised to enter stand-by state (step S630) before related service is provided.Then, work at present is by deletion (step S640) from the scheduling program.Be set up (step 620) if not all initial values, required requirement and the initial value setting of initialization of then carrying out next device is assigned to scheduling program (step S650).
The invention provides a kind of method of using the many devices of scheduling program initialization, when having the system start-up of many devices, reduce initialization time effectively thus.Therefore, cpu resource is not wasted because of the cpu idle time that occurs when initialization is installed more.
Although represent particularly and described the present invention with reference to its exemplary embodiment, but will be understood by those skilled in the art that, under the situation that does not break away from the spirit and scope of the present invention that are defined by the following claims, can carry out the various modifications of form and details to it.

Claims (4)

1, a kind of method of initialization multiple arrangement comprises:
Determine whether this multiple arrangement satisfies initialized requirement;
About satisfying first device of initialized requirement is carried out initial work;
Determine whether to exist second device that satisfies initialized requirement; With
Carrying out the initialization of all devices of all above-mentioned steps in this multiple arrangement finishes;
Wherein, determine that the step whether multiple arrangement satisfies initialized requirement comprises: the scheduling table of the device that will be initialised that registered in advance is all, the scheduling table is determined based on the information about the CPU time that is used for initial work of distributing.
2, the step of the method for claim 1, wherein carrying out initial work comprises:
Be that first device is provided with initial value;
Check whether all initial values are set up; With
If all initial values are set up, then initialization first device is to enter stand-by state before service is provided.
3, method as claimed in claim 2 also comprises: be initialised with after entering stand-by state the scheduling information of deletion first device at first device.
4, method as claimed in claim 2 also comprises: if the not every initial value of first device is set up, then carry out the initial work of second device.
CNB2004101017133A 2003-12-23 2004-12-23 Method of initializing multiple devices using job scheduler Expired - Fee Related CN100470482C (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR1020030095617A KR101017372B1 (en) 2003-12-23 2003-12-23 Method for initializing a plurality of devices using job-scheduler
KR95617/2003 2003-12-23
KR95617/03 2003-12-23

Publications (2)

Publication Number Publication Date
CN1637711A CN1637711A (en) 2005-07-13
CN100470482C true CN100470482C (en) 2009-03-18

Family

ID=34709256

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004101017133A Expired - Fee Related CN100470482C (en) 2003-12-23 2004-12-23 Method of initializing multiple devices using job scheduler

Country Status (3)

Country Link
US (1) US7376822B2 (en)
KR (1) KR101017372B1 (en)
CN (1) CN100470482C (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7500091B2 (en) * 2005-11-30 2009-03-03 Microsoft Corporation Delay start-up of applications
EP1944690A3 (en) 2006-12-19 2009-05-20 Continental Automotive GmbH Method, device and system
KR101366802B1 (en) * 2007-01-05 2014-02-21 삼성전자주식회사 Method and apparatus for scheduling tasks in Real-Time Operating System
EP2625598A4 (en) * 2011-11-28 2014-01-15 Lg Electronics Inc Method, recording medium, and electronic device for reducing boot time
CN105247442B (en) * 2013-06-28 2018-06-08 英特尔公司 For managing the technology and system of the activity in multi-part platform
EP3167363B1 (en) * 2014-07-10 2020-12-16 Harman International Industries, Incorporated Operating system startup acceleration
DE102015205378A1 (en) * 2015-03-25 2016-09-29 Volkswagen Aktiengesellschaft Information and entertainment system for a vehicle

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6763454B2 (en) * 1994-05-27 2004-07-13 Microsoft Corp. System for allocating resources in a computer system
KR100249060B1 (en) * 1997-03-11 2000-03-15 구자홍 The method of initialization for tape device driver
US6453470B1 (en) 1999-09-30 2002-09-17 General Instruments Corporation Dynamic detection of hardware configuration in a digital terminal
US6748457B2 (en) * 2000-02-03 2004-06-08 Realtime Data, Llc Data storewidth accelerator
JP2001306307A (en) 2000-04-25 2001-11-02 Hitachi Ltd Method for processing firmware
JP2002149281A (en) 2000-11-15 2002-05-24 Matsushita Electric Ind Co Ltd Method for initializing device
JP3574078B2 (en) 2001-03-16 2004-10-06 東京エレクトロンデバイス株式会社 Storage device and storage device control method
JP2003084981A (en) 2001-09-11 2003-03-20 Seiko Epson Corp Booting method for information processor
US7266727B2 (en) * 2004-03-18 2007-09-04 International Business Machines Corporation Computer boot operation utilizing targeted boot diagnostics
US20050245273A1 (en) * 2004-04-30 2005-11-03 Samsung Electronics Co., Ltd. Method and system for managing provider service availability in a wireless network

Also Published As

Publication number Publication date
KR101017372B1 (en) 2011-02-28
KR20050064262A (en) 2005-06-29
CN1637711A (en) 2005-07-13
US7376822B2 (en) 2008-05-20
US20050149938A1 (en) 2005-07-07

Similar Documents

Publication Publication Date Title
US6959433B1 (en) Data processing system, method, and program for automatically testing software applications
US6779134B1 (en) Software test system and method
US7783909B2 (en) Method, computing system, and computer program for reducing power consumption of a computing system by relocating jobs and deactivating idle servers
US6591358B2 (en) Computer system with operating system functions distributed among plural microcontrollers for managing device resources and CPU
CN100378670C (en) Apparatus and method for updating I/O capability of a logically-partitioned computer system
CN103019802A (en) Virtual machine management method and virtual machine management platform
EP0474059A2 (en) User interface for operating a computer processor
CN100470482C (en) Method of initializing multiple devices using job scheduler
US7257677B2 (en) Data image cache used in testing
JP4305475B2 (en) Computer system, management computer, and computer selection method
CN111045789B (en) Virtual machine starting method and device, electronic equipment and storage medium
US6598105B1 (en) Interrupt arbiter for a computing system
US7398384B2 (en) Methods and apparatus for acquiring expansion read only memory size information prior to operating system execution
US7152189B2 (en) Testing distributed services by using multiple boots to timeshare a single computer
CN103218335A (en) Usb multi-function device and method thereof
JP6051798B2 (en) Firmware verification system, firmware verification method, and firmware verification program
CN111930502A (en) Server management method, device, equipment and storage medium
KR102292211B1 (en) Electronic device
Arndt et al. Batch Queueing in the WINNER Resource Management System.
CN111741130A (en) Server management method, device, equipment and storage medium
JP2006012158A (en) Method and apparatus for providing extendable interaction between firmware and operating systems on digital devices
US20090037584A1 (en) Methods of creating a voting stop point on a distributed network
JP2006178663A (en) Information processor, method for processing information, verification apparatus, and method of verification
JP2006134025A (en) Data setting device
JP2006039669A (en) Information processing device and method therefor

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090318

Termination date: 20141223

EXPY Termination of patent right or utility model