CN115563075A - Virtual file system implementation method based on microkernel - Google Patents

Virtual file system implementation method based on microkernel Download PDF

Info

Publication number
CN115563075A
CN115563075A CN202211226374.6A CN202211226374A CN115563075A CN 115563075 A CN115563075 A CN 115563075A CN 202211226374 A CN202211226374 A CN 202211226374A CN 115563075 A CN115563075 A CN 115563075A
Authority
CN
China
Prior art keywords
file
file system
interface
virtual
vfs
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.)
Granted
Application number
CN202211226374.6A
Other languages
Chinese (zh)
Other versions
CN115563075B (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.)
University of Electronic Science and Technology of China
China Mobile IoT Co Ltd
Original Assignee
University of Electronic Science and Technology of China
China Mobile IoT 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 University of Electronic Science and Technology of China, China Mobile IoT Co Ltd filed Critical University of Electronic Science and Technology of China
Priority to CN202211226374.6A priority Critical patent/CN115563075B/en
Publication of CN115563075A publication Critical patent/CN115563075A/en
Application granted granted Critical
Publication of CN115563075B publication Critical patent/CN115563075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/188Virtual file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a virtual file system implementation method based on a microkernel.A virtual file system VFS is provided with 4 objects comprising mounting points, file information, directory entries and index nodes, and 4 management tables comprising a file system interface table, a file system mounting table, a file system opening table and an index node table; the method comprises the steps of mounting a required file system to a virtual file system server, writing an operation function of the file system aiming at 4 objects, providing a unified POSIX standard interface for a user upwards, connecting the file system downwards, further packaging the operation function into an interface function, and calling files in the file system by the user through the POSIX standard interface. The invention can realize a virtual file system with complete concept, comprehensive function and convenient operation.

Description

