CN102968323B - Terminal and the method that realizes computer system power-on acceleration - Google Patents

Terminal and the method that realizes computer system power-on acceleration Download PDF

Info

Publication number
CN102968323B
CN102968323B CN201210506747.5A CN201210506747A CN102968323B CN 102968323 B CN102968323 B CN 102968323B CN 201210506747 A CN201210506747 A CN 201210506747A CN 102968323 B CN102968323 B CN 102968323B
Authority
CN
China
Prior art keywords
file
system boot
disk
boot
sector
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.)
Active
Application number
CN201210506747.5A
Other languages
Chinese (zh)
Other versions
CN102968323A (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210506747.5A priority Critical patent/CN102968323B/en
Publication of CN102968323A publication Critical patent/CN102968323A/en
Application granted granted Critical
Publication of CN102968323B publication Critical patent/CN102968323B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of terminal and realize the method that computer system power-on accelerates. A kind of terminal that the embodiment of the present invention provides comprises system disk, built-in storage, data processor, display, the collating unit of computer system power-on file is installed on described terminal, described terminal, be suitable in the time receiving system file housekeeping instruction, according to this system file housekeeping instruction, start the collating unit of described computer system power-on file; Described terminal, also be suitable for collating unit at described computer system power-on file to system boot file consolidation after, in the time receiving system boot instruction, load the system boot file of described continuous arrangement on system disk, computer system start behaviour; Wherein, the collating unit of described computer system power-on file comprises: reading order acquiring unit; Information acquisition unit; Ff unit; File mobile unit.

Description

Terminal and the method that realizes computer system power-on acceleration
Technical field
The present invention relates to Computer Applied Technology field, particularly a kind of terminal and realization are calculatedThe method that machine system boot accelerates.
Background technology
All the time, industry is all constantly being explored for accelerating computer system power-on speed. Some instrument factoryBusiness develops flash memory as the hybrid hard disk that accelerates buffering, has greatly accelerated using traditional mechanical hard disk as masterWant the starting up speed of the computer system of External memory equipment. But be accompanied by the development of information technology,People's rhythm of life is constantly accelerated, and people live to oneself, the indispensable assistant of study and work---The speed of computer also constantly proposes new requirement, and opening computer speed is closed especially widelyNote.
When computer booting, need to from disk, start computer system by file reading. Under a lot of scenes,File be not be kept at disk continuous bunch in, but be dispersed the diverse location that is saved in whole disk,On disk, produced file fragmentation. For example,, in the time that the disk space of storage file is inadequate, at magneticDeleted file or add when file and can produce a large amount of file fragmentations on dish, more frequent to revising of file,The phenomenon of file fragmentation is more serious. During due to the file of diverse location in reading disk, disk contact needsMove to different positions, file fragmentation can make disk contact frequently move back and forth, causes file to readOverlong time, therefore, existing scheme is by filling in the file fragmentation of a file to continuous in diskIn space, shorten the time of reading this file in start process, to accelerate the start speed of computer systemDegree.
Existing scheme is only the scene that has multiple file fragmentations for Single document, but, at computerIn start process, need to read multiple files, and the file that need to read in the different phase of start is also notWith, and these files are arbitrarily to arrange on disk, disk contact need to switch back and forth just in magnetic trackCan read these files, read these files and still can consume the longer time, what existing scheme reached opensMachine acceleration effect is poor, cannot effectively improve opening computer speed.
Summary of the invention
In view of the above problems, the present invention has been proposed to provide one to overcome the problems referred to above or at least part ofThe terminal that addresses the above problem and realize the method that computer system power-on accelerates.
According to one aspect of the present invention, the embodiment of the present invention provides one to realize computer system power-onThe method of accelerating, comprising:
In start process, need operation system boot file by according to reading order continuous arrangement in systemOn disk, wherein, this system boot file is according to the reading order that gets and system boot fileDistributed intelligence according to this reading order continuous arrangement on system disk;
In the time receiving system boot instruction, load the system boot file of continuous arrangement on system disk,Computer system start operation.
According to a further aspect in the invention, the embodiment of the present invention provides a kind of terminal, comprising:System disk, built-in storage, data processor, display, be provided with as above-mentioned on this terminalThe collating unit of computer system power-on file,
Terminal, is suitable in the time receiving system file housekeeping instruction, arranges according to this system fileInstruction, the collating unit of startup computer system power-on file;
Described terminal, is also suitable for collating unit at computer system power-on file to system bootAfter file consolidation, in the time receiving system boot instruction, load continuous arrangement and on system disk beSystem start file, computer system start operation; Wherein,
The collating unit of described computer system power-on file comprises:
Reading order acquiring unit, is suitable for obtaining in computer booting process reading system from system diskThe reading order of start file;
Information acquisition unit, the distributed intelligence that is suitable for obtaining system boot file, this distributed intelligence comprises and isThe information of file name, file path and instruction file position in system disk of system start file;
Ff unit, is suitable for utilizing the distributed intelligence of system boot file to find on system diskSystem boot file;
File mobile unit, is suitable for the position of mobile system start file on system disk, and system is openedMachine file according to reading order continuous arrangement on system disk.
Wherein, information acquisition unit, be also suitable for obtain the file of starting shooting on system disk distributed intelligence itBefore, obtain the descriptor of system disk, this descriptor comprises that the usage space of system disk is relativeIn the ratio value of free space;
Said apparatus also comprises: start control module, be suitable for, in the time that ratio value is less than tolerance threshold value, determiningCurrent state is No starting file consolidation operation, does not carry out whole to the system boot file on system diskReason, end operation.
Wherein, the information of above-mentioned instruction file position in system disk is that file takies in system diskBunch numbering,
Ff unit, be specifically suitable for utilizing file name in the distributed intelligence of system boot file andFile path is determined the system boot file that current needs are searched; Utilize the distributed intelligence of system boot fileIn file in system disk, take bunch numbering, in system disk, find current needs and searchSystem boot file.
Wherein, also comprise file size in the distributed intelligence of system boot file, file mobile unit comprises:
Module is chosen in target location, is suitable for spendable first sector on system disk to be chosen for arrangement orderCursor position;
Mobile module, is suitable for determining when the system boot file of pre-treatment according to reading order, and judge fromArrange target location start whether to exist meet when the file size of the system boot file of pre-treatment continuouslySector, if exist, will move to the company starting from arranging target location when the system boot file of pre-treatmentContinuous sector, if do not exist, arranges target location one or more files afterwards extremely on mobile system diskUncorrelated region, until the satisfied system boot file when pre-treatment that comes into existence from arrangement target locationThe contiguous sector of file size, and will move to from arranging target location when the system boot file of pre-treatmentThe contiguous sector starting;
More new module, being suitable for upgrading arrangement target location is the system boot literary composition of the fooled pre-treatment of system diskNext sector after the sector taking after part moves, and, determine next place according to reading orderThe system boot file of reason;
Loop control module, is suitable for, according to the arrangement target location after upgrading, calling mobile module and moving downA need system boot file to be processed;
Wherein, uncorrelated region is to add that from arranging target location the system when pre-treatment opens on system diskRegion, free sector after sector corresponding to the file size of machine file.
Wherein, be made up of two above file fragmentations if work as the system boot file of pre-treatment, information obtainsGet unit, be also suitable for obtaining the file description information of system boot file, this file description information comprises fingerShow the information that file fragmentation puts in order;
Mobile module, is specifically suitable for broken according to file the file fragmentation of the system boot file when pre-treatmentSheet puts in order and moves to successively the contiguous sector starting from arranging target location.
In the distributed intelligence of the system boot file that wherein, information acquisition unit gets, also comprise that system opensThe state of machine file, in the time that the state of system boot file is locking, does not allow mobile system start filePosition in system disk;
Mobile module, if it is not the state when the system boot file of pre-treatment of being specifically suitable for is during for locking, rightWhen the system boot file of pre-treatment moves; And,
Mobile module, is specifically suitable for the system boot file that moves when the needs of arranging after target locationWhen state is locking, the system boot file of this lock-out state is not moved, and starts more new module,
More new module, is specifically suitable for being updated to the system boot file of this lock-out state by arranging target locationNext sector after the sector taking.
Wherein, reading order acquiring unit, be specifically suitable for guiding carrying out in advance in computer booting process,Guide, be written into kernel, initialize the file work that kernel reads from system disk in the time that system login operatesFor system boot file, the order that record reads this system boot file is as the reading order getting.
From the above mentioned, the embodiment of the present invention is by obtaining the reading order of system boot file in start processAnd the distributed intelligence of system boot file, by system boot file according to reading order continuous arrangement beOn system disk, when system boot, disk contact only need may be read into start by ordinal shift in magnetic trackEach stage in the system boot file that needs, solved disk contact frequent switching back and forth in magnetic trackMove back and forth the problem that the file causing reads overlong time, can significantly improve opening computer speed,More effectively realize the object that computer booting accelerates.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to better understand skill of the present inventionArt means, and can being implemented according to the content of description, and for allow of the present invention above-mentioned and otherObject, feature and advantage can become apparent, below especially exemplified by the specific embodiment of the present invention.
Brief description of the drawings
By reading below detailed description of the preferred embodiment, various other advantage and benefit for thisIt is cheer and bright that field those of ordinary skill will become. Accompanying drawing is only for the object of preferred embodiment is shown,And do not think limitation of the present invention. And in whole accompanying drawing, represent by identical reference symbolIdentical parts. In the accompanying drawings:
Fig. 1 shows a kind of according to an embodiment of the invention arrangement side of computer system power-on fileMethod flow chart;
Fig. 2 shows file on system disk according to an embodiment of the invention carrying out before arrangingDistribution map;
It is the system boot literary composition of No. 1 that Fig. 3 shows mobile according to an embodiment of the invention reading orderFile distribution figure on system disk after part;
Fig. 4 shows according to an embodiment of the invention the system boot file of No. 2, reading order is movedFile distribution figure after moving on system disk;
Fig. 5 shows according to an embodiment of the invention the system boot file of No. 3, reading order is movedFile distribution figure after moving on system disk;
Fig. 6 shows a kind of according to an embodiment of the invention arrangement dress of computer system power-on fileInterposed structure schematic diagram;
Fig. 7 shows the arrangement of another computer system power-on file according to an embodiment of the inventionApparatus structure schematic diagram;
Fig. 8 shows terminal structural representation according to an embodiment of the invention.
Detailed description of the invention
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail. Although show in accompanying drawingExemplary embodiment of the present disclosure, but should be appreciated that and can realize the disclosure and not with various formsThe embodiment that should be set forth here limits. On the contrary, providing these embodiment is for can be more thoroughlyUnderstand the disclosure, and can be by the those skilled in the art that conveys to complete the scope of the present disclosure.
One embodiment of the invention provides a kind of method for sorting of computer system power-on file, referring to figure1, comprising:
S100: it is suitable to obtain in computer booting process reading of from system disk reading system start fileOrder;
S102: obtain the distributed intelligence of system boot file, this distributed intelligence comprises system boot fileThe information of file name, file path and instruction file position in system disk, can be from this stepIn the corresponding file system of disk, get above-mentioned distributed intelligence.
S104: utilize the distributed intelligence of system boot file to find the system boot literary composition on system diskPart;
S106: the position of mobile system start file on system disk, by system boot file according to readingGet order continuous arrangement on system disk. The present embodiment is being revised system boot file in memory spacePosition time, adopted the mode of move, for example, provide literary composition by calling new technology file systemPart control application interface NtFsControlFileAPI, move is to the position of specifying. Because system is openedMachine file is that system is moved required basic document, if adopt file to delete the mode writing again, deletes literary compositionPart can cause system operation troubles, or affects the normal operation of other application in system, for avoiding occurringThis problem, the present embodiment adopts the mode of move, has ensured system boot file carrying out wholeWhen reason, the stability of system operation.
In the present embodiment, the concrete execution sequential to step S100 and S102 does not limit, and only need moveBefore the operation of movable magnetic disc file is carried out, (before execution step S104) gets system boot fileReading order and distributed intelligence.
From the above mentioned, the embodiment of the present invention is by obtaining the reading order of system boot file in start processAnd the distributed intelligence of system boot file, by system boot file according to reading order continuous arrangement beOn system disk, when system boot, disk contact only need may be read into start by ordinal shift in magnetic trackEach stage in the system boot file that needs, what when system boot starts, load is according to readingThe system boot file of order continuous arrangement on system disk, has solved disk contact frequent in magnetic trackSwitch the problem that moves back and forth back and forth the file causing and read overlong time, can significantly improve computerStarting up speed, realizes the object that computer booting accelerates more effectively.
In the embodiment of the present invention, can be applied in new technology file system, system boot file is NTFSThe file that need to read when computer booting under system. New technology file system is Microsoft'sWindows series operating system provides file system. NTFS is to traditional file allocation table (FileAllocationTable, FAT) system and HPFS (High-PerformanceFileSystem, HPFS) do some improvement, for example, support metadata, and used high-level data knotStructure, so that improve performance, reliability and disk space utilization rate, and some additional extension merits are providedCan, as ACL and file system journal. The feature of NTFS comprises supports dividing of 2TB sizeDistrict, recoverable file system, support folder compression and effective hyperdisk space etc.
On the basis of the embodiment shown in Fig. 1, the present embodiment, before execution step S102, also wrapsDraw together: obtain the descriptor of system disk, this descriptor comprises that the usage space of system disk is relativeIn the ratio value of free space. Taking new technology file system as example, in this descriptor, can comprise subregionSize, usage space and free space size, usage space with respect to the ratio value of free space,The sector number (being the least unit that disk is divided use) that in subregion, every bunch takies etc.
In the present embodiment when ratio value is less than tolerance when threshold value, determine that current state is No starting fileHousekeeping operation, does not arrange end operation to the system boot file on system disk. This processingMode, only has in the time having enough free sector on system disk, just startup file housekeeping operation, and this isWhen system boot file is moved and rearranged, the file after moving still needs to be stored in magneticOn dish, if the free space in disk is too small, may cause adopting complicated move operation to be protectedThe normal storage of card file, even causes on disk, not having sufficient space for storage in the time that file moves, there is the problems such as File lose or system exception in the file after movement, for avoiding these problems, and this realityExecuting example has adopted above-mentioned processing mode to guarantee successfully to realize movement and the permutatation of file. Exemplary,Above-mentioned tolerance threshold value can be 15%, and requiring has 15% free space in system disk, tolerance threshold valueNumerical value as required the size of move change with whole disk space size, not specialBe fixed on a numerical value, but the tolerance threshold value of choosing must meet in system disk and can have enough free spacesGo temporary transient buffering to preserve that file that needs capacity maximum in mobile file.
In above-mentioned steps S102, the query directory file that can utilize Windows system to provide" NtQueryDirectoryFile " function starts recursively enumerate file and subdirectory from system disk root,Run into subdirectory and call again " NtQueryDirectoryFile " function and enumerate the file in subdirectory,The information of the All Files obtaining eventually, comprising: all on system disk exist file file name,The information of file path, file size, instruction file position in system disk, as document data savingIn which sector or bunch (file data may not be continuous depositing) etc. From the system magnetic gettingOn dish, in the information of All Files, find out the distributed intelligence of system boot file.
Wherein, the information of above-mentioned instruction file position in system disk is that file takies in system diskBunch numbering, step S104 comprises:
Utilize file name in the distributed intelligence of system boot file and file path to determine that current needs look intoThe system boot file of looking for; Utilize the file in the distributed intelligence of system boot file to account in system diskWith bunch numbering, in system disk, find the system boot file that current needs are searched.
Further, step S106 specifically comprises: spendable first sector on system disk is chosenFor arranging target location; Determine the system boot file when pre-treatment according to reading order, and judge from rowRow target location starts whether to exist the continuous fan of the file size that meets the system boot file of working as pre-treatmentDistrict, if exist, will move to when the system boot file of pre-treatment from arranging continuous that target location startsSector, if do not exist, arranges target location one or more files afterwards extremely not on mobile system diskRelevant range, until come into existence and meet the literary composition when the system boot file of pre-treatment from arrangement target locationThe contiguous sector of part size, and open moving to when the system boot file of pre-treatment from arranging target locationThe contiguous sector of beginning; Renewal arrangement target location is that the system boot file of the fooled pre-treatment of system disk movesNext sector after the sector taking after moving, and, determine what the next one was processed according to reading orderSystem boot file; According to the arrangement target location after upgrading, mobile next need system to be processed openingMachine file; Wherein, uncorrelated region be on system disk from arrange target location add when pre-treatment beRegion, free sector after sector corresponding to the file size of system start file. In this step according to openingThe reading order of system boot file when machine rearranges system boot file on system disk.
In file consolidation process, in above-mentioned steps S106 taking contiguous sector the processing mode as unit,Also can be replaced by taking successive clusters as unit and process, as long as ensure that system boot file is arranged onOn system disk in continuous memory space.
Computer booting process starts to carry out after computer POST completes, and this process canBeing subdivided into pre-guiding, guide, be written into kernel, initialize kernel and system login operates this double teacher,So in step S100, by computer booting process carry out guide in advance, guide, be written into kernel,Initialize the file that reads from system disk of kernel as system boot file in the time that system login operates,The order that record reads this system boot file is as the reading order getting. In start process, needThe file reading mainly comprises Ntldr, Boot.ini, Ntdetect.com, Ntoskrnl.exe, Ntbootdd.sysAnd the file such as Bootsect.dos, the main processing procedure in each stage is as follows:
The pre-vectoring phase
After computer starting, after BIOS self-inspection is passed through, start to find guiding device, need under normal circumstancesThe equipment of the guiding of wanting is exactly hard disc of computer. BIOS reads the guidance code of first sector of hard disk,Be that MBR (MasterBootRecord, MBR) arrives internal memory, then control transferred toMBR code. MBR code function is the boot partition (bootpartition) of finding disk, and it is first years oldIndividual sector is boot sector (bootsector), and this volume is called system volume (systemvolume), is needsThe system disk sector of optimizing.
Vectoring phase
The code of boot sector can resolution system the file format of volume, and find Ntldr, this program can be byProcessor switches to 32 smooth memorymodel (32-bitFlatMemory by real pattern (RealMode)Mode). Ntldr program can read boot.ini file from hard disk after having completed initial work,According to the content choice operating system in this file. In the Windows operating system of having selected to be written intoAfterwards, Ntdetect.com is all hardware information of installing in computer, and by this informationGive Ntldr.
Be written into the kernel stage
The kernel file Ntoskrnl.exe of loading system, but be only written into here, kernel now also can notBe initialised. Be written into subsequently hardware abstraction layer HAL.dll. Load SYSTEM registration table storage nest file(%SystemRoot% system32 Config System) is registration table key assignments(HKEY_LOCAL_MACHINE SYSTEM), drives list to add according to guiding device in registration tableAdd corresponding file system driver, to realize each subregion, catalogue, the Access Management Access of file.
Initialize the kernel stage
Kernel initialize process can load (HKEY_LOCAL_MACHINE SYSTEMCurrentControlSet services) in record driving, as disk management filtration drive, network-drivenDeng.
The driving that first loading is registered as " Start " key assignments 0 (SERVICE_BOOT_START) then loadsKey assignments is the driving of 1 (SERVICE_SYSTEM_START). First scanning(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroUpOrder) in, the group loading sequence of definition, loads registered driving successively according to group, registeredThe group driving can be recorded in registration table key assignments " Group ". To the driving of identical group, can basisRegistration table key assignments " Tag " decides loading sequence. GroupOrderList(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GroupOrdeRList) in, the Section 1 of each group is the numerical value of Tag value. Next be the Tag value that will loadNumerical order. Device driver in group first according to it by the defined Tag of GroupOrderListValue loads. If device driver does not have Tag value, or Tag value does not existIn GroupOrderList, these device drivers are driven the equipment in loading with effective Tag valueAfter dynamic program, load.
The system login stage
Start local security authorization subsystem at this stage session manager. Carry out after this step meterThe login interface that can show Windows system on calculation machine display screen, meanwhile, backstage can loadNon-key device drives.
By the operation of above-mentioned double teacher, computer booting process is finished, thereby has known systemThe system boot file that when start, all needs read and the reading order of these system boot files. RightIn same computer operating system, system boot file read and loading sequence can not change,Each start all can be according to identical reading order reading system start file. The present embodiment can be onceIn start process, read the reading order of monitoring activation record system boot file by the file arranging,Then the permutatation on disk according to the reading order executive system start file of record.
In another embodiment of the present invention, illustrate system boot file according to reading in conjunction with concrete exampleGet the method for order continuous arrangement on system disk.
Referring to Fig. 2, show file on system disk at the distribution map of carrying out before arranging. Whole in Fig. 2Individual form representative system disk, the minimum applying unit bunch of each cell representation file system. System magneticOn dish, comprise some nonsystematic start files and three system boot files. For ease of describing, at Fig. 2In the reading order of these three system boot files is indicated, in practical operation, canThe title of system boot file, position and reading order are recorded in list, from list, find and work asFront system boot file that need to be mobile. In example shown in Fig. 2, reading order is that the file of No. 1 is depositedAt file fragmentation, this file is made up of two file fragmentations. Under normal circumstances, a file is divided into manyWhen individual fragment, have the body data that has comprised this file in a larger file fragmentation, and remainingFile fragmentation can be smaller.
First choose the original position of permutatation, spendable first sector on system disk is chosen for to rowRow target location, in the example of Fig. 2, first sector in first on system disk bunch can be used forStore any system boot file, this first sector is chosen for and arranges target location.
According to reading order, first mobile reading order is the system boot file of No. 1, according to the literary composition of filePart size knows that this file need to take the space of two bunches (two cells), and from arranging target bitPut and start there is no the contiguous sector of two bunches, the file at least two bunches behind mobile arrangement target locationTo uncorrelated region. Uncorrelated region is to add that from arranging target location working as pre-treatment (reads on system diskGetting order is No. 1) sector corresponding to the file size of system boot file after region, free sector,In scene shown in Fig. 2, all belong to uncorrelated district since the unappropriated cell of the 3rd cellTerritory.
Referring to Fig. 3, for mobile reading order is on the system disk after the system boot file of No. 1File distribution situation. The present embodiment is by the start shooting system boot literary composition of No. 3, file 1 and reading order of nonsystematicPart has moved to distance in uncorrelated region and has arranged region farthest, target location. It is No. 1 by reading orderThe each several part of file start continuous arrangement on disk from current arrangement position. This programme also can be to literary compositionPart fragment arranges, if the system boot file (file that No. 1, reading order) of working as pre-treatment is by twoIndividual above file fragmentation forms, and obtains the file description information of this system boot file, and this file is describedInformation comprises the information that puts in order of instruction file fragmentation, by the system boot file of No. 1, reading orderFile fragmentation puts in order and moves to successively the continuous fan starting from arranging target location according to file fragmentationDistrict.
After to the system boot file mobile end of No. 1, reading order, arrangement target location is updated toNext sector after the sector that the file that No. 1, reading order takies, the 3rd cell is correspondingFirst sector in bunch. Then, mobile reading order is the system boot file of No. 2. Referring to Fig. 4,Show the file of No. 2, reading order is moved to the file distribution situation map on rear disk. Owing to arranging orderThe contiguous sector that cursor position rises is taken by nonsystematic start file 2, and the nonsystematic file 2 of starting shooting is moved toUncorrelated region, moves to the system boot file of No. 2, reading order from current arrangement target locationIn the contiguous sector starting (the 3rd cell).
After to the system boot file mobile end of No. 2, reading order, arrangement target location is updated toNext sector after the sector that the file that No. 2, reading order takies, the 4th cell is correspondingFirst sector in bunch. Then, mobile reading order is the system boot file of No. 3. Referring to Fig. 5,Show the file of No. 3, reading order is moved to the file distribution situation map on rear disk. Owing to arranging orderThe contiguous sector that cursor position rises is taken by nonsystematic start file 3, and the nonsystematic file 3 of starting shooting is moved toUncorrelated region, moves to the system boot file of No. 3, reading order from current arrangement target locationIn the contiguous sector starting (the 4th cell).
Further, because some specific system boot documentation requirements are stored in position fixing on diskPut, in the distributed intelligence of the system boot file that the present embodiment gets, can also comprise system boot fileState, this state can comprise lock-out state and unlock state, file system (as NTFS) canTo determine whether file can move, and knows the state of file, by calling the api interface of file systemCan obtain the state of file. In the time that the state of system boot file is locking, show this system boot literary compositionPart must be stored in fixed position, does not allow the position of mobile system start file in system disk, whenWhen the state of system boot file is unlock state, allow mobile this system boot file.
In the time system boot file being moved according to reading order, if work as the system boot of pre-treatmentWhen the state of file is locking, the system boot file when pre-treatment is not moved, keep this systemThe invariant position of start file. Similar, for from arranging target location for the system when pre-treatment is openedMachine file clean-up goes out enough memory spaces, needs the mobile target location system boot file afterwards of arrangingAnd when the state of this file is locking, the system boot file of this lock-out state is not moved, willArrange target location and be updated to the next one fan after the sector that the system boot file of this lock-out state takiesDistrict, moves to the continuous fan from the arrangement target location upgrading by the system boot file when pre-treatmentQu Zhong.
Further embodiment of this invention also provides a kind of method that computer system power-on accelerates that realizes, and comprising:
In start process, need the system boot file of operation to be existed according to reading order continuous arrangementOn system disk,, in the time receiving system boot instruction, directly load continuous arrangement on system diskSystem boot file, computer system start operation. In the present embodiment during due to system boot,What when system boot starts, load is that the system on system disk is opened according to reading order continuous arrangementMachine file, disk contact only need be in magnetic track ordinal shift may be read in each stage of start and needSystem boot file, solved the frequent switching in magnetic track of disk contact and moved back and forth back and forth the literary composition causingPart reads the problem of overlong time, can significantly improve opening computer speed, effectively reaches calculatingThe object that machine start is accelerated.
Another embodiment of the present invention also provides a kind of collating unit of computer system power-on file, ginsengSee Fig. 6, comprising:
Reading order acquiring unit 600, is suitable for obtaining in computer booting process and reads from system diskThe reading order of system boot file, for example, reading order acquiring unit 600 is specifically suitable for computerIn start process, carry out and guide in advance, guide, be written into kernel, initialize kernel to system login while operating fromThe file reading on system disk is as system boot file, and record reads the order of this system boot fileAs the reading order getting.
Information acquisition unit 602, the distributed intelligence that is suitable for obtaining system boot file, this distributed intelligence bagDraw together the information of file name, file path and instruction file position in system disk of system boot file.Information acquisition unit 602 can obtain from the corresponding file system of disk (as new technology file system)Get above-mentioned distributed intelligence.
Ff unit 604, is suitable for utilizing the distributed intelligence of system boot file to find system diskOn system boot file;
File mobile unit 606, is suitable for the position of mobile system start file on system disk, will beSystem start file according to reading order continuous arrangement on system disk. The present embodiment is at amendment system boot, adopted the mode of move when the position of file in memory space the, for example, by calling NTFSFile system provides document control application interface NtFsControlFileAPI, and move is to the position of specifyingPut. Because system boot file is that system is moved required basic document, write again if adopt file to deleteMode, deleted file can cause system operation troubles, or affects the normal fortune of other application in systemOK, for avoiding this problem, the present embodiment adopts the mode of move, has ensured to systemWhen start file arranges, the stability of system operation.
Wherein, information acquisition unit 602, is also suitable for obtaining the distribution letter of the file of starting shooting on system diskBefore breath, obtain the descriptor of system disk, this descriptor comprises the usage space of system diskWith respect to the ratio value of free space;
Referring to Fig. 7, said apparatus also comprises: start control module 608, be suitable for being less than tolerance when ratio valueWhen threshold value, determine that current state is No starting file consolidation operation, does not open the system on system diskMachine file arranges, end operation. For example, starting control module 608 can be by forbidding that file looks intoLook for the startup of unit 604 and/or file mobile unit 606, reach not to the system boot on system diskThe effect that file arranges. This processing mode, only has when there being enough free sector on system diskTime, just startup file housekeeping operation, this is when system boot file is moved and rearranged,File after moving still needs to be stored on disk, if the free space in disk is too small, may causeNeed to adopt complicated move operation to ensure the normal storage of file, even cause magnetic in the time that file movesFile after not having sufficient space for storing mobile on dish, so adopt above-mentioned processing mode to ensureCan successfully realize movement and the permutatation of file.
Wherein, the information of above-mentioned instruction file position in system disk is that file takies in system diskBunch numbering, ff unit 604, is specifically suitable for utilizing in the distributed intelligence of system boot fileFile name and file path determine the system boot file that current needs are searched; Utilize system boot literary compositionFile in the distributed intelligence of part in system disk, take bunch numbering, in system disk, findThe system boot file that current needs are searched.
File mobile unit 606 comprises: module is chosen in target location, is suitable on system disk, can usingFirst sector be chosen for arrange target location; Mobile module, is suitable for determining current place according to reading orderThe system boot file of reason, and judge from arrange target location start whether to exist meet work as pre-treatment beThe contiguous sector of the file size of system start file, if exist, moves the system boot file when pre-treatmentMove the contiguous sector starting from arranging target location, if do not exist, on mobile system disk, arrange targetOne or more files after position are to uncorrelated region, until come into existence full from arranging target locationFoot is worked as the contiguous sector of the file size of the system boot file of pre-treatment, and the system when pre-treatment is openedMachine file moves to the contiguous sector starting from arranging target location; More new module, is suitable for upgrading arrangement orderMark is set to next that system disk is taken in after the sector taking after the system boot file of pre-treatment movesIndividual sector, and, determine the next system boot file of processing according to reading order; Loop control mouldPiece, is suitable for according to the arrangement target location after upgrading, call mobile module move next need to be processedSystem boot file; Wherein, uncorrelated region is to add current from arranging target location on system diskRegion, free sector after sector corresponding to the file size of system boot file of reason.
The present embodiment also provides a kind of ordering plan to file fragmentation, if work as the system boot of pre-treatmentFile is made up of two above file fragmentations, and information acquisition unit 602, is also suitable for obtaining system bootThe file description information of file, this file description information comprises the information that instruction file fragmentation puts in order;The mobile module in file mobile unit 606, is specifically suitable for when the system boot file of pre-treatmentFile fragmentation puts in order and moves to successively the continuous fan starting from arranging target location according to file fragmentationDistrict.
In the distributed intelligence of the system boot file that further, information acquisition unit 602 gets, also wrapDraw together the state of system boot file, in the time that the state of system boot file is locking, do not allow mobile systemThe position of start file in system disk;
Mobile module in file mobile unit 606, if be specifically suitable for the system boot file when pre-treatmentState be when locking, the system boot file when pre-treatment is not moved; And this moves mouldPiece, is specifically suitable for the state of the system boot file moving when the needs of arranging after target location for lockingTime, the system boot file of this lock-out state is not moved, and in startup file mobile unit 606More new module, this is new module more, be specifically suitable for by arrange target location be updated to this lock-out state beNext sector after the sector that system start file takies.
What in the present embodiment, the specific works mode of each unit and module can be referring to other embodiments of the inventionRelated content.
According to a further aspect in the invention, the embodiment of the present invention provides a kind of terminal, system magneticDish, built-in storage, data processor, display, referring to Fig. 8, install on this terminal 800There is the collating unit 900 of computer system power-on file,
Terminal 800, is suitable in the time receiving system file housekeeping instruction, according to this system fileHousekeeping instruction, the collating unit 900 of startup computer system power-on file.
Terminal 800, is also suitable for collating unit 900 at computer system power-on file to systemAfter start file consolidation, in the time receiving system boot instruction, load continuous arrangement on system diskSystem boot file, computer system start operation. Utilizing computer system power-on fileAfter collating unit 900 is carried out the housekeeping operation of primary system start file, after terminal 800In the time of each start, all directly load the system boot file of sequence on system disk continuously, to carryHigh system boot speed.
On said system disk, store system boot file and other required nonsystematics start file,Built-in storage is suitable for storing various files and data, data processor be suitable for carrying out data processing and to meterIn calculation machine terminal, the operation of device is controlled, and display is suitable for the demonstration of the information of carrying out.
In the collating unit 900 of computer system power-on file, can there is knot as shown in Figure 6 and Figure 7Structure, the specific works mode of the collating unit 900 of computer system power-on file also can be referring to Fig. 6 andThe working method of each unit and module in Fig. 7.
From the above mentioned, the embodiment of the present invention is by obtaining the reading order of system boot file in start processAnd the distributed intelligence of system boot file, by system boot file according to reading order continuous arrangement beOn system disk, when system boot, disk contact only need may be read into start by ordinal shift in magnetic trackEach stage in the system boot file that needs, solved disk contact frequent switching back and forth in magnetic trackMove back and forth the problem that the file causing reads overlong time, can significantly improve opening computer speed,More effectively realize the object that computer booting accelerates.
The algorithm providing at this and demonstration are solid with any certain computer, virtual system or miscellaneous equipmentHave relevant. Various general-purpose systems also can with based on using together with this teaching. According to description above,It is apparent constructing the desired structure of this type systematic. In addition, the present invention is not also for any specificProgramming language. It should be understood that and can utilize various programming languages to realize content of the present invention described here,And the description of above language-specific being done is in order to disclose preferred forms of the present invention.
In the description that provided herein, a large amount of details are described. But, can understand, thisInventive embodiment can be put into practice in the situation that there is no these details. In some instances, notBe shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, should be appreciated that in order to simplify the disclosure and to help to understand in each inventive aspectOr multiple, in the above in the description of exemplary embodiment of the present invention, each feature of the present invention is sometimesBe grouped together into single embodiment, figure or in its description. But, should be by the disclosureMethod be construed to the following intention of reflection: the present invention for required protection requires than in each claimThe more feature of the middle feature of clearly recording. Or rather, as claims below reflectLike that, inventive aspect is to be less than all features of disclosed single embodiment above. Therefore, followClaims of detailed description of the invention are incorporated to this detailed description of the invention, wherein each right thus clearlyRequirement itself is all as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out certainly the module in the equipment in embodimentChange adaptively and they are arranged in one or more equipment different from this embodiment. CanModule in embodiment or unit or assembly are combined into a module or unit or assembly, and in addition canTo put them into multiple submodules or subelement or sub-component. Except such feature and/or process orAt least some in unit are, outside mutually repelling, can adopt any combination (to comprise companion to this descriptionWith claim, summary and accompanying drawing) in disclosed all features and so disclosed any method orAll processes or the unit of person's equipment combine. Unless clearly statement in addition, this description (comprises companionWith claim, summary and accompanying drawing) in disclosed each feature can be by providing identical, being equal to or phaseAlternative features like object replaces.
In addition, although those skilled in the art will appreciate that embodiment more described herein comprise itIncluded some feature instead of further feature in its embodiment, but the group of the feature of different embodimentClose and mean within scope of the present invention and form different embodiment. For example, power belowIn profit claim, the one of any of embodiment required for protection can make with combination arbitrarilyWith.
All parts embodiment of the present invention can realize with hardware, or with in one or more processingThe software module of moving on device realizes, or realizes with their combination. Those skilled in the art shouldUnderstand, can use in practice microprocessor or digital signal processor (DSP) to realize basisThe some or all functions of the some or all parts in the terminal of the embodiment of the present invention. ThisInvention can also be embodied as for carry out method as described herein part or all equipment orDevice program (for example, computer program and computer program). Like this realize journey of the present inventionOrder can be stored on computer-readable medium, or can have the form of one or more signal.Such signal can be downloaded and obtain from internet website, or provides on carrier signal, or withAny other form provides.
It should be noted above-described embodiment the present invention will be described instead of limit the invention,And those skilled in the art can design and replace in fact in the case of not departing from the scope of claimsExecute example. In the claims, any reference symbol between bracket should be configured to right to wantThe restriction of asking. Word " comprises " not to be got rid of existence and is not listed as element or step in the claims. Be positioned atWord " one " before element or " one " do not get rid of and have multiple such elements. The present invention canBy means of including the hardware of some different elements and realizing by means of the computer of suitably programming. ?Enumerated in the unit claim of some devices, several in these devices can be by sameHardware branch carrys out imbody. The use of word first, second and C grade does not represent any order.Can be title by these word explanations.

Claims (7)

1. realize the method that computer system power-on accelerates, comprising:
Before obtaining the distributed intelligence of system boot file, obtain the descriptor of system disk, described inDescriptor comprises that the usage space of system disk is with respect to the ratio value of free space, when described ratioWhen value is less than tolerance threshold value, determine that current state is No starting file consolidation operation, not to system diskOn system boot file arrange, end operation, only has when there being enough free time fan on system diskQu Shi, just startup file housekeeping operation; Obtain system boot file in start process reading order andThe distributed intelligence of system boot file, the position of mobile system start file on system disk, by systemStart file according to reading order continuous arrangement on system disk;
In the time receiving system boot instruction, load the system boot of described continuous arrangement on system diskFile, computer system start operation.
2. a terminal, comprising: system disk, built-in storage, data processor, demonstrationDevice, is provided with the collating unit of computer system power-on file on described terminal,
Described terminal, is suitable in the time receiving system file housekeeping instruction, according to this system fileHousekeeping instruction, starts the collating unit of described computer system power-on file;
Described terminal, is also suitable for collating unit at described computer system power-on file to systemAfter start file consolidation, obtain reading order and the system boot of system boot file in start processThe distributed intelligence of file, the position of mobile system start file on system disk, by system boot fileAccording to reading order continuous arrangement on system disk, in the time receiving system boot instruction, described in loadingThe system boot file of continuous arrangement on system disk, computer system start operation; Wherein,
The collating unit of described computer system power-on file comprises:
Reading order acquiring unit, is suitable for obtaining in computer booting process reading system from system diskThe reading order of start file;
Information acquisition unit, the distributed intelligence that is suitable for obtaining described system boot file, described distributed intelligenceComprise the letter of file name, file path and instruction file position in system disk of system boot fileBreath; And before described distributed intelligence of obtaining the above start file of system disk, obtain described systemThe descriptor of system disk, described descriptor comprises that the usage space of system disk is empty with respect to idleBetween ratio value;
The collating unit of described computer system power-on file also comprises:
Start control module, be suitable for, in the time that described ratio value is less than tolerance threshold value, determining that current state is tabooOnly startup file housekeeping operation, does not arrange the system boot file on system disk, end operation,Only have in the time having enough free sector on system disk, just startup file housekeeping operation;
Ff unit, is suitable for utilizing the distributed intelligence of described system boot file to find system diskOn described system boot file;
File mobile unit, is suitable for the position of mobile described system boot file on system disk, will beSystem start file according to described reading order continuous arrangement on described system disk.
3. terminal according to claim 2, wherein,
The information of described instruction file position in system disk be file in system disk, take bunchNumbering,
Described ff unit, is specifically suitable for utilizing the literary composition in the distributed intelligence of described system boot filePart title and file path are determined the system boot file that current needs are searched; Utilize described system boot literary compositionFile in the distributed intelligence of part in system disk, take bunch numbering, in system disk, findThe system boot file that current needs are searched.
4. terminal according to claim 2, wherein,
In the distributed intelligence of described system boot file, also comprise file size, described file mobile unit bagDraw together:
Module is chosen in target location, is suitable for spendable first sector on system disk to be chosen for arrangement orderCursor position;
Mobile module, is suitable for determining when the system boot file of pre-treatment according to reading order, and judge fromArrange target location start whether to exist meet when the file size of the system boot file of pre-treatment continuouslySector, if exist, will move to the company starting from arranging target location when the system boot file of pre-treatmentContinuous sector, if do not exist, arranges target location one or more files afterwards extremely on mobile system diskUncorrelated region, until the satisfied system boot file when pre-treatment that comes into existence from arrangement target locationThe contiguous sector of file size, and will move to from arranging target location when the system boot file of pre-treatmentThe contiguous sector starting;
More new module, the above when pre-treatment is to be suitable for upgrading described arrangement target location and to be system diskNext sector after the sector taking after system start file moves, and, determine according to reading orderThe next system boot file of processing;
Loop control module, is suitable for, according to the arrangement target location after described renewal, calling mobile module and movingThe moving next system boot file to be processed that needs;
Wherein, described uncorrelated region be on system disk from arrange target location add when pre-treatment beRegion, free sector after sector corresponding to the file size of system start file.
5. terminal according to claim 4, wherein, if the described system when pre-treatmentStart file is made up of two above file fragmentations, and described information acquisition unit, described in being also suitable for obtainingThe file description information of system boot file, described file description information comprises that the arrangement of instruction file fragmentation is suitableThe information of order;
Described mobile module, is specifically suitable for the file fragmentation of the system boot file when pre-treatment according to literary compositionPart fragment puts in order and moves to successively the contiguous sector starting from arranging target location.
6. terminal according to claim 4, wherein, described information acquisition unit is obtainedTo the distributed intelligence of described system boot file in also comprise the state of system boot file, when system is openedWhen the state of machine file is locking, do not allow the position of mobile described system boot file in system disk;
Described mobile module, if the state when the system boot file of pre-treatment of being specifically suitable for during for locking,The system boot file when pre-treatment is not moved; And,
Described mobile module, is specifically suitable for the system boot literary composition that the needs after arranging target location moveWhen the state of part is locking, the system boot file of this lock-out state is not moved, and start renewalModule,
Described more new module, is specifically suitable for being updated to the system boot of this lock-out state by arranging target locationNext sector after the sector that file takies.
7. terminal according to claim 2, wherein,
Described reading order acquiring unit, is specifically suitable in computer booting process, carrying out and guiding in advance, drawLead, be written into kernel, initialize the file conduct that kernel reads from system disk in the time that system login operatesDescribed system boot file, the order that record reads this system boot file as described in get readSequentially.
CN201210506747.5A 2012-11-30 2012-11-30 Terminal and the method that realizes computer system power-on acceleration Active CN102968323B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210506747.5A CN102968323B (en) 2012-11-30 2012-11-30 Terminal and the method that realizes computer system power-on acceleration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210506747.5A CN102968323B (en) 2012-11-30 2012-11-30 Terminal and the method that realizes computer system power-on acceleration

Publications (2)

Publication Number Publication Date
CN102968323A CN102968323A (en) 2013-03-13
CN102968323B true CN102968323B (en) 2016-05-25

Family

ID=47798481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210506747.5A Active CN102968323B (en) 2012-11-30 2012-11-30 Terminal and the method that realizes computer system power-on acceleration

Country Status (1)

Country Link
CN (1) CN102968323B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679545A (en) * 2013-11-29 2015-06-03 中兴通讯股份有限公司 Device and device starting method
CN107122209A (en) * 2017-04-18 2017-09-01 努比亚技术有限公司 Accelerator and method that terminal starts
TWI724424B (en) * 2019-05-17 2021-04-11 英商鼎通盛股份有限公司 Method for accelerating verification process in a booting procedure and computer system thereof
JP7234098B2 (en) * 2019-11-12 2023-03-07 株式会社東芝 Magnetic disk device and reordering method
CN113132535B (en) * 2021-04-23 2023-07-14 广州众恩数智技术有限公司 Screen state control method and device, storage medium and mobile terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102375850A (en) * 2010-08-23 2012-03-14 联想(北京)有限公司 File arrangement method and starting method of electronic equipment and electronic equipment
CN102662714A (en) * 2012-04-17 2012-09-12 中标软件有限公司 Linux operation system and startup method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102375850A (en) * 2010-08-23 2012-03-14 联想(北京)有限公司 File arrangement method and starting method of electronic equipment and electronic equipment
CN102662714A (en) * 2012-04-17 2012-09-12 中标软件有限公司 Linux operation system and startup method thereof

Also Published As

Publication number Publication date
CN102968323A (en) 2013-03-13

Similar Documents

Publication Publication Date Title
CN102968323B (en) Terminal and the method that realizes computer system power-on acceleration
CN107111450B (en) Disk partition stitching and rebalancing using partition tables
CN104011677B (en) Method and system for deployment of a software image on multiple targets with streaming technique
US20200218529A1 (en) Image upgrade method and device
CN102193817B (en) Simplify the management of physics and virtual deployment
US10592354B2 (en) Configurable recovery states
CN103617133B (en) Virtual memory compression method and device in a kind of Windows systems
CN104685443A (en) Pinning boot data for faster boot
CN103677937A (en) Method and device for upgrading and running software
CN102968324B (en) The method for sorting of computer system power-on file and device
CN102646079A (en) Disk data protection method oriented to Linux operating system
EP2669806A1 (en) Storage system
CN102147734A (en) Runtime class extracting method and system
CN104615383A (en) Software operation method and device based on virtual disk
CN103226592A (en) Database-based file system and file storage method
CN109558082B (en) Distributed file system
CN115543224B (en) ZNS SSD-based file system control method, device and equipment
US10564894B2 (en) Free space pass-through
CN113986858A (en) Linux compatible android system shared file operation method and device
US11886868B2 (en) Boot and update from runtime merged image fragments
US20190347027A1 (en) Pinning in a multi-tiered system
CN107506253A (en) A kind of operating system abnormal information store method and device
CN101593102A (en) The method and system that is used for management software
CN107145358A (en) A kind of method and apparatus for generating enterprise desktop
CN113296891B (en) Platform-based multi-scene knowledge graph processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220727

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right