Summary of the invention
The objective of the invention is to, propose a kind of file system, make the user can increase, delete the various functions of customization voluntarily flexibly with enhancement function; Can carry out spanning operation system platform transplanting easily to the file system that the user customizes voluntarily; Can reduce the code revision amount to greatest extent, reduce the kernel volume; And this file system can not produce any destruction to original file system, can start as required or close.
The invention provides the file system under a kind of operating system, described file system comprises: the interface conversion unit of inlet, the physical file system unit, top drive unit, the interface conversion unit of outlet, wherein, the interface conversion unit of described inlet connects application program unit and described physical file system unit, described physical file system unit connects the interface conversion unit and the described top drive unit of described inlet, described top drive unit connects the interface conversion unit of described physical file system unit and described outlet, and the interface conversion unit of described outlet connects the driver element of described top drive unit and operating system.
The invention provides the file system under a kind of operating system, described file system comprises: the interface conversion unit of inlet, administrative unit, the physical file system unit, top drive unit, the interface conversion unit of outlet, the interface conversion unit of wherein said inlet connects application program unit and described administrative unit, described administrative unit connects the interface conversion unit and the described physical file system unit of described inlet, described physical file system unit connects described administrative unit and described top drive unit, described top drive unit connects the interface conversion unit of described physical file system unit and described outlet, and the interface conversion unit of described outlet connects the driver element of described top drive unit and operating system.
In file system of the present invention, the interface conversion unit of described inlet is used for the command conversion of input is become the form of being accepted by described administrative unit, described administrative unit, order and data to input are handled, support to physical file system is provided, described physical file system unit comprises described physical file system, be used to handle order and data from described administrative unit, after order and data are handled via described top drive unit, interface conversion unit to described outlet, control command and data that driver element that the interface conversion unit of described outlet will be converted to the system of being operated from the order and the data of described top drive unit is accepted, and provide it to the driver element of operating system.
In file system of the present invention, described physical file system unit comprises the standard physical file system of deferring to standard agreement at least, the non-standard physical file system of customization, the physical file system that increases, a kind of with from other operating system transplantations physical file system that come, customization, described administrative unit comprises and is used for management and realizes the needed general and specific function of these physical file systems.
File system of the present invention also can add specific customizing functions according to user's needs in described administrative unit, realize this functional requirement according to the customizing functions that is added, and this function is provided.
In file system of the present invention, described file system also can comprise the target file system of coming from another operating system transplantation, have the information relevant with origin operation system or former hardware device, described target file system with comprise the corresponding administrative unit of described file system, physical file system unit and top drive unit partly or entirely.
The present invention also provides a kind of operating system that has file system of the present invention.This operating system also can further comprise the standard file system that contains VFS.
In operating system, file system of the present invention can be the module that can be loaded into operating system at any time or unload from operating system.The part that file system of the present invention also can be used as operating system nucleus adds this operating system or removes from operating system nucleus.
The present invention also provides a kind of method that makes up and strengthen file system function, described method comprises step: the interface conversion unit that comprises inlet is set, the physical file system unit, top drive unit, file system with the interface conversion unit that exports, wherein, application program unit connects the interface conversion unit of described inlet, the interface conversion unit of described inlet connects described physical file system unit, described physical file system unit connects described top drive unit, described top drive unit connects the interface conversion unit of described outlet, the driver element of the interface conversion unit attended operation system of described outlet.Described method also comprises step, after changing, the order that will import by the interface conversion unit of described inlet offers described physical file system unit, described physical file system unit comprises physical file system, processing is from the order and the data of the interface conversion unit of described inlet, after order and data are handled via described top drive unit, interface conversion unit to described outlet, the driver element that interface conversion unit by described outlet will be converted to the system of being operated from the order and the data of described top drive unit is accepted, control command and data that hardware device can be discerned, and provide it to the driver element of operating system.
The present invention also provides a kind of method that makes up and strengthen file system function, described method comprises step: the interface conversion unit that comprises inlet is set, administrative unit, the physical file system unit, top drive unit, file system with the interface conversion unit that exports, application program unit connects the interface conversion unit of described inlet, the interface conversion unit of described inlet connects described administrative unit, described administrative unit connects described physical file system unit, described physical file system unit connects described top drive unit, described top drive unit connects the interface conversion unit of described outlet, the driver element of the interface conversion unit attended operation system of described outlet, wherein, the interface conversion unit of described inlet is used for the command conversion of input is become the form of being accepted by described administrative unit, described administrative unit, order and data to input are handled, support to physical file system is provided, described physical file system unit comprises described physical file system, be used to handle order and data from described administrative unit, after order and data are handled via described top drive unit, interface conversion unit to described outlet, the driver element that the interface conversion unit of described outlet will be converted to the system of being operated from the order and the data of described top drive unit is accepted, control command and data that hardware device can be discerned, and provide it to the driver element of operating system.
The method of structure of the present invention and enhancing file system function, also comprise and realize step general and that particular transaction is handled, described step comprises: defer to the standard physical file system of standard agreement and/or the non-standard physical file system of customization in the unit setting of described physical file system, described administrative unit provides management and realization standard and/or the needed general and specific function of non-standard physical file system.Simultaneously can also in described administrative unit,, add specific customizing functions, realize the specific function requirement according to user's needs.Further, under special situation, can omit described administrative unit, application command, the interface conversion layer by inlet directly enters the physical file system layer.
The method of structure of the present invention and enhancing file system function, described method comprises the step of increase, a certain function of deletion, described step comprises: increase, delete corresponding physical file system in the physical file system unit, or in existing physical file system increase, deletion and the corresponding step partly of this function, revise described administrative unit and top drive unit, the step that provides or delete the function corresponding support and drive function.
The method of structure of the present invention and enhancing file system function also is included in the described administrative unit and adds customizing functions according to user's needs, realizes this functional requirement, and the step of this function is provided.
The method of structure of the present invention and enhancing file system function, described method comprises the step of the function of cross-platform transplanting customization, described step further comprises: increase the customization physical file system from another operating system transplantation in described physical file system unit, revise described administrative unit and top drive unit, management is provided and realizes transplanted described physical file system needed general and specific function and driving function.
The method of structure of the present invention and enhancing file system function, also comprise that access is come from another operating system transplantation, as to have the target file system of the information relevant step with origin operation system or former hardware device, described step further is included in described target file system setting and the corresponding administrative unit of described file system, physical file system unit and top drive unit, and the appropriate section of described these unit and described file system is carried out step of connecting.
The present invention also provides a kind of file recording device with above-mentioned file system, it is characterized in that, comprising: application program unit, and operation adapts to the data of alternative document system; And hardware device, reception is from the data of the driver element of described operating system, wherein, described ingress interface converting unit will be converted to the data that adapt to described file system operation from the data of the described alternative document of the adaptation of described application program unit system operation; Described administrative unit is used to control described physical file system unit, and the process of the data that will receive described hardware device is dispatched; Described physical file system unit is used for handling the data from described administrative unit; Described top drive unit is used to handle the data from described physical file system unit, and sends it to described discharge coupling converting unit; Described discharge coupling converting unit will be converted to the data of the described alternative document of adaptation system operation from the data of the described file system operation of the adaptation of described top drive unit, and send it to the driver element of described operating system.
File system of the present invention reduces the VFS unit, and administrative unit is set as required, compared with prior art, size that file system of the present invention has reduced kernel can realize the particular transaction processing that various users customize voluntarily, and the transplanting that can conveniently realize the ground cross operating system.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in further detail again.
The right side of Fig. 2 shows file system of the present invention.As shown in Figure 2, file system of the present invention comprises: the interface conversion unit 1 of file system inlet, administrative unit 2, physical file system unit 3, the interface conversion unit 5 of top drive unit 4 and outlet.Application program unit connects the interface conversion unit 1 of inlet, the interface conversion unit 1 of inlet connects described administrative unit 2, administrative unit 2 connects physics file system elements 3, physical file system unit 3 connects top drive unit 4, top drive unit 4 connects the driver element of the interface conversion unit 5 that exports and the interface conversion unit 5 attended operation systems of outlet.
When an application program is sent when request to file system, specific method is passed through in order, for example system call or on the basis of original already present system call, expand, submit to the interface conversion unit 1 of inlet, by interface conversion, the administrative unit 2 that makes the order of input be supported the physical file system that the user defines is voluntarily accepted.Administrative unit 2 provides particular transaction to handle, and is responsible for the various customizations that the realization user needs, as the dispatching method of process, and the algorithm of real-time, memory management or the like.If do not need for these special customizations, then the administrative unit 2 here can be omitted.After this, enter physical file system unit 3, here physical file system wherein can be a standard file system of deferring to standard agreement, also can be through the nonstandard file system of user from the line algorithm customization, can also be simultaneously to transplant the target file system that comprises more original operating system " vestige " of coming from other platforms.Here " vestige " be meant, can keep the skin encapsulation that original operating system platform realizes for the standard physical file system, and for example, (SuSE) Linux OS is to the physical file system of standard, the encapsulation based on VFS of interpolation.Processing through the physical file system unit, order and data are converted into the order that operating system can be discerned, the output file components of system as directed via the interface conversion unit of top drive unit and outlet, the system that is operated original bottom layer driving unit is accepted, and carries out the further processing of data.
File system of the present invention can be omitted in the interface conversion unit 1 of inlet and the administrative unit 2 between the physical file system unit 3.Therefore, file system of the present invention can comprise the interface conversion unit 1 of file system inlet, physical file system unit 3, top drive unit 4, interface conversion unit 5 with outlet, wherein, owing to omitted administrative unit 2, the interface conversion unit 1 of inlet directly is connected with physical file system unit 3.Omitting administrative unit 2 is a kind of more special situations, and at this moment, this document system also can provide the issued transaction that needs.
File system of the present invention reduces the VFS unit, and administrative unit is set as required, compared with prior art, size that file system of the present invention has reduced kernel can realize the particular transaction processing that the user customizes voluntarily, and the transplanting that can conveniently realize the ground cross operating system.
File system of the present invention can be used for an operating system separately, also can use with the file system of standard is parallel.File system of the present invention can be on the basis of existing file system in operating system, the file system that user of parallel increase customizes voluntarily, increase the specific function customization of user to file system, dynamic load, make things convenient for the transplanting of cross operating system, reduce the kernel size, realize various special application.
In having the operating system of file system of the present invention, can set up compiler toggle in the application program, be used to provide the order of applying unit to enter the selection that standard file system still enters file system of the present invention.The order of applying unit enters file system of the present invention can pass through the whole bag of tricks, comprising, but be not limited to following manner:
Increase new system call, file system of the present invention is pointed in these system calls that increase newly.In application program, set up compiler toggle, when needs use novel file system, open compiler toggle, the operational order of the file system of applying unit is pointed to the system call that increases newly, the order of applying unit enters file system of the present invention by the described system call that increases newly.As open compiler toggle, and make the operational order of file system, as open, close ... Deng pointing to the system call increase newly, make the order of applying unit by these system calls that increases newly, enter file system of the present invention in the operating system nucleus; When not needing to use when realizing based on the file system algorithm of file system of the present invention, can close compiler toggle, make the operational order of application program, still point to the inlet of the file system of standard under the Linux, the operation under the operative norm file system.
Also can increase new control command word in system call, the entrance function of file system of the present invention in the point operation system calls file system of the present invention.As at original file system call handling function, in ioctl, increase new control command word.By the compiler toggle of application program, make open, close ... by the command word representative that increases newly corresponding among the ioctl,, enter file system of the present invention in the kernel of operating system etc. application layer file operation function by original system call.In kernel, do the order of representative with the new command word of above-mentioned ioctl order, in the inlet converting unit, be transferred in the inlet of physical file system unit of customization.
Obviously, when the parallel use of file system of file system of the present invention and standard,, also can adopt alternate manner that the order of applying unit is inserted file system of the present invention for those skilled in the art.
In file system of the present invention, its administrative unit 2 can manage and dispatch each concrete physical file system in the physical file unit, and can be used to realize the various file system functions of definition voluntarily of user's needs, as process scheduling, various algorithm, memory management etc., also can be used to the function that realizes that some are general certainly.If when the user did not require corresponding to the specific function of administrative unit for the file system of target, administrative unit can be cancelled.Like this, user's request command directly enters the physical file system unit by the interface conversion unit of inlet.
In file system of the present invention, when the user to a target file system, when carrying out the spanning operation system platform transplanting, can keep of the encapsulation of original operating system to greatest extent, workload and hard to tackle degree when reducing cross-platform the transplanting greatly for the physical file system unit.Here " for the encapsulation of physical file system unit " is as " vestige " mentioned above, it is that an operating system is for keeping its specific function and operation, and one deck encapsulation of being added in concrete physical file system outside, this layer encapsulation is as the VFS unit in the (SuSE) Linux OS, or the GFM unit in the uITRON operating system is the same.
In file system of the present invention, when carrying out the cross-platform transplanting of physical file system, can keep of the encapsulation of aforesaid origin operation system to the physical file system unit, for reducing workload, the so only interface transit working that need enter the mouth, target file system to needs are transplanted need not to carry out very big code revision work, just can the successful transplanting work of finishing.But work as in order to reduce the kernel size, the system that adapts to resource-constrained, during as embedded OS, this moment as the target file system of using are specific some target file system, just can directly, give administrative unit or concrete target file system from applying unit with command transfer by the inlet converting unit, reduce the VFS unit, can reduce the size of kernel like this.In the limited embedded system of system resource, has very big advantage.
In file system of the present invention, can comprise the standard physical file system of deferring to standard agreement in the physical file system unit, and/or the non-standard physical file system of customization, the physical file system that also can comprise increase, comprise standard/off-gauge physical file system, with from other operating system transplantations standard that come, customization/non-standard physical file system, or the like.Obviously, as required, physical file system of the present invention unit can comprise above-mentioned one or more physical file systems, also can comprise other the interior perhaps part that can realize a certain function certainly, or the like.In this manual, the user comprises that not only use contains the operating system final user of file system of the present invention, also comprise with file system of the present invention or contain other relevant side of operating system of file system of the present invention, comprise, but the manufacturer and the supplier that are not limited to provide file system of the present invention and services such as increase, deletion, cross-platform transplanting are provided, or the like.
In file system of the present invention, also can add customizing functions as required by in administrative unit, comprising, as the specific customizing functions that adds as required, realize the customizing functions that this is specific, this function is provided, thereby satisfies the demand.
In the file system of the present invention, administrative unit can comprise that several provide general and module specific function, top drive unit can comprise the module that several have general or special driving function, support the general and specific physical file system in the physics file system elements, the specific customization requirement that general and special issued transaction is provided and finishes other functions of user.When according to customer requirements, when needing increase or deleting a certain function, can be by this physical file system being introduced physical file system unit or from its deletion, and administrative unit and top drive unit are carried out corresponding modify, as increasing or deleting corresponding module and come it is made amendment.When according to customer requirements, when needing cross operating system to transplant a certain physical file system, physical file system can be transplanted to the physical file system unit of file system of the present invention, by the corresponding modify of administrative unit and top drive unit is finished.Therefore, file system of the present invention has enough dirigibilities, can or delete a certain function by the customer requirements increase, and transplant conveniently.
For the operating system that has file system of the present invention, file system of the present invention can be used as the part of operating system nucleus.Compile to pass through static state as file system of the present invention, become the part of operating system nucleus, can load automatically during each the startup, also can be by the method for module, be about to file system of the present invention as a module, dynamic load is to operating system in needs, or dynamically unloads from operating system.During loading, intercept and capture the order that application program is sent to original file system by file system of the present invention; After the unloading, then recover original operating process, accept the order of application program by the VFS unit of standard file system.
Below, according to one embodiment of present invention, the i.e. specific embodiment of target file system by transplanting customization voluntarily from uITRON operating system to the file system of the present invention of linux system, file system of the present invention is described to transplant the transplanting of the target file system that comprises more original operating system " vestige " of coming from other platforms, this transplanting is to be easy to realize.
At first introduce the technical background of this migration process below.As shown in Figure 3, under uITRON, having physical file system, is respectively UDFM and RFM, also has the GFM unit, and simultaneously, in UDFM and RFM, its process scheduling mode, data structure, Memory Allocation mode or the like customize voluntarily according to the user.That is to say that the target file system that needs to transplant is not the VFS file system of a standard here, but through the file system after user's specific customization.
If according to common implantation method, be to consider again adjustment is carried out in the inside of this target file system, two parts of algorithm unit of isolating pure physical file system and customizing voluntarily, and and then with four interface data structure super_block that represent the VSF file system in the Linux file system, file, inode, dentry represents the interface of target file system again, the algorithm that will customize voluntarily is blended in the (SuSE) Linux OS again again, will be very difficulty and be difficult to finish.
As shown in Figure 3, the file system in the uITRON system partly comprises GFM, UDFM, RFM, RE_RWDRIVE, RE_PRDRIVE, RE_PRWDRIVE, RE_RDRIVE, parts such as RE_UPPDRIVE, the standard file system in linux system comprises VFS, UDF, structures such as CDROM.C.This moment, we need adopt file system of the present invention.According to file system of the present invention, the each several part of file system in the uITRON operating system is arranged to and the corresponding administrative unit of file system of the present invention, the physical file system unit, top drive unit, wherein, the GFM unit is set to file system is carried out the unified management unit of work such as process scheduling, Memory Allocation, and UDFM and RFM are for concrete file system and physical file system after specific algorithm combines.RE_RWDRIVE under it, RE_PRDRIVE, RE_PRWDRIVE, RE_RDRIVE, RE_UPPDRIVE are top drive units, they are used to realize specific driving function.The direction of the flowline of representing by Fig. 3 arrow is connected the each several part of file system in the uITRON operating system, thereby is transplanted to file system of the present invention, shown in Fig. 4 right side with appropriate section in the file system of the present invention.At this moment, the target file system after the transplanting is arranged according to mode of the present invention.Comprising I/F change 1, GFM, UDFM ﹠amp; RFM, RE_RWDRIVE ﹠amp; RE_PRDRIVE ﹠amp; RE_PRWDRIVE ﹠amp; RE_RDRIVE ﹠amp; RE_UPPDRIVE, ingress interface converting unit in the file system of the present invention that I/F change 2 their difference are corresponding, administrative unit, the physical file system unit, top drive unit, the discharge coupling converting unit like this, needs the user's of transplanting customized content all to be blended in the file system of the present invention.
After the transplanting, the applying unit order is by ingress interface converting unit 1, the interface conversion unit 1 of inlet becomes the form of being accepted by administrative unit 2 with the command conversion of input, the order and the data of 2 pairs of inputs of administrative unit are handled, support to physical file system is provided, the physical file system unit comprises UDFM and RFM, processing is from the order and the data of administrative unit 2, then, order and data are handled via top drive unit 4, after this by the interface conversion unit 5 of outlet, command request is transferred to the bottom layer driving unit, and then makes driver according to the function operation of setting.Obviously, when transplanting, can make amendment to administrative unit 2 and top drive unit 4, be suitable for file system of the present invention in being connected of appropriate section.
Wherein since target file system related to the C language standard built-in function and with operating system relevant portion function calls, so after we transplant target file system, need write this type of relevant function again.
Adopted the mode of target file system being carried out integral transplanting in the above embodiments, avoided carrying out the interface connection of private data structures according to the needs of VFS, and the process that this interface connects is very difficult, this process is not changed inner structure, flow process, the algorithm of file system simultaneously, this process only relates to the rewriting into and out of the interface section, has added the standard C language storehouse and the system's relevant portion that need.This process is simple, clear, workload is low, can carry out interdepartmental system fast and effectively and transplant, and set up the target file system that needs in Linux.
Because new part of transplanting can adopt the mode of module, transplant dynamically simultaneously, make file system of the present invention have very big dirigibility, can add simply at any time and unload.After the unloading, for original operating system nucleus, particularly original file system without any influence.
The present invention also provides a kind of method that makes up and strengthen file system function, described method comprises step: the interface conversion unit that comprises inlet is set, administrative unit, the physical file system unit, top drive unit, file system with the interface conversion unit that exports, application program unit connects the interface conversion unit of described inlet, the interface conversion unit of described inlet connects described administrative unit, described administrative unit connects described physical file system unit, described physical file system unit connects described top drive unit, described top drive unit connects the interface conversion unit of described outlet, driver element with the interface conversion unit attended operation system of described outlet, wherein, the interface conversion unit of described inlet is used for the command conversion of input is become the form of being accepted by described administrative unit, described administrative unit, order and data to input are handled, support to physical file system is provided, described physical file system unit comprises physical file system, be used to handle order and data from described administrative unit, after order and data are handled via described top drive unit, interface conversion unit to described outlet, the driver element that the interface conversion unit of described outlet will be converted to the system of being operated from the order and the data of described top drive unit is accepted, control command and data that hardware device can be discerned, and provide it to the driver element of operating system.
In the method for the present invention, also can omit administrative unit.In the case, method of the present invention comprises the interface conversion unit of file system of the present invention being arranged to comprise inlet, the physical file system unit, top drive unit, interface conversion unit with outlet, wherein, owing to omitted administrative unit, the interface conversion unit of inlet directly is connected with the physical file system unit.Method of the present invention also comprises step, offer the physical file system unit after changing by the order that will import of interface conversion unit of inlet, the physical file system unit comprises this physical file system, processing is from the order and the data of the interface conversion unit of inlet, and the order after will handling and data are via described top drive unit, be provided to the interface conversion unit of outlet, the driver element that interface conversion unit by outlet will be converted to the system of being operated from the order and the data of top drive unit is accepted, after the control command and data that hardware device can be discerned, it offers the driver element of operating system again.Method of the present invention is omitted administrative unit in file system of the present invention be a kind of more special situation, and the issued transaction that needs also can be provided after the omission.
The method of structure of the present invention and enhancing file system function, also comprise and realize step general and that particular transaction is handled, described step comprises: defer to the standard physical file system of standard agreement and/or the non-standard physical file system of customization in the unit setting of described physical file system, described administrative unit provides management and realization standard and/or the needed general and specific function of non-standard physical file system.
The method of structure of the present invention and enhancing file system function, also comprise the step that realizes the cross-platform transplanting of physical file system, described step comprises: with physical file system from an operating system transplantation to described physical file system unit, revise described administrative unit, management is provided and realizes the needed general and specific function of transplanted described physical file system.
The method of structure of the present invention and enhancing file system function, also comprise that access is come from another operating system transplantation, as to have the target file system of the information relevant step with origin operation system or former hardware device, described step further is included in described target file system setting and the corresponding administrative unit of described file system, file algorithm are realized unit and top drive unit, and will be carried out step of connecting with the appropriate section of described file system.
In file system of the present invention, also can carry out the transplanting of the cross operating system of target physical file system, by administrative unit and top drive unit are made amendment, make passing through and specific function of its target physical file system of transplanting of providing support, just can with the target physical file system from another operating system transplantation to file system of the present invention.
Below by an embodiment, the specific function of adding customer requirements in file system of the present invention is described.In the present embodiment, can be by in existing physical file system, increasing function corresponding, and administrative unit and top drive unit are carried out corresponding modify, making increases a certain function of customization in file system.
Now, how introduce, on the basis of UDF physical file system, add the function that realizes real-time in file system of the present invention.
The protocol specification of UDF2.01 has comprised two parts, and one is the standard part, and another is an extention.Standard has partly realized the main body algorithm of UDF file system; And in extention, normalized definition be directed to more needed parameters of real-time operation and method.In the different kernel version of existing Linux,, all be the realization of the standard part in the agreement as UDF 2.01 versions of realizing in the Linux 2.4.20 kernel and the UDF 2.5 that in Linux 2.6.1, realizes.But do not realize the extention in the agreement, just do not support the function of real-time.
For existing Linux file system, though can realize the function of the real-time of extention regulation through great efforts therein, but, make above-mentioned real-time function not demonstrate good performance because present Linux file system has adopted the file system of VFS.In the VFS file system, the management of process of data, scheduling, aspects such as the management of internal memory all realize by the plurality of data structure among the VFS, as inode etc.When carrying out the transmission of data by the way, all affairs are undertaken by the special processing dispatching algorithm in the linux kernel.And the kernel of Linux does not carry out special design aspect the real-time processing, and this makes this non-direct mode, has caused some process with user's high priority can not be really the fastest processed.Make the function of real-time to realize fully.The present UDF part in each version of Linux does not comprise the real-time function of expansion in the standard UDF agreement, also just root in this.
File system of the present invention has been owing to removed the VFS unit, and introduced user-defined service management unit.So can be by special design, the above-mentioned real-time function of good support solves under the standard Linux file system, supports bad shortcoming for the real-time function.
Fig. 5 is illustrated in file system of the present invention under the present embodiment.On the basis of standard UDF physical file system, the flow process or the method that increase the real-time function in file system of the present invention are as follows:
Revise administrative unit, make it except the related realization about process scheduling and memory management of routine, also will add and realize UDF agreement and user, about the specific customization of real-time according to the requirement of real-time.This special customization is called " revising 1 " at this, as shown in Figure 5.
In UDF physical file system unit, add relevant algorithm, agreement, the regulation of various file system of specific implementation UDF real-time functional requirement, if UDF has comprised this real-time function, this step can be omitted.
Revise top drive unit, here, except realizing about the routine that drives, also will add and realize UDF agreement and user, the specific customization at real-time requires is called " revising 2 " in Fig. 5.
After said method increase real-time function, file system of the present invention just can provide the real-time function, realizes this particular transaction processing.Idiographic flow is as follows:
1. the operation requests of application program at first enters the interface conversion unit of input, here, and the data of operation requests and parameter etc., the command language that the administrative unit that is translated into customization can be understood.
2. then, UDF agreement and user according to the requirement of real-time, except the related realization about process scheduling and memory management of routine, also will be realized, about the specific customization of real-time here in the entrance management unit.
3. after this, data stream enters UDF physical file system unit, algorithm, agreement, regulation that the various file system that specific implementation UDF requires are relevant.
4. after realizing unit output from the UDF algorithm, data stream enters top drive unit,, except realizing about the routine that drives, also will realize UDF agreement and user, at the specific customization of real-time requirement here.
5. last, enter the discharge coupling converting unit, here, with the various data in the data stream, parameter etc. are converted into the form that the bottom layer driving unit can be understood, and are input in the bottom document system.
In the methods of the invention, " revising 1 " is undertaken by add modules such as real-time judgement and real-time processing in administrative unit 2.Behind data stream entrance management unit, its flow process can be carried out according to mode shown in Figure 6:
1. behind the entrance management unit, at first enter " real-time judge module " 100, according to the explanation of corresponding zone bit, system judges whether this data stream is the requirement with real-time.
2. if having the requirement of real-time, enter " real-time processing module " 102 so, carry out the customization and the realization of corresponding real-time function according to the UDF protocol specification.After this step is finished, enter step 4.
3. if there is not the requirement of real-time, enter " conventional data processing operational module " 101 so, after handling accordingly, enter step 4.
4. the data stream of above-mentioned output enters " other function management module " 103 of carrying out other function treatment, finishes the realization of this part afterwards, and the algorithm that enters UDF is realized the unit.
In the methods of the invention, " revise 2 " by in top drive unit 4, revising or adding modules such as data stream type or real-time control and carry out.After data stream entered top drive unit, its flow process can be carried out according to mode shown in Figure 7:
1. after the data stream process UDF physical file system cell processing, output to top drive unit.At first judge the type that passes the data stream of coming in here, this function is realized by 104 modules.According to " general data stream ", " streaming media data stream " and " real-time data stream " three kinds of situations enter corresponding data processing module respectively and handle.Above-mentioned three modules are expressed as 105 modules respectively in the drawings, 106 modules and 107 modules.
2. after treatment, data stream enters other control sections in the top drive unit, 108 modules among the figure.
3. after all processing through top drive unit, data stream enters the discharge coupling converting unit.
In order to make the presents system more flexible in actual use, but this system can be designed as an installed module, under the situation that need not recompilate for whole source files of Linux content, but in the operating kernel of the dynamic insertion of this installed module, make it to become an organic whole of kernel, thereby realize the every special function that novel file system of the present invention has; Perhaps from kernel, remove the module of having installed, thereby the cancellation linux kernel is for novel file system and support every specific function.For example, in Linux, its concrete implementation makes by calling (module_init) (the novel file system of initialization) and (module_exit) (releasing novel file system) and realize.Make in the novel file system of initialization, register novel file system; And make the novel file system that cancellation has been registered in the novel file system of release.
In the method for structure of the present invention and enhancing file system function, also can comprise by in administrative unit, adding customizing functions as required, as some specific customizing functions, provide the function that is customized, realize the step of this functional requirement.
The present invention also provides in the file system of the present invention to be increased, the method for the enhancing file system function of a certain function of deletion.As in the physical file system unit as required or customization increase, delete corresponding physical file system, as provide the physical file system of this its function, perhaps increase at existing physical file system, delete the appropriate section corresponding with this function, as has a part of this function, by revising administrative unit and top drive unit, as according to physical file system that increases or the appropriate section that increases at physical file system, corresponding modify administrative unit and top drive unit, with physical file system or appropriate section needed general and specific function and the driving function that management is provided and realizes being increased, and then realization function, perhaps according to deletion and physical file system or from physical file system deletion appropriate section, revise administrative unit and top drive unit, therefrom corresponding with it support and driving function to this function of deletion realizes deleting this function from file system of the present invention.
File system under a kind of operating system of the present invention, and have the operating system of file system of the present invention and a kind of structure and strengthen the method for file system function, can be used in, but be not limited in following products and the technology: DVD recorder, the DVD video camera, DVR, hard disk video camera, and and DVD, product, equipment and technology that recording mediums such as hard disk are relevant.
Should be noted that at last: above embodiment is the unrestricted technical scheme of the present invention in order to explanation only, although the present invention is had been described in detail with reference to the foregoing description, those of ordinary skill in the art is to be understood that: the replacement that can make amendment or be equal to the present invention still, for any modification or partial replacement that does not break away from the spirit and scope of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.