Data Structures and Algorithms for Data-Parallel Computing in a Managed Runtime
Total Page:16
File Type:pdf, Size:1020Kb
Data Structures and Algorithms for Data-Parallel Computing in a Managed Runtime THÈSE NO 6264 (2014) PRÉSENTÉE LE 1ER SEPTEMBRE 2014 À LA FACULTÉ INFORMATIQUE ET COMMUNICATIONS LABORATOIRE DE MÉTHODES DE PROGRAMMATION 1 PROGRAMME DOCTORAL EN INFORMATIQUE, COMMUNICATIONS ET INFORMATION ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE POUR L'OBTENTION DU GRADE DE DOCTEUR ÈS SCIENCES PAR Aleksandar PROKOPEC acceptée sur proposition du jury: Prof. O. N. A. Svensson, président du jury Prof. M. Odersky, directeur de thèse Prof. D. S. Lea, rapporteur Prof. V. Kuncak, rapporteur Prof. E. Meijer, rapporteur Suisse 2014 Go confidently in the direction of your dreams. Live the life you’ve imagined. — Thoreau To my parents and everything they gave me in this life. Acknowledgements Writing an acknowledgment section is a tricky task. I always feared omitting somebody really important here. Through the last few years, whenever I remembered a person that influenced my life in some way, I made a note to put that person here. I really hope I didn’t forget anybody important. And by important I mean: anybody who somehow contributed to me obtaining a PhD in computer science. So get ready – this will be a long acknowledgement section. If somebody feels left out, he should know that it was probably by mistake. Anyway, here it goes. First of all, I would like to thank my PhD thesis advisor Martin Odersky for letting me be a part of the Scala Team at EPFL during the last five years. Being a part of development of something as big as Scala was an amazing experience and I am nothing but thankful for it. I want to thank my colleagues in the LAMP laboratory, who I had the chance to spend time with over the years – Antonio Cunei (good ol’ Toni-boy), Ingo Maier (also known as Ingoman), Iulian Dragos, Lukas (Scalawalker) Rytz, Michel Schinz, Gilles Dubochet, Philipp Haller, Tiark Rompf, Donna Malayeri, Adriaan Moors, Hubert Plociniczak, Miguel Garcia, Vlad Ureche, Nada Amin, Denys Shabalin, Eugene Burmako, Sébastien Doeraene, Manohar Jonnalagedda, Sandro Stucki, Christopher Jan Vogt, Vojin Jovanovic, Heather Miller, Dmitry Petrashko and Samuel Grütter. I also want to thank my neigh- bouring office colleague Ružica Piskač for her constant positive attitude, regardless of my occasional mischiefs. I especially want to thank our secretary Danielle Chamberlain for her optimism and help in administrative matters, and our administrator Fabien Salvi for his technical support – the guy who had a solution for any computer-related problem I could think of. A person that stood out during my time spent in LAMP is Phil Bagwell. Phil and I were on a similar wavelength – we were both passionate about data structures, whether mutable, persistent or concurrent. We spent many hours discussing ideas, challenging each other’s approaches, finding and patching holes in our algorithms, and this ultimately lead to publishing great results. Although Phil is no longer with us at the time of writing this, I want to thank him for encouraging me to pursue my own ideas, and helping me get recognition. v Acknowledgements Through the years, I was fortunate to supervise semester and master projects of several exceptional students. I feel that I have to mention at least a few of them. First, I want to thank Ngoc Duy Pham for the preliminary exploration of the techniques used in the ScalaMeter framework. It was a pleasure to collaborate with him, and together arrive at the conclusions that later served as foundations for ScalaMeter. Then, I want to thank Roman Zoller – his contributions to ScalaMeter no doubt attracted many new users. Also, I’d like to say thanks to Nicolas Stucki for his work on Scala multisets, Timo Babst for his contribution to the benchmark applications for ScalaBlitz, and Joel Rossier for his work on the MacroGL library. When it comes to external collaborations, I’d like to thank the Akka team, prof. Kunle Olukotun and his team at Stanford, and most of all Nathan Bronson, for the discussions we’ve had on data structures and concurrent programming. I especially want to thank Viktor Kunčak for his continuous help during these years. I have to thank Erik Meijer for an incredible five-day adventure we had in October 2013. Then, my thanks goes to Doug Lea for his support and, especially, the chat about seqlocks we had at ScalaDays 2011 – I think that was a turning point in my PhD. Conversations with Doug Lea almost always reveal a new surprising insight about computer science, and I enjoyed every single one we shared. I’m lucky to work in a similar field as him – in the swarms of compiler writers and type-systems people I was often surrounded with, talking to somebody who works on similar things felt like finding a long-lost friend. Finally, I would like to thank Viktor Kunčak, Erik Meijer and Doug Lea for agreeing to be on my thesis committee and for reviewing my thesis, as well as Ola Svensson for agreeing to be the thesis committee president. Speaking of teachers, I cannot write an acknowledgement section without mentioning my piano teacher Jasna Reba. It might seem that what you taught me about music is not related to computer science in any way, but I would strongly disagree. Computer science, like music, has rules, patterns and loose ends with space to express yourself – research can be as artistic as music. If nothing else, those long hours of practice helped me build the willpower and persistence to work hard until reaching perfection. Thank you for that. Although not directly related to computer science and this thesis, I’d like to thank Zlatko Varošanec for teaching the fundamentals of physics to a small group of gifted kids, myself included, in his physics cabinet. Your attention to details influenced me a lot during my life. Although I did not end up studying physics, I have to thank Dario Mičić for translating all those Russian physics exercise books, and Tihomir Engelsfeld for his support. When it comes to physics, I have to thank Juraj Szavits-Nossan, as well – without your selfless committment to teach us advanced physics every Saturday morning for four years without receiving any kind of compensation, me and many other people vi Acknowledgements would never have ended up on International Physics Olympiads. I want to thank Senka Sedmak for teaching me how to think. Before we met in high school, mathematics was just a dry collection of methods used to compute something. That changed on a September day in the year 2000 when I saw your simple proof of Pythagora’s theorem. At that point, things stopped being just about the how, and started being about the why. You showed me and generations of students how to reason in mathematics, and in life in general. Well, at least those who were willing to listen. Marko Čupić is also a person who deserves to be mentioned here. Without your splendid Saturday morning initiative, many computer science students would get a diploma with- out the opportunity to learn Java, myself included. I want to thank Marin Golub for his counselling during my master thesis, and Željka Mihajlović for the great computer graphics course. When it comes to my personal friends, I want to thank my good friend Gvero for all the good times we had since we simultaneously started working on our PhDs. After we arrived to Lausanne, my parents said how they hoped that this was the beginning of a long and great friendship. We soon started our apartment search. During this adventure I had to play the piano to retired Swiss ladies, we almost ended up taking the rent for an apartment filled with drug dealers, we got yelled at and threatened a couple of times, and, finally, we ended up having a bathtub in our bedroom for some reason. My parents’ hopes came true – somewhere along the way we’ve become good friends. Let’s keep it that way! I want to thank my dear friend Žac who I know since childhood. You often engaged me in discussions about software technology – sometimes even too often! I want to thank other friends and acquaintances in my life as well: Boris and Mario for the discussions about the Zoo-kindergarten; Ida Barišić and her family for bearing me every morning at 9:30AM when I would barge in to play video games; Tin Rajković for showing me his GameBoy and Sega console; Krešimir for giving me his third release of the Hacker magazine (and protecting me from getting beaten a couple of times); Predrag Valožić for bringing those disquettes with Theme Park, and the words of wisdom he spoke after Theme Park would not run on my 486 PC; Julijan Vaniš for all those hours spent playing StarCraft; Damjan Šprem, Domagoj Novosel and Marko Mrkus for unforgettable days in high school; Dina Zjača for all the nice moments we had together, and encouraging me to pursue a PhD; Tomislav Car for believing in me; Josip and Eugen for teaching me about life; and Peđa Spasojević and Dražen Nadoveza for awesome lunchtimes, and weekends spent skiing. I want to thank Dalibor Mucko for all the good times we had together. I only regret that I never witnessed the advances you could have made in CS with your intellect, had you chosen to follow that path – I still hope someday you do. In any case, a separate, possibly longer thesis would be required to describe our crazy vii Acknowledgements adventures. Enumerating all of them is quite possibly Turing-complete. Not to mention our brilliant e-mail discussions – they helped me get through every bad day of PhD.