Virtual file system implementation method based on microkernel
Technical Field
The invention belongs to the technical field of microkernel operating systems, and particularly relates to a microkernel-based virtual file system implementation method.
Background
With the development of the internet, the microkernel operating system has gradually become a hot trend, and compared with the defects of maintainability, expansibility and stability of the traditional integrated operating system, the microkernel operating system only provides the functions of process/thread management, memory management and interrupt management, and common services such as file management and the like are provided outside the microkernel. In the microkernel os architecture, each process may have its own independent file system, and thus the microkernel os also needs to provide support for different file systems. The virtual file system VFS is used as a middle layer, a public file model is provided, the common characteristic set and the behavior of any file system can be represented, different file system interfaces at the bottom layer are downwards packaged, a uniform interface is upwards provided for a user, and the universality and the portability of the microkernel operating system are further improved.
The virtual file system provides a uniform interface for file and file system operation for a user program, and shields the difference and operation details of different file systems. Through the VFS, the kernel can provide general system call and execute between different file systems and media, and the process of accessing the different file systems by a user is greatly simplified. Meanwhile, in the design and implementation of a virtual file system layer, a combined mounting technology is adopted, so that a microkernel operating system can support a container, and a legal user can obtain effective system access permission within legal time by effectively monitoring the activity of accessing resources by the user, thereby preventing an unauthorized user from accessing the system resources.
Currently, the mainstream microkernel operating system, such as fuchsia, has a file system implemented in a user space in the form of a process, but needs a specific and complicated interface and protocol to communicate with an entity. Although the One OS of the domestic open source microkernel operating system relates to a virtual file system concept, the One OS only expands aiming at a bottom FATFS file system; the AliOS supports various file systems, but concepts such as index nodes and the like are not designed, and the VFS universality of the AliOS is further enhanced.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a virtual file system implementation method based on a microkernel, so that a virtual file system with complete concept, comprehensive functions and convenient operation is realized, and the universality and the transportability of a microkernel operating system are further improved.
In order to achieve the above purpose, the method for implementing a virtual file system based on microkernels comprises the following steps:
s1: the object of the virtual file system VFS is set, and comprises mounting points, files, directory entries and index nodes, wherein:
the mounting point is used for storing the information of the installed file system;
the file is used for storing information about interaction between the opened file and the process;
the directory entry is used for recording the read directory or file and caching the directory or file to the memory;
the index node is used for representing general metadata information of the file system object, and takes an index node number as a unique identification number of the file; the general metadata information comprises file access authority, owner, group, size, generation time, access time and final modification time;
s2: the management table for setting the virtual file system comprises a file system interface table, a file system mount table, a file system open table and an index node table, wherein:
the file system interface table is used for recording interface functions of a bottom layer file system supported by the virtual file system VFS;
the file system mount table is used for recording the mounted file system in the current virtual file system VFS;
the file system opening table is used for recording a currently opened file;
the index node table is used for recording currently opened index nodes;
s3: constructing according to the object in the step S1 and the management table in the step S2 to obtain a virtual file system, and deploying the virtual file system in the microkernel operating system in a server mode as a system component of the microkernel operating system;
s4: mounting a required file system into a virtual file system server, acquiring a mounting point of the file system and recording the mounting point to a file system mounting table; writing an operation function corresponding to the mounted file system aiming at four objects of a mounting point, a file, a directory entry and an index node to obtain an operation function set of the file system and open the file system to a user; each operation function in the operation function set provides a unified POSIX standard interface for a user upwards, and the operation function is further packaged into an interface function by a downwards butting file system so as to be in accordance with the interface standard of the operation function in the virtual file system VFS; storing the interface function corresponding to each operation function of the file system into a file system interface table;
s5: calling a file system in the virtual file system by adopting the following method:
s5.1: when a user needs to call a Virtual File System (VFS), setting a specific identifier VFS _ endpoint for a call request, generating a call request structure (VFS _ req) comprising a POSIX standard interface, a file path and call parameters to be called, and then sending the call request structure to a kernel of a microkernel operating system by the user;
s5.2: the kernel forwards a call request of a user to a virtual file system server;
s5.3: after receiving a call request of a user, the virtual file system server executes the call request and returns an obtained result to the kernel, wherein the specific method for executing the call request comprises the following steps:
determining the file and operation called this time according to POSIX standard interface information in the calling request, and if the operation is to open the file, executing according to the following method:
1) Converting the called file path into an absolute path in the virtual file system;
2) According to the absolute path, searching in a file system mounting table to obtain a mounting point of a corresponding file system to obtain the corresponding file system;
3) Inquiring in a file system interface table to obtain an interface function corresponding to an operation function of the file system, and calling the interface function to open a corresponding file of the file system; in the process, a blank table entry is distributed in the file opening table, a file structure body is filled, wherein the file structure body comprises an opening file pointer fp, then the corresponding file descriptor fd is made to be equal to the number of the table entry, and the file descriptor fd is used as a return result; meanwhile, allocating a null entry in the index node table, and filling the index node of the opened file;
if the called operation is to perform read/write operation on the opened file, the method is executed according to the following method:
1) Inquiring in a file opening table according to the file path to obtain a file descriptor fd of the operated file and a corresponding file opening pointer fp, and then inquiring in an index node table to obtain an index node of the operated file;
2) Adding one to the reference count corresponding to the file descriptor fd in the file opening table, then calling the interface function at the bottom layer, transmitting the function parameter in the calling request, and executing the interface function on the file according to the index node;
3) After the interface function is executed, taking the execution result as a return result, and at this time, subtracting one from the reference count corresponding to the file descriptor fd in the file open table;
after completing a call request, the virtual file system server generates a call reply structure body which comprises a return result, a return state and a return type corresponding to a specific operation;
s5.4: and the kernel packages the received call reply structural body and the corresponding call request identifier vfs _ endpoint and then returns the packaged call reply structural body and the corresponding call request identifier vfs _ endpoint to the user.
The invention relates to a virtual file system implementation method based on a microkernel.A virtual file system VFS is provided with 4 objects comprising mounting points, file information, directory entries and index nodes, and 4 management tables comprising a file system interface table, a file system mounting table, a file system opening table and an index node table, wherein after the virtual file system is constructed, the virtual file system is used as a system component of the microkernel operating system and is deployed in the microkernel operating system in the form of a server; the method comprises the steps of mounting a required file system to a virtual file system server, writing an operation function of the file system aiming at 4 objects, providing a unified POSIX standard interface for a user upwards, connecting the file system downwards, further packaging the operation function into an interface function, and calling files in the file system by the user through the POSIX standard interface.
The virtual file system constructed by the invention exists in a micro-kernel operating system in a server form, has more comprehensive functions and more convenient operation, realizes index nodes, supports the operation of the index nodes, and takes index node numbers as unique identification operation of files instead of file names, so that the files are more convenient to call.
Drawings
FIG. 1 is a flowchart of an embodiment of a microkernel-based virtual file system implementation of the present invention;
FIG. 2 is a diagram of an exemplary correspondence between a file system open table and an inode table in the present invention;
FIG. 3 is a call flow diagram of a virtual file system in the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided in order to better understand the present invention for those skilled in the art with reference to the accompanying drawings. It is to be expressly noted that in the following description, a detailed description of known functions and designs will be omitted when it may obscure the subject matter of the present invention.
Examples
FIG. 1 is a flowchart of an embodiment of a method for implementing a virtual file system based on a microkernel according to the present invention. As shown in fig. 1, the method for implementing a virtual file system based on microkernel includes the following steps:
s101: setting a virtual file system object:
a virtual file system VFS can access multiple "real file systems", and the virtual file system is located between an application and a specific file system, and mainly plays a role of adaptation, and for an application program, the access interfaces are completely consistent. The virtualization is so called because various data structures of the file system are built or deleted at any time, do not exist permanently on a disk, and only can be stored in a memory. The VFS alone in the system is not working because it is not a true file system. The VFS is used as an interface of a file system and a kernel, manages various specific file systems by a unified data structure, and receives various operations of a user layer on the file systems. Modern operating systems such as Linux abstract access to the file system through a virtual interface, providing a standard file operation interface up to the application layer, so that system calls such as open (), read () and write () can work regardless of the file system or the underlying physical medium; a standard interface is provided down to the file system so that the file systems of other operating systems can be easily ported to the system. The virtual file system provides a common file model as large as possible, so that the model contains a collection of all file system functions, and can represent common characteristic sets and behaviors of any file system, specifically, some basic conceptual interfaces and data structures.
Based on the above analysis, the object of the VFS of the present invention first needs to be set to include mount points, files, directory entries, and index nodes, where:
the mount point is used for storing information of the installed file system, including an actual operation interface of the file system.
Files are used to store information about the open file and the interaction between processes. The file object is only present in the kernel memory when the process opens the file.
The directory entry is used for recording the file system directory or file which has been read and caching the file system directory or file to a memory. Because the directory entry is cached in the memory, only reading from the memory is needed when the same file system directory or file is read again next time, and the efficiency of the file system is greatly improved.
An inode (inode) is used to represent general metadata information of a file with an inode number as a unique identification number for the file. The general metadata information includes file access rights, owner, group, size, generation time, access time, last modification time. The index node is the most basic unit for managing the file system, and is also a bridge for connecting any subdirectory and file by the file system. The static information in the index node is taken from a file system on the physical device, is filled by a function specified by the file system, only exists in a memory, and can be accessed through an inode cache. Each inode v _ node has an inode number v _ num, and each inode number is unique in the same file system.
S102: setting a virtual file system management table:
in the invention, the virtual file system is provided with four management tables to realize the management of the whole file system, which are respectively as follows: a file system interface table, a file system mount table, a file system open table, and an index node table, wherein:
the file system interface table is used for recording interface functions of the underlying file system supported by the virtual file system VFS. In the invention, the virtual file system VFS provides a public file operation set for a user, the user operates files by adopting a unified POSIX standard interface without depending on a specific bottom layer, and the distribution of the unified interface function of the user to the specific interface function of the bottom layer file system is carried out by the VFS, so that a file system interface table needs to be set, and when the file is operated by the VFS later, the table needs to be inquired to find the corresponding operation function set.
The file system mount table is used for recording the mounted file system and the corresponding mount point in the current virtual file system VFS. Because the virtual file system VFS supports mount of a plurality of file systems in the present invention, it needs to adopt a file system mount table for management.
The file system opening table is used for recording the currently opened file. As is known to all, reading data from a disk to a memory is very time-consuming, so that a file system opening table is designed to record an opened file, a file handle FD is returned after the file is opened, actually, the index of an array of the current file system opening table is the index, and subsequent operations such as reading and writing the file are based on the FD without performing complicated operations from the disk.
The index node table is used for recording currently opened index nodes. Although each file has a corresponding index node, the system can establish a corresponding inode data structure in the memory only when needed, the established inode structure forms a linked list, namely an index node table, then the required file nodes can be obtained by traversing the linked list, and the VFS can also construct a cache and a hash table for the distributed inodes so as to improve the system performance. In general, there is a multi-to-1 relationship for the file system open table and the inode table. FIG. 2 is a diagram illustrating an example of a correspondence relationship between a file system open table and an inode table in the present invention.
S103: deploying a virtual file system:
and constructing according to the object in the step S101 and the management table in the step S102 to obtain a virtual file system, and deploying the virtual file system in the microkernel operating system in a server mode by taking the virtual file system as a system component of the microkernel operating system.
S104: mounting a file system:
and mounting the required file system into the virtual file system server, acquiring a mounting point of the file system and recording the mounting point into a file system mounting table. When a file system is mounted, it is usually determined whether the file system is mounted, that is, whether the file system exists in a file system mounting table, if so, the mounting is not repeated, if not, an entry is taken from the file system mounting table, and a mounting point structure is filled, wherein the entry includes filling mnt _ point- > fs _ ops, and this operation requires reading a file system interface table to obtain an operation interface corresponding to the file system.
And writing an operation function corresponding to the mounted file system aiming at the four objects of the mounting point, the file, the directory entry and the index node to obtain an operation function set of the file system and open the file system to a user. Each operation function in the operation function set provides a statistical POSIX standard interface for a user upwards, and the downwards butting file system further packages the operation function into an interface function so that the interface function conforms to the interface standard of the operation function in the virtual file system VFS. And storing the interface function corresponding to each operation function of the file system into a file system interface table. Therefore, a user can operate the file through the POSIX standard interface without being concerned about how the bottom file system is specifically realized, and the user operation is simplified.
S105: calling a file system:
since the virtual file system VFS of the present invention exists as a system component in the form of a server, not in the form of a kernel module, it is necessary to redesign its calling method. FIG. 3 is a call flow diagram of a virtual file system in the present invention. As shown in fig. 3, the specific steps of the virtual file system invocation in the present invention include:
s301: the user initiates a call request to the kernel:
when a user needs to call a Virtual File System (VFS), a specific identifier VFS _ endpoint is set for a call request, a call request structural body (VFS _ req) is generated and comprises a POSIX standard interface, a file path and call parameters which need to be called, and then the user sends the call request structural body to a kernel of a microkernel operating system.
S302: the kernel forwards the call request:
the kernel forwards the calling request structure of the user to a virtual file system server (VFS Server).
S303: the server completes the request and returns the result:
and after receiving the call request structural body of the user, the virtual file system server executes the call request and returns the obtained result to the kernel. For a file in the virtual file system, the operations are mainly divided into opening the file and performing read/write operations on the opened file. Therefore, the specific method for executing the call request in the invention is as follows:
determining the called file and operation according to POSIX standard interface information in the calling request structure, and if the called operation is to open the file, executing the following method:
1) And converting the file path called this time into an absolute path in the virtual file system.
2) And searching the mounting point of the corresponding file system in the mounting table of the file system according to the absolute path to obtain the corresponding file system. In this embodiment, when a mount point is searched, a longest prefix matching algorithm is used for searching.
3) And inquiring in the file system interface table to obtain an interface function corresponding to the operation function of the file system, and calling the interface function to open the corresponding file of the file system. In the process, an empty entry is allocated in the file open table, a file structure (vfs _ file) is filled, wherein an open file pointer fp is included, then the corresponding file descriptor fd is made equal to the number of the entry, and the file descriptor fd is used as a return result. And meanwhile, allocating an empty table entry in the index node table, and filling the index node of the opened file.
At this point, a complete file open operation is complete.
If the called operation is the read/write operation of the opened file, the method is executed according to the following method:
1) And inquiring in a file opening table according to the file path to obtain a file descriptor fd of the operated file and a corresponding file opening pointer fp, and then inquiring in an index node table to obtain an index node of the operated file.
2) And adding one to the reference count corresponding to the file descriptor fd in the file opening table, calling the interface function at the bottom layer, transmitting the function parameter in the calling request, and executing the interface function on the file according to the index node. Taking the read/write function as an example in the interface function, the required incoming parameters are: a file pointer fp of an open file, data buf to be transferred, and a length len of transfer data.
3) And after the execution of the interface function is finished, taking the execution result as a return result, and at this time, subtracting one from the reference count corresponding to the item of the file descriptor fd in the file open table.
In practical application, in order to ensure file security and reduce conflicts, a read-write lock can be set for a file opening table, if a user is performing write operation on a certain file, the 'write lock' of the file is set in the file opening table, and other users need to wait after inquiring the 'write lock' before operation; if a user is reading a certain file, the file opening table is set with the 'read lock' of the file, after other users inquire the 'read lock' before the operation, the user who needs to execute the read operation can execute the operation, and the user who needs to execute the write operation needs to wait.
In addition, when reading, the directory entry can be inquired first, and if the file is cached in the directory entry, the data in the directory entry can be directly referred to, so that the time is saved. After the file finishes the read operation, the file can be cached in the directory entry for the next read.
After the virtual file system server completes a call request, a call reply structure (vfs _ reply) is generated, which includes a return result, a return state, and a return type corresponding to a specific operation, such as vfs _ replypen, vfs _ replyreead, vfs _ replywrite, and the like.
S304: the kernel returns a result:
and the kernel packages the received call reply structural body and the corresponding call request identification vfs _ end, and then returns to the user.
This completes a complete call.
Although the illustrative embodiments of the present invention have been described in order to facilitate those skilled in the art to understand the present invention, it is to be understood that the present invention is not limited to the scope of the embodiments, and that various changes may be made apparent to those skilled in the art as long as they are within the spirit and scope of the present invention as defined and defined in the appended claims, and all matters of the invention using the inventive concepts are protected.

