top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

What is file descriptor table for a process and how it is works ?

+2 votes
141 views
posted Sep 10, 2013 by Vikram Singh

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote
  1. File descriptor (FD) is an abstract indicator for accessing a file.
  2. Each running process has a File Descriptor Table(FDT) which contains pointers to all open i/o streams. When a process starts, three entries are created in the first three cells of the table. Entry 0 points to standard input (stdin), entry 1 points to standard output (stdout), and entry 2 points to standard error (stderr).
  3. Whenever a file or other i/o stream is opened, a new entry is created in this table, usually in the first available empty slot. The socket system call returns an entry into this table; i.e. a small integer. This value is used for other calls which use this socket. The accept system call returns another entry into this table. The value returned by accept is used for reading and writing to that connection.
answer Sep 12, 2013 by Satyabrata Mahapatra

Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...