The content of the invention
In view of the above problems, it is proposed that the present invention, overcome above mentioned problem or solve at least in part to provide one kind
The method and apparatus of the electronic device system Acceleration of starting of above mentioned problem.
According to the first aspect of the present invention, there is provided the method that a kind of electronic equipment os starting accelerates, including with
Lower step:When electronic equipment starts, pre-read thread is created, started from the disk of electronic equipment with using pre-read thread
Read the pre-defined pre-reading data for os starting;The pre-reading data that pre-read thread reads is cached to
In the internal memory of electronic equipment, read during for os starting;And during os starting, using pre-reading line taking
Cheng Jixu reads pre-reading data, and when receiving operating system and reading the request of data from disk, what is pre-defined
The reading of pause pre-read thread in time period.
Alternatively, in the method for electronic device system Acceleration of starting according to an embodiment of the invention, also include
Step:The information of os starting is recorded, and based on information and for one or many os starting before
Pre-defined pre-reading data, generates the pre-defined of one or many os starting for after and pre-reads access
According to, and the priority read when starting according to system is ranked up to the data in the pre-defined pre-reading data.
Alternatively, in the method for electronic device system Acceleration of starting according to an embodiment of the invention, also include
Step:The situation of data movement during detection disk defragmentation, and situation about being moved according to data, regenerate for after
The pre-defined pre-reading data of one or many os starting.
Alternatively, in the method for electronic device system Acceleration of starting according to an embodiment of the invention, operation system
The information for starting of uniting include the os starting time, the operating system that are spent read from internal memory cached pre-read access
According to situation.
Alternatively, in the method for electronic device system Acceleration of starting according to an embodiment of the invention, using pre-
Reading the step of thread reads pre-reading data includes:In the case where being spaced less than or equal to pre-defined read access time,
Two files are read simultaneously according to disk sort and disk skew using two read requests;And more than pre-defined reading
In the case of taking time interval, the time sequencing that file is processed during using two read requests according to os starting is successively read
Take two files.
Alternatively, in the method for electronic device system Acceleration of starting according to an embodiment of the invention, also include
Step:When receiving operating system the request of data being read from disk, after the pre-defined time period, in operating system
In the case of not getting data from disk, using pre-read thread read data, and by data buffer storage to internal memory for
Operating system reads.
Alternatively, in the method for electronic device system Acceleration of starting according to an embodiment of the invention, also include
Step:When receiving operating system the request of data being read from disk, after the pre-defined time period, behaviour is being detected
Make system still in the case where the continuous data of address offset are read, keep the reading of the pause pre-read thread, Zhi Daojian
Measure operating system and read the discontinuous data of address offset.
Alternatively, in the method for electronic device system Acceleration of starting according to an embodiment of the invention, also include
Step:When detecting operating system and carrying out self-inspection to disk, suspend the pre-read thread and read the pre-reading data, directly
Terminate to disk self-inspection is detected.
Alternatively, in the method for electronic device system Acceleration of starting according to an embodiment of the invention, also include
Step:When receiving operating system the request of data being read from disk, to be read from disk operating system is detected
Data in be partly comprised in the pre-reading data in the case of, by the data buffer storage of this part to internal memory for behaviour
Make system reading;And after the pre-defined time period, the data of other parts are not got from disk in operating system
In the case of, the data of the other parts are read using pre-read thread, and by the data buffer storage of the other parts in
So that operating system reads in depositing.
According to the second aspect of the present invention, there is provided the device that a kind of electronic equipment os starting accelerates, including:In advance
Read module, for when electronic equipment starts, creating pre-read thread, is started from electronic equipment with using pre-read thread
The pre-defined pre-reading data for os starting is read in disk;Cache module, for pre-read module to be read
The pre-reading data for taking is cached in the internal memory of electronic equipment, is read during for os starting, and pre-read module is in operation
In system starting process, continue to read pre-reading data using pre-read thread, and receive operating system and read from disk
During the request of evidence of fetching, the reading of pre-read thread is suspended within the pre-defined time period.
Alternatively, in the device of electronic device system Acceleration of starting according to an embodiment of the invention, also include:
Pre-reading data generation module, the information for recording os starting, and based on information and for before once or
The pre-defined pre-reading data that multi-pass operation system starts, generates for the pre- of one or many os starting afterwards
The pre-reading data for first defining.
Alternatively, in the device of electronic device system Acceleration of starting according to an embodiment of the invention, also include:
Disk fragmentses arrange detection module, the situation of data movement, pre-reading data generation module during for detecting disk defragmentation
The situation of the data movement that detection module is detected is arranged according to disk fragmentses, the one or many operation for after is regenerated
The pre-defined pre-reading data that system starts.
Alternatively, in the device of electronic device system Acceleration of starting according to an embodiment of the invention, operation system
The information for starting of uniting include the os starting time, the operating system that are spent read from internal memory cached pre-read access
According to situation.
Alternatively, in the device of electronic device system Acceleration of starting according to an embodiment of the invention, pre-read
Module is used for:In the case where being spaced less than or equal to pre-defined read access time, using two read requests according to disk
Sequence and disk offset and read two files simultaneously;And in the case where being spaced more than pre-defined read access time, utilize
The time sequencing that file is processed when two read requests are according to os starting successively reads two files.
Alternatively, in the device of electronic device system Acceleration of starting according to an embodiment of the invention, pre-read
Module is used for when receiving operating system and reading the request of data from disk, after the pre-defined time period, is operating
In the case that system does not get data from disk, data are read using pre-read thread, and cache module is used for number
According to be cached in internal memory for operating system read.
Alternatively, it is described pre- in the device of electronic device system Acceleration of starting according to an embodiment of the invention
Read module when receiving operating system the request of data being read from disk, after the pre-defined time period, in detection
To operating system still in the case where the continuous data of address offset are read, the reading of the pause pre-read thread is kept, directly
The discontinuous data of address offset are read to operating system is detected.
Alternatively, it is described pre- in the device of electronic device system Acceleration of starting according to an embodiment of the invention
Read module when detecting operating system and carrying out self-inspection to disk, suspend the pre-read thread read described in pre-read access
According to terminating until detecting disk self-inspection.
Alternatively, it is described pre- in the device of electronic device system Acceleration of starting according to an embodiment of the invention
Read module will be read operating system is detected when receiving operating system the request of data being read from disk from disk
In the case of being partly comprised in the pre-reading data in the data for taking, by the data buffer storage of this part to internal memory for
Operating system reads;And after the pre-defined time period, the number of other parts is not got from disk in operating system
In the case of, the pre-read module reads the data of the other parts using pre-read thread, and will described other portions
Point data buffer storage in internal memory so that operating system reads.
The invention provides the method and apparatus of above-mentioned electronic device system Acceleration of starting.Implementation of the invention
Example, can create pre-read thread when electronic equipment starts, before os starting, as early as possible open operating system
Move required digital independent out, and used when being cached in internal memory for os starting, it is to avoid disk requests teams
Row obstruction, so that os starting accelerates;Embodiments in accordance with the present invention, can be by once or minority is several times from disk
In read out os starting needed for pre-reading data, be merged into a data block and be cached in internal memory, accelerate
The speed of os starting;Embodiments in accordance with the present invention, pre-read thread reads data and operating system from disk
Data are read from internal memory can be carried out simultaneously, the time needed for reducing os starting;Embodiments in accordance with the present invention,
Data and operating system from disk are read from internal memory by reading data, operating system from disk to pre-read thread
The appropriate arrangement of the middle request for reading data, and pause pre-read thread reads data from disk when needed, is operation
System reads data and gives way from disk, can realize quickly reading data, while meeting the timing of operation requests.
Described above is only the general introduction of technical solution of the present invention, in order to better understand technological means of the invention,
And can be practiced according to the content of specification, and in order to allow the above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by specific embodiment of the invention.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.Conversely, there is provided these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure
Complete conveys to those skilled in the art.
In an embodiment of the present invention, electronic equipment can be computer, mobile phone, panel computer, video player,
Electronic reader, DPF etc..Principle of the invention is applied to the operating system of any electronic equipment, including but not limited to:
The desktop operating systems such as Windows, Linux, Mac OS, Unix of computer;Mobile phone, panel computer, video player,
The Mobile operating system such as electronic reader, iOS, Android, Windows Phone, Symbian of DPF.
Hereinafter, by the example using computer as electronic equipment, using Windows as the example of operating system, it is right
Principle of the invention is illustratively described.However, this is intended merely to describe the present invention with specific example, to help reader
Understand principle of the invention, the scope of the present invention not limited to this, but go for any electronic equipment and any operation system
System.
Fig. 1 shows the flow chart of the method for electronic device system Acceleration of starting according to an embodiment of the invention.
As shown in figure 1, methods described 100 starts from step S110, in step s 110, when electronic equipment starts, create
Pre-read thread, is determined with starting to be read from the disk of electronic equipment using pre-read thread for the advance of os starting
The pre-reading data of justice.
Embodiments in accordance with the present invention, can in computer starting, BOOT drive initialization when, obtained from registration table
Take the information of pre-defined pre-reading data(The offset address of such as these data), and pre-read thread is created, in magnetic
After disc apparatus are added well, using the pre-read thread according to the information of the pre-reading data got from registration table, start from magnetic
The pre-defined pre-reading data is read in disk.Because pre-read thread and operating system are concurrently run, and pre-read
Line taking journey is prior to operating system, therefore the os starting data to be read can as early as possible by pre-read thread
Read out.
Alternatively, the disk can be any kind of magnetic storage for realizing store function in the electronic device
Equipment, including but not limited to:Common hard disc, hybrid hard disk, solid state hard disc etc..And the disk is using various forms
File system, including but not limited to:FAT, FAT32, NTFS etc..
As shown in figure 1, after step slol, step S103 is performed, wherein, by described in pre-read thread reading
Pre-reading data is cached in the internal memory of electronic equipment, is read during for os starting.
Alternatively, the internal memory can use semiconductor memory cell, including but not limited to:Random access memory(RAM)、
Read-only storage(ROM), cache memory(Cache)Etc..In general, internal memory has read-write speed more faster than disk
Degree.In the running of electronic equipment, program and data can be typically called in in internal memory from disk operated and from
Reason.
After step s 103, step S105 can be performed, wherein, during os starting, using described pre-
When reading thread to continue to read the pre-reading data, and receiving operating system the request of data is read from disk,
The reading of the pause pre-read thread in the pre-defined time period.
In step S105, start to start in operating system(Typically to be carried out again after system drive file is read)It
Afterwards, continue with the pre-read thread and read the pre-reading data, i.e. read institute from internal memory after os starting
While stating pre-reading data, pre-read thread concomitantly continues to read the pre-reading data.Pre-read thread is at system bottom
Layer operation, it is not necessary to parse data structure, even if in the case where operating system exists and reads obstruction, pre-read thread still may be used
With normal read data.Operating system, can be by request and skew point when file system metadata and file fragmentation data are read
Dissipate and read again and again, speed is very slow, and scheme of the invention, what pre-read thread be able to will read in bottom
Data merge into a data block, from disk disposably(Or with little number of times)By digital independent out.
Embodiments in accordance with the present invention, in above-mentioned steps S101 and S105, pre-read using described in the reading of pre-read thread
Access according to the step of can include:In the case where being spaced less than or equal to pre-defined read access time, using two readings
Request reads two files simultaneously according to disk sort and disk skew;And more than pre-defined read access time interval
In the case of, the time sequencing that file is processed during using two read requests according to os starting successively reads two files.
In prior art approaches, the operating system Windows XP of such as Microsoft, using disk requests queue
Mode reads data, often there are thousands of request queues, now, if the main thread of system sends request, will basis
Its offset row is all in position, often in tail of the queue.Scheme of the invention, the data as far as possible to be read system profit
Read in advance and be cached in internal memory with pre-read thread, and take aforesaid way to avoid queue from blocking.That is, it is being less than or equal to
In the case that pre-defined read access time is spaced, read simultaneously according to disk sort and disk skew using two read requests
Two files, now system interval is very short, without considering time sequencing.And be spaced more than pre-defined read access time
In the case of, the time sequencing that file is processed during using two read requests according to os starting successively reads two texts
Part, this is mainly and the order of file is processed during according to system initialization is read out.
Alternatively, the pre-defined time interval can be chosen according to actual needs, and an example can be 200
Millisecond.In the case where pre-defined time interval is 200 milliseconds, if first millisecond accesses file A, second millisecond of access
File B, then can together read both of these documents;And if first second access file A, second second access file B, then need by
Processed according to time sequencing.In the manner described above, when request is received, it is ensured that only two requests are being queued up.By
Can only singly be processed in request, therefore there are two requests in disk queue and there are thousands of requests for magnetic
The handling capacity of disk IO is the same.
If operating system is in start-up course, outside the discovery pre-read thread cache to the pre-reading data of internal memory
Data in there is no required data, now operating system can read data to disk requests, in above-mentioned steps S105, connect
When receiving operating system the request of data is read from disk, line taking can pre-read described in pause in the pre-defined time period
The reading of journey, for example, suspend 30 milliseconds, this way it is secured that operating system can in time read data, without because of magnetic
Disk queue problem is blocked.Certainly, those skilled in the art can according to actual needs select the above-mentioned pre-defined time
Section, the scope of the present invention is not limited only to 30 milliseconds.
Alternatively, according to one embodiment of present invention, method 100 can also be comprised the following steps:Receiving operation
When system reads the request of data from disk, after the pre-defined time period, do not got from disk in operating system
In the case of the data, the data are read using pre-read thread, and by the data buffer storage to internal memory for operation
System reads.Still by taking 30 milliseconds of pre-defined time period as an example, suspending the reading of the pre-read thread up to 30 milliseconds
Afterwards, if now operating system does not get required data from disk yet, institute can be read using pre-read thread
State data, and by the data buffer storage to internal memory so that operating system reads.
Alternatively, according to one embodiment of present invention, method 100 can also be comprised the following steps:Receiving operation
When system reads the request of data from disk, after the pre-defined time period, still reading ground operating system is detected
In the case that location offsets continuous data, the reading of the pause pre-read thread is kept, read until detecting operating system
The discontinuous data of address offset.During the continuous data of operating system address offset in continuous reading disk, magnetic head is continuously moved
Dynamic, reading efficiency is higher, and now, inconvenience interrupts the reading of operating system, and once detects operating system and read address offset
Discontinuous data, then can stop operation the reading of system, recover reading of the pre-read thread for disk.
Alternatively, according to one embodiment of present invention, method 100 can also be comprised the following steps:Detecting operation
When system carries out self-inspection to disk, suspend the pre-read thread and read the pre-reading data, until detecting disk self-inspection
Terminate.If when operating system carries out self-inspection to disk, the pre-read thread still reads pre-reading data, then may lead
Disk self-inspection exception is caused, therefore now needs to suspend the pre-read thread reading pre-reading data.
Alternatively, according to one embodiment of present invention, method 100 can also be comprised the following steps:Receiving operation
When system reads the request of data from disk, the part in the data that operating system will read from disk are detected includes
In the case of in the pre-reading data, by the data buffer storage of this part to internal memory so that operating system reads;And
After the pre-defined time period, in the case of the data that operating system does not get other parts from disk, using pre-reading
Line taking journey reads the data of the other parts, and by the data buffer storage of the other parts to internal memory so that operating system is read
Take.Specifically, operating system will from disk read data may exist part include pre-reading data in and its
It is partly not included in situation therein, at this point it is possible to the partial data is cached in internal memory so that operating system reads, and
In the pre-defined time period(It is for example as described above 30 milliseconds)Afterwards, other parts are not got from disk in operating system
Data in the case of, it is possible to read the data of the other parts using pre-read thread, and by the other parts
Data buffer storage in internal memory so that operating system reads.Thus, a process for data read request cutting is completed.
Alternatively, in one embodiment of the invention, the above method 100 can also be comprised the following steps:Record operation
The information that system starts, and based on described information and for the pre-defined of one or many os starting before
Pre-reading data, generate for after one or many os starting pre-defined pre-reading data, and according to
The priority that system reads when starting is ranked up to the data in the pre-defined pre-reading data.Wherein, the behaviour
Making the information of system startup includes that the os starting time, the operating system that are spent read pre-reading of being cached from internal memory
The situation of evidence of fetching(For example, the ratio of the pre-reading data hit operating system request of caching).For example, above-mentioned behaviour can be based on
Make the information and such as pre-reading data of first three sub-operating system startup of system startup to generate the operation system after being used for
The pre-reading data that system starts.Preferably, when pre-reading data is generated, quick reading should be guaranteed, again in operation
Before system request by required digital independent out.
Alternatively, in one embodiment of the invention, methods described 100 can also include step:Detection disk fragmentses
The situation of data movement during arrangement, and situation about being moved according to the data, regenerate the one or many behaviour for after
Make the pre-defined pre-reading data of system startup.Because pre-read thread is pre-read reading with size according to disk skew
Access evidence, therefore after user performs disk fragmentses housekeeping operations, the disk skew of legacy data it may happen that change,
Causing pre-read thread cannot correctly read pre-reading data.Now, using above-mentioned optional step, disk can detected
In the case that data are moved during defragmentation, correct pre-reading data is regenerated according to data movement, for after
Os starting.
It is corresponding with the above method 100, present invention also offers the device that a kind of electronic equipment os starting accelerates
200.Fig. 2 is the structural representation of the device of electronic device system Acceleration of starting according to an embodiment of the invention.
As shown in Fig. 2 described device 200 mainly includes pre-read module 201 and cache module 203.According to the present invention
Embodiment, the pre-read module 201 be used for when electronic equipment starts, create pre-read thread, with utilization pre-read line taking
Journey starts to read the pre-defined pre-reading data for os starting from the disk of electronic equipment;The caching mould
Block 203 is used to be cached to the pre-reading data that the pre-read module reads in the internal memory of electronic equipment, for operation
Read when system starts.The pre-read module 201 continues to read during os starting using the pre-read thread
When taking the pre-reading data, and receiving operating system the request of data is read from disk, in the pre-defined time
The reading of the pause pre-read thread in section.Alternatively, the pre-read module 201 can be used for performing the above method 100
In step S101 and S105, and the cache module 203 can be used for perform the above method 100 in step S103.
Embodiments in accordance with the present invention, when electronic equipment starts, the pre-read module 201 creates pre-read thread,
To start using pre-read thread to read the pre-defined pre-read for os starting from the disk of electronic equipment
Data.Embodiments in accordance with the present invention, the pre-read module 201 can be in computer starting, BOOT driving initialization
When, the information of pre-defined pre-reading data is obtained from registration table(The offset address of such as these data), and create
Pre-read thread, after disk unit is additional well, the pre-read module 201 is obtained using the pre-read thread according to from registration table
The pre-defined pre-reading data is read in the information of the pre-reading data got, beginning from disk.Due to pre-reading line taking
Journey is concurrently run with operating system, and pre-read thread to be read prior to operating system, therefore os starting
The data for taking can be read out by the pre-read module 201 using pre-read thread as early as possible.
Alternatively, the disk can be any kind of magnetic storage for realizing store function in the electronic device
Equipment, including but not limited to:Common hard disc, hybrid hard disk, solid state hard disc etc..And the disk is using various forms
File system, including but not limited to:FAT, FAT32, NTFS etc..
Afterwards, the pre-reading data that the pre-read thread reads is cached to electronics and set by the cache module 203
In standby internal memory, read during for os starting.
Alternatively, the internal memory can use semiconductor memory cell, including but not limited to:Random access memory(RAM)、
Read-only storage(ROM), cache memory(Cache)Etc..In general, internal memory has read-write speed more faster than disk
Degree.In the running of electronic equipment, program and data can be typically called in in internal memory from disk operated and from
Reason.
Next, during os starting, the pre-read module 201 continues to read using the pre-read thread
The pre-reading data is taken, and when receiving operating system the request of data being read from disk, when pre-defined
Between in section the pause pre-read thread reading.
Wherein, start to start in operating system(Typically to be carried out again after system drive file is read)Afterwards, it is described
Pre-read module 201 continues with the pre-read thread and reads the pre-reading data, i.e. from interior after os starting
While depositing the middle reading pre-reading data, the pre-read module 201 concomitantly continues to read institute using pre-read thread
State pre-reading data.The pre-read module 201 is operated using pre-read thread in system bottom, it is not necessary to parse data knot
Structure, even if in the case where operating system exists and reads obstruction, the pre-read module 201 still can utilize pre-read thread
Normal read data.Operating system, can be by request and skew dispersion when file system metadata and file fragmentation data are read
And read again and again, speed is very slow, and scheme of the invention, the pre-read module 201 can utilize pre-read
Thread merges into a data block in the data that bottom will read, from disk disposably(Or with little number of times)Will
Digital independent is out.
Embodiments in accordance with the present invention, in aforesaid operations, the pre-read module 201 is read using pre-read thread
During the pre-reading data, in the case where being spaced less than or equal to pre-defined read access time, the pre-read module 201
Using two read requests two files can be simultaneously read according to disk sort and disk skew;And more than pre-defined
In the case that read access time is spaced, when the pre-read module 201 can utilize two read requests according to os starting
The time sequencing for processing file successively reads two files.
In prior art approaches, the operating system Windows XP of such as Microsoft, using disk requests queue
Mode reads data, often there are thousands of request queues, now, if the main thread of system sends request, will basis
Its offset row is all in position, often in tail of the queue.Scheme of the invention, the pre-read module 201 as far as possible will
The data separate pre-read thread that system to be read reads and is cached in internal memory in advance, and takes aforesaid way to avoid queue from hindering
Plug.That is, in the case where being spaced less than or equal to pre-defined read access time, the pre-read module 201 is using two readings
Take request and read two files simultaneously according to disk sort and disk skew, now system interval is very short, during without considering
Between order.And in the case where being spaced more than pre-defined read access time, the pre-read module 201 is read using two please
The time sequencing that file is processed during according to os starting is asked successively to read two files, this is mainly according to system initialization
When treatment file order be read out.
Alternatively, the pre-defined time interval can be chosen according to actual needs, and an example can be 200
Millisecond.In the case where pre-defined time interval is 200 milliseconds, if first millisecond accesses file A, second millisecond of access
File B, then can together read both of these documents;And if first second access file A, second second access file B, then need by
Processed according to time sequencing.In the manner described above, when request is received, it is ensured that only two requests are being queued up.By
Can only singly be processed in request, therefore there are two requests in disk queue and there are thousands of requests for magnetic
The handling capacity of disk IO is the same.
If operating system is in start-up course, outside the discovery pre-read thread cache to the pre-reading data of internal memory
Data in there is no required data, now operating system can read data to disk requests, receive operating system from magnetic
When the request of data is read in disk, the pre-read module 201 can suspend the pre-read within the pre-defined time period
The reading of thread, for example, suspend 30 milliseconds, this way it is secured that operating system can in time read data, without because
Disk queue problem is blocked.Certainly, when those skilled in the art can according to actual needs select above-mentioned pre-defined
Between section, the scope of the present invention is not limited only to 30 milliseconds.
Alternatively, according to one embodiment of present invention, operating system from disk is received in the pre-read module 201
During the request of middle reading data, after the pre-defined time period, the data are not got from disk in operating system
In the case of, the pre-read module 201 reads the data using pre-read thread, and by the data buffer storage to internal memory with
Read for operating system.Still by taking 30 milliseconds of pre-defined time period as an example, suspend described pre- in the pre-read module 201
The reading of thread is read up to 30 milliseconds afterwards, if now operating system does not get required data, institute from disk yet
Stating pre-read module 201 can read the data using pre-read thread, and by the data buffer storage to internal memory for behaviour
Make system reading.
Alternatively, according to one embodiment of present invention, the pre-read module 201 can receive operating system from
When the request of data is read in disk, after the pre-defined time period, still address offset is being read operating system is detected
In the case of continuous data, the reading of the pause pre-read thread is kept, it is inclined until detecting operating system reading address
Move discontinuous data.During the continuous data of operating system address offset in continuous reading disk, magnetic head continuous moving reads
Efficiency is higher, and now, the pre-read module 201 inconvenience interrupts the reading of operating system, and once detects operating system reading
The discontinuous data of address offset are taken, then the pre-read module 201 can stop operation the reading of system, recovery pre-reads line taking
Reading of the journey for disk.
Alternatively, according to one embodiment of present invention, the pre-read module 201 can detect operating system pair
When disk carries out self-inspection, suspend the pre-read thread and read the pre-reading data, terminate until detecting disk self-inspection.Such as
When operating system carries out self-inspection to disk, the pre-read module 201 still reads pre-read to fruit using the pre-read thread
Data, then may result in disk self-inspection exception, therefore now need to suspend the pre-read module 201 using the pre-read
Thread reads the pre-reading data.
Alternatively, according to one embodiment of present invention, the pre-read module 201 can receive operating system from
When the request of data is read in disk, being partly comprised in the data that operating system will read from disk are detected is described
In the case of in pre-reading data, by the data buffer storage of this part to internal memory for operating system read;And it is fixed in advance
After the time period of justice, in the case of the data that operating system does not get other parts from disk, the pre-read module
201 data that the other parts are read using pre-read threads, and by the data buffer storage of the other parts to internal memory with
Read for operating system.Specifically, the data that operating system will read from disk may have part have been included pre-reading
Access according in and other parts are not included in situation therein, now, the pre-read module 201 can be by the partial data
It is cached in internal memory so that operating system reads, and in the pre-defined time period(It is for example as described above 30 milliseconds)Afterwards, exist
In the case that operating system does not get the data of other parts from disk, the pre-read module 201 just can be using pre-
Read the data that thread reads the other parts, and by the data buffer storage of the other parts to internal memory for operating system
Read.Thus, a process for data read request cutting is completed.
Alternatively, in one embodiment of the invention, described device 200 can also include pre-reading data generation module
205, its information for being used to record os starting, and operate system based on described information and for one or many before
Unite the pre-defined pre-reading data for starting, generate the pre-defined pre- of for after one or many os starting
Data are read, and the priority read when starting according to system is carried out to the data in the pre-defined pre-reading data
Sequence.Wherein, the information of the os starting includes the os starting time, the operating system that are spent from internal memory
Read the situation of cached pre-reading data(For example, the ratio of the pre-reading data hit operating system request of caching).Example
Such as, pre-reading data generation module 205 can be based on information and such as first three sub-operating system that aforesaid operations system starts
The pre-reading data of startup generates the pre-reading data of the os starting after being used for.Preferably, in pre-reading data
During the generation pre-reading data of generation module 205, quick reading should be guaranteed, again before operating system request by needed for
Digital independent out.
Alternatively, in one embodiment of the invention, described device 200 can also include that disk fragmentses arrange detection mould
Block 207, the situation of data movement during for detecting disk defragmentation, pre-reading data generation module 205 is according to the data
Mobile situation, regenerates the pre-defined pre-reading data of the one or many os starting for after.Due to
Pre-read module 201 is to read pre-reading data with size according to disk skew using pre-read thread, therefore in user
After performing disk fragmentses housekeeping operation, the skew of the disk of legacy data causes the pre-read thread cannot it may happen that change
Correctly read pre-reading data.Now, using aforesaid operations, detection module 207 can be arranged in disk fragmentses and detects magnetic
In the case that data are moved during disk defragmentation, pre-reading data generation module 205 is regenerated correctly according to data movement
Pre-reading data, the os starting for after.
The invention provides the method and apparatus of above-mentioned electronic device system Acceleration of starting.Implementation of the invention
Example, can create pre-read thread when electronic equipment starts, before os starting, as early as possible open operating system
Move required digital independent out, and used when being cached in internal memory for os starting, it is to avoid disk requests teams
Row obstruction, so that os starting accelerates;Embodiments in accordance with the present invention, can be by once or minority is several times from disk
In read out os starting needed for pre-reading data, be merged into a data block and be cached in internal memory, accelerate
The speed of os starting;Embodiments in accordance with the present invention, pre-read thread reads data and operating system from disk
Data are read from internal memory can be carried out simultaneously, the time needed for reducing os starting;Embodiments in accordance with the present invention,
Data and operating system from disk are read from internal memory by reading data, operating system from disk to pre-read thread
The appropriate arrangement of the middle request for reading data, and pause pre-read thread reads data from disk when needed, is operation
System reads data and gives way from disk, can realize quickly reading data, while meeting the timing of operation requests.
Method and apparatus are not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein.
Various general-purpose systems can also be used together with based on teaching in this.As described above, construct required by this kind of device
Structure be obvious.Additionally, the present invention is not also directed to any certain programmed language.It is understood that, it is possible to use it is various
Programming language realizes the content of invention described herein, and the description done to language-specific above is to disclose this hair
Bright preferred forms.
In specification mentioned herein, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be put into practice in the case of without these details.In some instances, known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify one or more that the disclosure and helping understands in each inventive aspect, exist
Above to the description of exemplary embodiment of the invention in, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor
The application claims of shield features more more than the feature being expressly recited in each claim.More precisely, such as right
As claim reflects, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows tool
Thus claims of body implementation method are expressly incorporated in the specific embodiment, wherein each claim conduct in itself
Separate embodiments of the invention.
Those skilled in the art are appreciated that can be carried out adaptively to the module in the device in embodiment
Change and they are arranged in one or more devices different from the embodiment.Can be some modules in embodiment
A module or unit or component are combined into, and multiple submodule or subelement or sub-component can be divided into addition.
In addition at least some in such feature and/or process or module exclude each other, any combinations pair can be used
This specification(Including adjoint claim, summary and accompanying drawing)Disclosed in all features and so disclosed any method
Or all processes or unit of equipment are combined.Unless expressly stated otherwise, this specification(Will including adjoint right
Ask, make a summary and accompanying drawing)Disclosed in each feature can be replaced by providing identical, equivalent or similar purpose alternative features.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in detail in the claims, embodiment required for protection it is one of any
Mode can use in any combination.
Each device embodiment of the invention can be realized with hardware, or be run with one or more processor
Software module realize, or with combinations thereof realize.It will be understood by those of skill in the art that can use in practice
Microprocessor or digital signal processor(DSP)To realize some or all moulds in device according to embodiments of the present invention
The some or all functions of block.The present invention is also implemented as the part or complete for performing method as described herein
The program of device in portion(For example, computer program and computer program product).It is such to realize that program of the invention be stored
On a computer-readable medium, or can have one or more signal form.Such signal can be from internet
Downloaded on website and obtained, or provided on carrier signal, or provided in any other form.
It should be noted that above-described embodiment the present invention will be described rather than limiting the invention, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol being located between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not
Element listed in the claims or step.Word "a" or "an" before element is not excluded the presence of as multiple
Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer
It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch
To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame
Claim.
The invention also discloses the device that A1 a kind of electronic equipment os starting accelerates, including:
Pre-read module, for when electronic equipment starts, creates pre-read thread, with using pre-read thread start from
The pre-defined pre-reading data for os starting is read in the disk of electronic equipment;
Cache module, the internal memory for the pre-reading data that the pre-read module reads to be cached to electronic equipment
In, read during for os starting,
The pre-read module continues to be pre-read described in reading during os starting using the pre-read thread
Access evidence, and when receiving operating system and reading the request of data from disk, institute is suspended within the time period for pre-defining
State the reading of pre-read thread.
A2. the device as described in claim A1, also includes:
Pre-reading data generation module, the information for recording os starting, and based on described information and use
In the pre-defined pre-reading data of one or many os starting before, the one or many operation for after is generated
The pre-defined pre-reading data that system starts, and the priority read when starting according to system is to described pre-defined
Data in pre-reading data are ranked up.
A3. the device as described in claim A2, also includes:
Disk fragmentses arrange detection module, the situation of data movement during for detecting disk defragmentation,
The pre-reading data generation module arranges the data movement that detection module is detected according to the disk fragmentses
Situation, regenerates the pre-defined pre-reading data of the one or many os starting for after.
A4. the device as described in claim A2, wherein the information of the os starting includes os starting
Time, the operating system for being spent read the situation of cached pre-reading data from internal memory.
A5. the device as described in any one of claim A1 to A4, wherein the pre-read module is used for:
In the case where being spaced less than or equal to pre-defined read access time, arranged according to disk using two read requests
Two files are read in sequence and disk skew simultaneously;And
In the case where being spaced more than pre-defined read access time, using two read requests according to os starting
When treatment file time sequencing successively read two files.
A6. the device as described in any one of claim A1 to A4, wherein the pre-read module is used to receive
When reading the request of data from disk to operating system, after the pre-defined time period, in operating system not from disk
In the case of getting the data, the data are read using pre-read thread,
And the cache module be used for by the data buffer storage to internal memory for operating system read.
A7. the device as described in any one of claim A1 to A4, wherein the pre-read module is receiving behaviour
When making system the request of data is read from disk, after the pre-defined time period, still read operating system is being detected
In the case of the continuous data of address offset, the reading of the pause pre-read thread is kept, read until detecting operating system
Take the discontinuous data of address offset.
A8. the device as described in any one of claim A1 to A4, wherein the pre-read module is detecting behaviour
When making system and carrying out self-inspection to disk, suspend the pre-read thread and read the pre-reading data, until detect disk from
Inspection terminates.
A9. the device as described in any one of claim A1 to A4, wherein the pre-read module is receiving behaviour
When making system the request of data read from disk, the part bag in the data that operating system will read from disk are detected
In the case of including in the pre-reading data, by the data buffer storage of this part to internal memory for operating system read;And
It is described pre- in the case of the data that operating system does not get other parts from disk after the pre-defined time period
Read module reads the data of the other parts using pre-read thread, and by the data buffer storage of the other parts to internal memory
In for operating system read.