socket swapping for efficient distributed communication between migrating processes
DESCRIPTION
Socket Swapping for efficient distributed communication between migrating processes. MS Final Defense Praveen Ramanan 12 th Dec 2002. Introduction. What is Process Migration? The mechanism of transferring a process between two machines during its execution What is Socket Migration? - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/1.jpg)
Socket Swapping for efficient distributed communication between migrating processes
MS Final DefensePraveen Ramanan
12th Dec 2002
![Page 2: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/2.jpg)
Introduction
What is Process Migration?The mechanism of transferring a process
between two machines during its execution
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
![Page 3: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/3.jpg)
Need for Socket Migration
Lack of Network Socket Migration at the Operating System Level
MOSIX, its importance with socket migration
![Page 4: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/4.jpg)
MOSIX and its characteristics
Software that can transform a Linux cluster of x86 based workstations and servers to run almost like an SMP
Has the ability to distribute and redistribute the processes among the nodes
![Page 5: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/5.jpg)
Process Migration in MOSIX
User-level
Kernel
Link Layer
User-level
Kernel
Link Layer
Deputy
Remote
Local
process
A local process and a migrated process
![Page 6: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/6.jpg)
Solution: Kernel Socket Swapping
Processes in machine A and B Communicate
through Sockets
Process migrates to Machine C
Process then communicates
through C library
SocketSwap is calledAfter communication
Communication is re-established
between the processes
A
B
C
![Page 7: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/7.jpg)
Technologies/Tools Used
User Mode Linux (UML) Aglets JNI (Java Native Interface)
![Page 8: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/8.jpg)
Sockets
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
![Page 9: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/9.jpg)
System calls
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
![Page 10: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/10.jpg)
Socket related System Calls
Socket() Bind() Listen() Connect() Accept() Read() and Write() Close()
![Page 11: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/11.jpg)
Socket Strucuture
struct socket{
socket_state 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;
}
![Page 12: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/12.jpg)
Writing the System Call
Implemented in User Mode Linux, a safe secure way of running linux versions and linux processes
![Page 13: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/13.jpg)
Why UML?
UML is a virtual machine which runs linux inside linux
Debugging and testing becomes easy Protects the main linux machine from
abnormal crashes
![Page 14: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/14.jpg)
Features of UML
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
![Page 15: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/15.jpg)
Mobile agents and aglets
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
![Page 16: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/16.jpg)
Testing the System Call through aglets and JNI
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
![Page 17: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/17.jpg)
4.Local C library communicates with C library of the remote machine.
4
2.Aglet B moves from one machine to another. 2
3.AgletB Contacts the HaveMoved() of the local C library
3
1. Aglets A and B are communicating within the same machine thru Send and Recv Fns of C library API 1
5.system call swaps the socket
5
![Page 18: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/18.jpg)
6.New Communication is established between the processes after socket swap.
6
![Page 19: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/19.jpg)
Results (Data Size:400MB)
Latency(sec)
BandWidth(Mbps)
Mosix 67.918 47.1204
Normal Linux
TCP UserModeLinux
35.658
51.946
89.74
61.60
SocketSwap 52.786 60.62
![Page 20: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/20.jpg)
![Page 21: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/21.jpg)
![Page 22: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/22.jpg)
![Page 23: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/23.jpg)
![Page 24: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/24.jpg)
Questions?
![Page 25: Socket Swapping for efficient distributed communication between migrating processes](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56813485550346895d9b6700/html5/thumbnails/25.jpg)
Acknowledgements
Dr Daniel Andresen Dr Gurdip Singh Dr Mitchell Neilsen