Claims (2)

1. A virtual file system implementation method based on microkernel is characterized by comprising the following steps:
s1: the object of the virtual file system VFS is set, and comprises mounting points, files, directory entries and index nodes, wherein:
the mounting point is used for storing the information of the installed file system;
the file is used for storing information about interaction between the opened file and the process;
the directory entry is used for recording the read directory or file and caching the directory or file to the memory;
the index node is used for representing general metadata information of the file system object, and takes an index node number as a unique identification number of the file; the general metadata information comprises file access authority, owner, group, size, generation time, access time and final modification time;
s2: the management table for setting the virtual file system comprises a file system interface table, a file system mount table, a file system open table and an index node table, wherein:
the file system interface table is used for recording interface functions of a bottom layer file system supported by the virtual file system VFS;
the file system mount table is used for recording the file system mounted in the current virtual file system VFS;
the file system opening table is used for recording a currently opened file;
the index node table is used for recording currently opened index nodes;
s3: constructing a virtual file system according to the object in the step S1 and the management table in the step S2, and deploying the virtual file system in the microkernel operating system in a server mode as a system component of the microkernel operating system;
s4: mounting a required file system into a virtual file system server, acquiring a mounting point of the file system and recording the mounting point to a file system mounting table; writing an operation function corresponding to the mounted file system aiming at four objects of a mounting point, a file, a directory entry and an index node to obtain an operation function set of the file system and open the file system facing a user; each operation function in the operation function set provides a unified POSIX standard interface for a user upwards, and the operation function is further packaged into an interface function by a downwards butted file system so as to be in accordance with the interface standard of the operation function in the virtual file system VFS; storing the interface function corresponding to each operation function of the file system into a file system interface table;
s5: the following method is adopted to call the file system in the virtual file system:
s5.1: when a user needs to call a Virtual File System (VFS), setting a specific identifier VFS _ endpoint for a call request, generating a call request structural body (VFS _ req) comprising a POSIX standard interface, a file path and call parameters to be called, and then sending the call request structural body to a kernel of a microkernel operating system by the user;
s5.2: the kernel forwards a call request of a user to a virtual file system server;
s5.3: after receiving a call request of a user, the virtual file system server executes the call request and returns an obtained result to the kernel, wherein the specific method for executing the call request comprises the following steps:
determining the file and operation called this time according to POSIX standard interface information in the calling request, and if the operation is to open the file, executing according to the following method:
1) Converting the called file path into an absolute path in the virtual file system;
2) According to the absolute path, searching in a file system mounting table to obtain a mounting point of a corresponding file system to obtain the corresponding file system;
3) Inquiring in a file system interface table to obtain an interface function corresponding to an operation function of the file system, and calling the interface function to open a corresponding file of the file system; in the process, a blank table entry is distributed in the file opening table, a file structure body is filled, wherein the file structure body comprises an opening file pointer fp, then the corresponding file descriptor fd is made to be equal to the number of the table entry, and the file descriptor fd is used as a return result; meanwhile, allocating a null entry in the index node table, and filling the index node of the opened file;
if the called operation is to perform read/write operation on the opened file, the method is executed according to the following method:
1) Inquiring in a file opening table according to the file path to obtain a file descriptor fd of the operated file and a corresponding file opening pointer fp, and then inquiring in an index node table to obtain an index node of the operated file;
2) Adding one to a reference count corresponding to the file descriptor fd in the file opening table, then calling a bottom interface function, transmitting a function parameter in a calling request, and executing the interface function on the file according to the index node;
3) After the execution of the interface function is finished, taking an execution result as a return result, and at the moment, subtracting one from the reference count corresponding to the file descriptor fd in the file open table;
after completing a call request, the virtual file system server generates a call reply structure body which comprises a return result, a return state and a return type corresponding to a specific operation;
s5.4: and the kernel packages the received vfs _ reply structural body and the corresponding call request identifier vfs _ end, and then returns the packaged vfs _ end to the user.
2. The method according to claim 1, wherein the file opening table is configured with a read/write lock, if a user is performing a write operation on a certain file, the file opening table is configured with a "write lock" of the certain file, and other users need to wait after querying the "write lock" before performing the operation; if a user is reading a certain file, the file opening table is set with the 'read lock' of the file, after other users inquire the 'read lock' before the operation, the user who needs to execute the read operation can execute the operation, and the user who needs to execute the write operation needs to wait.
CN202211226374.6A 2022-10-09 2022-10-09 Virtual file system implementation method based on microkernel Active CN115563075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211226374.6A CN115563075B (en) 2022-10-09 2022-10-09 Virtual file system implementation method based on microkernel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211226374.6A CN115563075B (en) 2022-10-09 2022-10-09 Virtual file system implementation method based on microkernel

