Remember
Register
1
new
Chill
new
Puzzles
new
GK
new
Sports
new
Business
Home
Questions
MCQs
Unanswered
Tags
Users
Ask a Question
Write Article
Articles
Connect to us
What is file descriptor table for a process and how it is works ?
+2
votes
428
views
What is file descriptor table for a process and how it is works ?
os
posted
Sep 10, 2013
by
Vikram Singh
Share this question
Your comment on this post:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or
register
.
1 Answer
+1
vote
File descriptor (FD) is an abstract indicator for accessing a file.
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).
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
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or
register
.
Your answer
Preview
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or
register
.
Similar Questions
+1
vote
OS: How does file descriptor duping works in linux operating system ?
+2
votes
How is the per-process file/socket descriptor table is implemented in Linux?
I am looking for data structure(s) and algorithms used in implementation and to keep it efficient?
+3
votes
What is a Thread and how it is different from Process?
+3
votes
Can we change the inode table entries for a file in unix system ? If yes then how ?
+3
votes
What is a PCB i.e. Process Control Block in context of OS why it is needed and what are the advantage of it?
...