5

Possible Duplicate:
How can same fd in different processes point to the same file?

I have a hard time grasping the two ideas of File Descriptor Table and Open File Table.

Open File Table is a table in kernel with all open files in the system, I understand that. However I don't understand the connection with the file descriptors.

enter image description here

If a file descriptor really is an index to a file then how come file descriptor 4 in two different processes point to two totally different files(namely File A and File B)? And how can we have File A two times in the Open File Table? Shouldn't each file be presented only once?

Pithikos
  • 3,294

0 Answers0