Publications (2)

Publication Number Publication Date
CN115563075A true CN115563075A (en) 2023-01-03
CN115563075B CN115563075B (en) 2023-05-30

Family

ID=84744440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211226374.6A Active CN115563075B (en) 2022-10-09 2022-10-09 Virtual file system implementation method based on microkernel

Country Status (1)

Country Link
CN (1) CN115563075B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116382841A (en) * 2023-02-21 2023-07-04 哈尔滨工业大学 iteOS-A-based file system and process number naming space design method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2142797A1 (en) * 1994-03-07 1995-09-08 Thomas George Cantrell System and method for efficient caching in a distributed file system
CN101082927A (en) * 2007-07-02 2007-12-05 浙江大学 File services method based on ContextFS context file systems
US20120011176A1 (en) * 2010-07-07 2012-01-12 Nexenta Systems, Inc. Location independent scalable file and block storage
CN104133889A (en) * 2014-07-30 2014-11-05 国云科技股份有限公司 Database virtualization microkernel data source registration and encapsulation method
CN113243008A (en) * 2019-05-10 2021-08-10 华为技术有限公司 Distributed VFS with shared page cache
CN114942727A (en) * 2022-05-30 2022-08-26 上海交通大学 Micro-kernel file system extensible page cache system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2142797A1 (en) * 1994-03-07 1995-09-08 Thomas George Cantrell System and method for efficient caching in a distributed file system
CN101082927A (en) * 2007-07-02 2007-12-05 浙江大学 File services method based on ContextFS context file systems
US20120011176A1 (en) * 2010-07-07 2012-01-12 Nexenta Systems, Inc. Location independent scalable file and block storage
CN104133889A (en) * 2014-07-30 2014-11-05 国云科技股份有限公司 Database virtualization microkernel data source registration and encapsulation method
CN113243008A (en) * 2019-05-10 2021-08-10 华为技术有限公司 Distributed VFS with shared page cache
CN114942727A (en) * 2022-05-30 2022-08-26 上海交通大学 Micro-kernel file system extensible page cache system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116382841A (en) * 2023-02-21 2023-07-04 哈尔滨工业大学 iteOS-A-based file system and process number naming space design method
CN116382841B (en) * 2023-02-21 2024-06-07 哈尔滨工业大学 LiteOS-A-based file system and process number naming space design method

