Discuss the main steps performed by a file system when a process opens a file in operating systems
Question:
What are the main steps performed by a file system when a process opens a file?
Answer:
The following are the main steps performed by a file system when a process opens a file. Not all OSs do all of these steps.
• searches for
the file with that name
• verifies that
the process has access rights to use the file in the way specified
• records the
fact that the file is open (in the system-wide open file table) and which
process is using it
• constructs an
entry in the process open file table
• allocates a
buffer for file data
• returns a
pointer (file handle or file descriptor) to be used for future access
***********************
Related Questions:
No comments:
Post a Comment