Download - Porting dmtcp mac_slides
![Page 1: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/1.jpg)
Porting DMTCP to Mac OS X
Liang Yu College of Computer and Information Science
Northeastern University Boston MA 02215
Email: [email protected]
Xiang Gong College of Electrical and Computer Engineering
Northeastern University Boston MA 02215
Email: [email protected]
![Page 2: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/2.jpg)
• DMTCP (Distributed Mul2Threaded Checkpoin2ng)
• A tool to transparently checkpoint the state of mul2ple simultaneous applica2ons, including mul2-‐threaded and distributed applica2ons.
• hCp://dmtcp.sourceforge.net/
What is the DMTCP?
![Page 3: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/3.jpg)
• Mac is used extensively • No DMTCP in Mac recently
Why porting to Mac
![Page 4: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/4.jpg)
What informa2on of a process we should pay aCen2on to: • libraries • data • stack • heap • threads • open file descriptors • signal status • mutexes • process envrionment
How to do that?
![Page 5: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/5.jpg)
How implemented in Linux and some Unix
![Page 6: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/6.jpg)
But when it comes to Mac OS X ...
![Page 7: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/7.jpg)
In Mac Distinction in Some Commands
![Page 8: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/8.jpg)
In Mac Distinction in System Construction
![Page 9: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/9.jpg)
WHAT SHOULD WE DO?
![Page 10: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/10.jpg)
Option One :
![Page 11: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/11.jpg)
How to Construct a Linux-like Procfs in Mac OS X:
• Is MacFUSE the perfect solu2on for us?
• MacFUSE is a Mac OS X implementa2on of the FUSE (File System in User Space) mechanism.
![Page 12: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/12.jpg)
We feel less hope, then we try another method.
![Page 13: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/13.jpg)
Then, we roll back to the previous problem, thinking an alternative.
![Page 14: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/14.jpg)
Option Two:
![Page 15: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/15.jpg)
The VMA of a Process in Details
![Page 16: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/16.jpg)
• Find the Memory Range for the stack
A Demo
![Page 17: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/17.jpg)
• Signal Func2on
• Sigac2on Func2on -‐-‐ If you use a global variable to flag a signal from a signal-‐handler func2on, it should be of the special type sig_atomic_t.
• System Call Abuse -‐-‐ e.g. access() system call.
Different mechanisms when it comes the memory boundary
![Page 18: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/18.jpg)
Quick Video Demo – Find Heap
![Page 19: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/19.jpg)
• Considerably Complicated
• Right now, we choose “libc” as a beginning, and we make it.
Probing the Libraries
![Page 20: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/20.jpg)
VS
What discovered during the work
![Page 21: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/21.jpg)
Enhanced Access() Usage
![Page 22: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/22.jpg)
Result of Enhanced Access()
![Page 23: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/23.jpg)
FUTURE WORK …
![Page 24: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/24.jpg)
• Using access() call to replace sigac2on() call successes in Linux, but crashes on Mac, need
to figure out.
• Enhanced Access() can only get all the valid addresses in a vague way, without showing which does a segment of memory address should belongs to.
• We can only find the memory range of libc, con2nued work is needed to find other libs, if existed. • The access right of each memory segment is is also unknown.
![Page 25: Porting dmtcp mac_slides](https://reader034.vdocuments.site/reader034/viewer/2022052316/5590bf891a28ab2c118b45e8/html5/thumbnails/25.jpg)
• We would like to thank Prof. Gene Cooperman for every instruc2ons he gave to us and for the research spirit he conveyed to us.
• We would like to acknowledge Kapil and Vlad, for the system knowledge they taught us.
• Finally, I’d like to thank Mr. Rick, a classmate in my another course, for introducing me such a wonderful tool to depict the sketch.
Acknowledgments