Is there any OS-level (Linux) speedup when writing one fixed byte buffer to many file-descriptors? When writing many buffers to one file-descriptor one can use writev(2)
, so I wonder if there's any analogue to this or it must be done by multiple sys-calls.
One process can have multiple file descriptors point to the same entry (e.g., as a result of a call to dup() ) Multiple processes (e.g., a parent and child) can have file descriptors that point to the same entry.
The number of file descriptors that can be allocated to a process is governed by a resource limit. The default value is set in the /etc/security/limits file and is typically set at 2000. The limit can be changed by the ulimit command or the setrlimit subroutine.
Threads in the same process share an address space and file descriptor table, so we do not need to save the page-table root pointer or the fd table.
Stdin, stdout, and stderr On a Unix-like operating system, the first three file descriptors, by default, are STDIN (standard input), STDOUT (standard output), and STDERR (standard error).
I know no such syscall on Linux. Their exhaustive list is given in the syscalls(2) man page.
And I won't bother that much. For file access, the real bottleneck is the disk...
I haven't used it but this might work: lio_listio
http://linux.die.net/man/3/lio_listio
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With