Socket Swapping for efficient distributed communication between migrating
Socket Swapping for efficient distributed communication between migrating processes MS Final Defense Praveen Ramanan 12 th Dec 2002
Introduction n What is Process Migration? The mechanism of transferring a process between two machines during its execution n What is Socket Migration? The mechanism of transferring one end of a live connection from one host to another without loss or interruption to the packet flow
Need for Socket Migration n n Lack of Network Socket Migration at the Operating System Level MOSIX, its importance with socket migration
MOSIX and its characteristics n n Software that can transform a Linux cluster of x 86 based workstations and servers to run almost like an SMP Has the ability to distribute and redistribute the processes among the nodes
Process Migration in MOSIX User-level Remote al s c Lo ces o pr Link Layer Deputy Kernel A local process and a migrated process
Solution: Kernel Socket Swapping A Proc esse s in mac hi thro ne A an d ugh Sock B Com mun ets ica te B Process migrates to Machine C tes a c i hed un s i m l b com rar-yesta n e h liibs re t ses C s s s e h e n c oiucg atio he pro Proc thrn u nt m e e m w Co bet C Socket. Swap is called After communication
Technologies/Tools Used n n n User Mode Linux (UML) Aglets JNI (Java Native Interface)
Sockets n n n OS interface that allow communication between two different processes on same or different machines Behaves much like a low-level file descriptor Identified by a host. port pair
System calls n n n Entry points through which an active process obtain services from the kernel Distinction between user mode and kernel mode Context switch done by generating a software interrupt
Socket related System Calls n n n n Socket() Bind() Listen() Connect() Accept() Read() and Write() Close()
Socket Strucuture struct socket { } socket_state; unsigned long flags; struct proto_ops *ops; struct inode *inode; struct fasync_list *fasync_list; struct file *file; struct sock *sk; wait_queue_head_t wait; short type; unsigned char passcred;
Writing the System Call n Implemented in User Mode Linux, a safe secure way of running linux versions and linux processes
Why UML? n n n UML is a virtual machine which runs linux inside linux Debugging and testing becomes easy Protects the main linux machine from abnormal crashes
Features of UML n n It has a fully functional kernel It has hardware support It has access to host file system It is completely configurable, allowing its memory, available devices to be specified
Mobile agents and aglets n n n Have unique ability to transport themselves from one system to another Aglets are java objects that can move from one host to the other Aglets takes the program code as well as data during its movement
Testing the System Call through aglets and JNI n n Aglets are made to communicate through a C library (C library uses sockets) through JNI During communication, aglets are made to move from one machine to another System call is called and the socket is swapped The communication of the moved aglet is then established with the swapped socket
1. Aglets A and B are communicating within the same machine thru Send and Recv Fns of C library API 1 5 2. Aglet B moves from one machine to another. 2 3. Aglet. B Contacts the Have. Moved() of the local C library 4. Local C library communicates with C library of the remote machine. 5. system call swaps the socket 4 3
6. New Communication is established between the processes after socket swap. 6
Results (Data Size: 400 MB) Latency(sec) Band. Width(Mbps) Mosix Normal Linux 67. 918 47. 1204 35. 658 89. 74 51. 946 52. 786 61. 60 60. 62 TCP User. Mode. Linux Socket. Swap
Questions?
Acknowledgements n n n Dr Daniel Andresen Dr Gurdip Singh Dr Mitchell Neilsen
- Slides: 25