Also Published As

Publication number Publication date
CN115563075B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
US6205466B1 (en) Infrastructure for an open digital services marketplace
US7707337B2 (en) Object-based storage device with low process load and control method thereof
US6449607B1 (en) Disk storage with modifiable data management function
CN110046133B (en) Metadata management method, device and system for storage file system
JP5589205B2 (en) Computer system and data management method
KR100293795B1 (en) Distributed Database System and Data Entity Access Methods
JP2004280283A (en) Distributed file system, distributed file system server, and access method to distributed file system
CN111901294A (en) Method for constructing online machine learning project and machine learning system
WO2014180232A1 (en) Method and device for responding to a request, and distributed file system
WO2007035580A2 (en) Providing local access to managed content
CN103559231A (en) File system quota managing method, device and system
EP4390715A1 (en) Information processing method and apparatus
CN104423982A (en) Request processing method and device
CN115563075B (en) Virtual file system implementation method based on microkernel
CN110554911A (en) Memory access and allocation method, memory controller and system
CN114528255A (en) Metadata management method, electronic device and computer program product
CN113342711A (en) Page table updating method, device and related equipment
US7373393B2 (en) File system
CN114995948A (en) Method, device, equipment and system for downloading secure container mirror image file
CN115964389A (en) Data processing method, device and equipment based on block chain and readable storage medium
JP2007287180A (en) Distributed file system, distributed file system server, and method for accessing distributed file system
KR100964374B1 (en) Device and Method for Managing Memory in RFID Tag
CN112748854B (en) Optimized access to a fast storage device
CN114490727A (en) High-dimensional vector searching method for target database and related equipment
KR100785774B1 (en) Obeject based file system and method for inputting and outputting

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant