5. Basic operations of files
mind Mapping
File operations
Create a file
Delete Files
Read file
Write file
open a file
1. There is a system file open table in the system, which is used to manage all open files.
2. There is a process file open table in the process, which is used to manage the files opened by the process.
3. When the open file open command is executed , The operating system will query the file directory table under the path given by the user, find the FCB from the table, and copy the FCB to the file open table of the system (if there are other processes open, just click the open counter +1 directly ) Is also copied to the open file table of the process
4. After the open command is executed, the data of the file will not be written to the memory, just the operation of several tables