Changes

738 bytes removed ,  08:59, 25 April 2017
Line 1: Line 1:  
= Masters and slaves =
 
= Masters and slaves =
# Shared file descriptors are distributed between tasks using scm_rights. One fle from a group of shared fles called master, others are slaves.
+
# A file may be referred by several file descriptors. The descriptors may belong to a single process or to several processes.
# Pipes (and fifos), unix sockets and TTYs generate two fds in their ->open callbacls, the 2nd one can conflict with some other fd the task restores and (!) this "2nd one" may require sending to some other task. This imposes another requirement on the 3-stages engine described above.                                                                                  
+
# Group of descriptors referring to the same file is called shared. One of them called master, others are slaves.
# Some actions can only be done only after file is created, served out    and moved to proper position. E.g. epoll configuration and scheduling    TCP repair off. Thus the ->post_open call :( and separate queue for  epoll fds.                                                                                                                                               
+
# Every descriptor is discribed via struct fdinfo_list_entry.
# Slave TTYs can only be restored after respective master peers. Take into account the issue #2, this results in 3rd queue for slave TTYs.
+
# Shared file descriptors are distributed between tasks using scm_rights. See send_fds() and receive_fds() for the details.
# CTTYs should be __created__ after all other TTYs are created, configured and served out. Thus separate stages (not only queue) for CTTYs.
      
= Per-process files restore =
 
= Per-process files restore =
17

edits