Porting C/C++ Applications to the Web PROJECT P1 Fundamental Research Group

Total Page:16

File Type:pdf, Size:1020Kb

Porting C/C++ Applications to the Web PROJECT P1 Fundamental Research Group Porting C/C++ applications to the web PROJECT P1 Fundamental Research Group Mentors Nagesh Karmali Rajesh Kushalkar Interns Ajit Kumar Akash Soni Sarthak Mishra Shikhar Suman Yasasvi V Peruvemba List of Contents Project Description Simavr Understanding the Problem Overall Problems Emscripten References Vim.wasm Tetris PNGCrush.js Project Description Lots of educational tools like electronic simulators, emulators, IDEs, etc. are written mostly as a native C/C++ applications. This project is focussed on making these applications run on the web as a service in the cloud. It is focused on porting these desktop applications into their JavaScript counterparts. Understanding the problem 1. Converting the underlying logic written in C/C++ into it’s analogous Javascript file 2. Making sure minimum performance loss occurs during porting. Emscripten 1. Emscripten is an Open Source LLVM to JavaScript compiler. 2. Compile any other code that can be translated into LLVM bitcode into JavaScript. https://emscripten.org/docs/introducing_emscrip ten/about_emscripten.html Installing Emscripten # Get the emsdk repo git clone https://github.com/emscripten-core/emsdk.git # Enter that directory cd emsdk # Fetch the latest version of the emsdk (not needed the first time you clone) git pull # Download and install the latest SDK tools. ./emsdk install latest # Make the "latest" SDK "active" for the current user. (writes ~/.emscripten file) ./emsdk activate latest # Activate PATH and other environment variables in the current terminal source ./emsdk_env.sh Porting of Vim Github Repository https://github.com/rhysd/vim.wasm Source files of Vim that are slightly modified can be found here - https://github.com/rhysd/vim.wasm/compare/a9604e61451707b38fdcb088fbfaeea 2b922fef6...f375d042138c824e3e149e0994b791248f2ecf41#files The Vim Editor is completely written in C. Hence, we can use Emscripten, the LLVM to Web Assembly compiler, to convert the C/C++ code to JavaScript which can later be hosted on the web. The entire Vim codebase is of around 2,00,000-3,00,000 lines of code. Making it insanely difficult for us to understand it, in turn causing a major roadblock in calling the right functions according to input in the generated js file. Errors Faced 1. Web Assembly is not recognised by Ubuntu as a valid MIME (Multipurpose Internet Mail Extensions). So the line ‘application/wasm wasm’ Had to be added to the list of MIME types in /etc/mime.types 2. A function called “Pointer_stringify” was being used by the Ported program, but it has been removed from Emscripten. Hence, we had to use another function called “UTF8toString” which resolved this particular issue. 3. In the same string of the Issue raised with the creator, It was found that they also faced the same problems with the emterpret() function, with Asynchronous operations occurring in the “Vim.js” file. It required a much greater and in-depth look into the functioning of emterpret() to solve this issue. Port of the Tetris game Making appropriate Understanding Adding the web changes in C++ Porting of the game the c++ source assets(HTML,CSS) source code to make to Web using code it compatible with emscipten. emscipten. 1. Understanding the code 1. Codebase consists of c++ class files(.cpp) and header files(.h). That represents objects within the context of the game. 2. The various classes include the Piece class ,Board class and the Game class. 3. The constants.h stores all the global variable used in the project so as to increase the readability of the code. 4. The Piece class contains logic to define pieces in terms of shape,color,current orientation .It contains functions to move display the block(move),to rotate the block(rotate)and the isblock() function to determine which kind of piece is present, its location and orientation. 5. The board class instances of pieces class and contains functions to display pieces which have reached the bottom of the board,detect collision between the pieces and to the unite function to clear any full row from the board,moving all pieces above it down by one and to increase the score by one. 6. The game class contains functions to manage the whole game,including generating new random pieces and to enable one to move pieces around the board with key presses. 7. The main.cpp acts as the entry point to the game and runs the game loop until SDL_quit is triggered. 2. Adding the web 1. The game requires us to add basic frontend to display the game in the browser. 2. The HTML files creates a canvas on which the game can be loaded and also includes a div tag under which the current score will be displayed using the inner.hmtl attribute . 3. The css file is optional but is required to display the current score in exactly the same font as would have been displayed by SDL2_ttf(true type font). 3. Making changes in C++ files 1. Although SDL_ttf is supported by emscipten and can be ported but since its function is only to display the score so for reducing the unnecessary complexity of the program we remove the use of SDL_ttf to display score in the DOM. 2. Since the display score is not part of the c++ file so we remove the extra space allotted in the screen height global variable. 3. In the Board class we change the display_score() function so that the score will be displayed by DOM.here emscripten_run_script action finds the<span> element on the DOM and sets the inner html to the current score. 4. Now since the SDL_ttf is not required we update all the functions and header files using the SDL_ttf library. 5. Emscipten provides a emscipten_set_main_loop function that accepts a em_callback_func looping function.however the gameloop() can’t be passed to em_callback_func since it will fail to build.so we remove the game class itself and move the logic to main.cpp and reorder in such a way that all the functions are declared before they are used. 4. Porting of the game to the web using emscripten. 1. To port the game to the web first navigate to the project directory. 2. In the command line type-emcc --bind src/board.cpp src/piece.cpp src/main.cpp -std=c++14 -O3 -s WASM=1 -s USE MODULARIZE=1 -s USE_SDL -o public/index.js 3. To run the game type emrun --browser firefox(chrome from google chrome) --no_emrun_detect public/index.html PNGCrush PNGCrush is a free and open-source command-line utility for optimizing PNG image files. It reduces the size of the file losslessly – that is, the resulting "crushed" image will have the same quality as the source image. It is mainly written in C programming language. ● Open Source Command-line .png image optimizer ● Reduces the size of .png images based on various compression methods Porting Process for PNG Crush Get Source File Changes were made in Binary code file was generated PNGCRUSH makefile of PNG Crush through emscripten which was further used to generate the js file PNG Crush v1.8.11 used . Instead of compiling with gcc, it emcc pngcrush.bc -o pngcrush.js was compiled with emscripten compiler emcc. Source code : https://pmt.sourceforge.io/pngc rush/ Problems Faced 1. The original PNG Crush runs through the terminal and accepts two parameters <INPUT.PNG> and <OUTPUT.PNG> with optional flags 2. Reading / Writing files Giving files to files as input to C++ is EASY :) but there is no direct method to give file inputs to JavaScript :( Sol : Emscripten has a rich File System API which is not included to js file by default but can be included as FS in module object during compile process. FS.createDataFile(“/”, “file_name.png”,byteArray, true, true); FS.deleteFile("/file_name.png"); 3. Communicating with Module object of the generated js File Emscripten provides a global Module object that is used to interact with the ported c++ code. 4. Allowing Users to download the compressed file Sol : This was achieved through creation of Blob object and filsaver.js which has the implementation of saveAs() functionality in javaScript GitHub Link : https://github.com/eligrey/FileSaver.js/ Implementing a Getting image as input Compressing the image with minimal HTML page and sending it to Module[‘run’] generated js file The web page allows the user to This was achieved by using the Created files were given to Module[‘run’] in upload PNG image and get the inbuilt File Reader API of the js. generated js file, this populates the output.png with compressed file. The image was read in an compressed image. The compressed image is now base64 encoding and converted available to download. to byteArrayBuffer via b64.js.. The files input.png and output.png were created using Emscripten FS api SimAvr 1. A lean and mean Atmel AVR simulator for linux.(or any platform which uses avr-gcc) 2. The simulator takes input as ELF file(s)(.hex) and generates corresponding waves using gtkwave(tool, as waveform viewer). 3. It outputs signals like interrupts to be dumped into the file which is then used by gtkwave to plot corres. Waves. 4. It serves, thus, much as a Debugger for avr codes and also emulating peripherals to test before using on actual Hardware. ● Compiled and run on the machine and it runs fine. ● Code contains .c and .h files in two folders. ● Tried to compile using Emscripten; successful in generating .bc file of whole project but improper generation of.js, became the turning point. Raised Issues Repo: https://github.com/emscripten-core/emscripten/issues/8799 Overall Problems till now ● Communication with Emscripten port ● Lack of support for some part of openGL and SDL libraries ● Any program that needs to be ported, must be very scrutinously picked apart for it’s various functionalities, i.e it is pivotal to know each and every functionality of the given program that we try to port..
Recommended publications
  • Emscripten: an LLVM to Javascript Compiler
    Emscripten: An LLVM to JavaScript Compiler Alon Zakai Mozilla What? Why? Compiling to JavaScript ● The web is everywhere – PCs to iPads – No plugins, no installation required – Built on standards ● The web runs JavaScript Existing Compilers to JavaScript ● Google Web Toolkit: Java (Gmail, etc.) ● CoffeeScript ● Pyjamas: Python ● SCM2JS: Scheme ● JSIL: .NET bytecode ● (and many more) ● But C and C++ are missing! Emscripten ● Enables compiling C and C++ into JavaScript ● Written in JavaScript ● Open source http://emscripten.org https://github.com/kripken/emscripten Demos! ● Bullet ● SQLite ● Python, Ruby, Lua ● Real-world code – Large, complex codebases ● Manual ports exist – Typically partial and not up to date The Big Picture C or C++ LLVM Bitcode JavaScript Low Level Virtual Machine (LLVM) ● A compiler project (cf. GCC) ● Intermediate Representation: LLVM bitcode – Very well documented – Great tools ● Much easier to compile LLVM bitcode than compile C or C++ directly! How? Code Comparison #include <stdio.h> int main() { printf(“hello, world!\n”); return 0; } Code Comparison @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 define i32 @main() { entry: %retval = alloca i32, align 4 call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) store i32 0, i32* %retval ret i32 %retval } Code Comparison define i32 @main() { function _main() { entry: %retval = alloca i32, var _retval; align 4 call i32 (i8*, ...)* _printf (..); @printf (..) store i32 0, i32* _retval = 0; %retval ret
    [Show full text]
  • A Java Implementation of a Portable Desktop Manager Scott .J Griswold University of North Florida
    UNF Digital Commons UNF Graduate Theses and Dissertations Student Scholarship 1998 A Java Implementation of a Portable Desktop Manager Scott .J Griswold University of North Florida Suggested Citation Griswold, Scott .,J "A Java Implementation of a Portable Desktop Manager" (1998). UNF Graduate Theses and Dissertations. 95. https://digitalcommons.unf.edu/etd/95 This Master's Thesis is brought to you for free and open access by the Student Scholarship at UNF Digital Commons. It has been accepted for inclusion in UNF Graduate Theses and Dissertations by an authorized administrator of UNF Digital Commons. For more information, please contact Digital Projects. © 1998 All Rights Reserved A JAVA IMPLEMENTATION OF A PORTABLE DESKTOP MANAGER by Scott J. Griswold A thesis submitted to the Department of Computer and Information Sciences in partial fulfillment of the requirements for the degree of Master of Science in Computer and Information Sciences UNIVERSITY OF NORTH FLORIDA DEPARTMENT OF COMPUTER AND INFORMATION SCIENCES April, 1998 The thesis "A Java Implementation of a Portable Desktop Manager" submitted by Scott J. Griswold in partial fulfillment of the requirements for the degree of Master of Science in Computer and Information Sciences has been ee Date APpr Signature Deleted Dr. Ralph Butler Thesis Advisor and Committee Chairperson Signature Deleted Dr. Yap S. Chua Signature Deleted Accepted for the Department of Computer and Information Sciences Signature Deleted i/2-{/1~ Dr. Charles N. Winton Chairperson of the Department Accepted for the College of Computing Sciences and E Signature Deleted Dr. Charles N. Winton Acting Dean of the College Accepted for the University: Signature Deleted Dr.
    [Show full text]
  • Webassembly a New World of Native Exploits on the Web Agenda
    WebAssembly A New World Of Native Exploits On The Web Agenda • Introduction • The WebAssembly Platform • Emscripten • Possible Exploit Scenarios • Conclusion Wasm: What is it good for? ● Archive.org web emulators ● Image/processing ● Video Games ● 3D Modeling ● Cryptography Libraries ● Desktop Application Ports Wasm: Crazy Incoming ● Browsix, jslinux ● Runtime.js (Node), Nebulet ● Cervus ● eWASM Java Applet Joke Slide ● Sandboxed ● Virtual Machine, runs its own instruction set ● Runs in your browser ● Write once, run anywhere ● In the future, will be embedded in other targets What Is WebAssembly? ● A relatively small set of low-level instructions ○ Instructions are executed by browsers ● Native code can be compiled into WebAssembly ○ Allows web developers to take their native C/C++ code to the browser ■ Or Rust, or Go, or anything else that can compile to Wasm ○ Improved Performance Over JavaScript ● Already widely supported in the latest versions of all major browsers ○ Not limited to running in browsers, Wasm could be anywhere Wasm: A Stack Machine Text Format Example Linear Memory Model Subtitle Function Pointers Wasm in the Browser ● Wasm doesn’t have access to memory, DOM, etc. ● Wasm functions can be exported to be callable from JS ● JS functions can be imported into Wasm ● Wasm’s linear memory is a JS resizable ArrayBuffer ● Memory can be shared across instances of Wasm ● Tables are accessible via JS, or can be shared to other instances of Wasm Demo: Wasm in a nutshell Emscripten ● Emscripten is an SDK that compiles C/C++ into .wasm binaries ● LLVM/Clang derivative ● Includes built-in C libraries, etc. ● Also produces JS and HTML code to allow easy integration into a site.
    [Show full text]
  • Moxa Nport Real TTY Driver for Arm-Based Platform Porting Guide
    Moxa NPort Real TTY Driver for Arm-based Platform Porting Guide Moxa Technical Support Team [email protected] Contents 1 Introduction ...................................................................................2 2 Porting to the Moxa UC-Series—Arm-based Computer ....................2 2.1 Build binaries on a general Arm platform ...................................................... 2 2.2 Cross-compiler and the Real TTY driver ........................................................ 3 2.3 Moxa cross-compiling interactive script......................................................... 4 2.4 Manually build the Real TTY driver with a cross-compiler ................................ 5 2.5 Deploy cross-compiled binary to target......................................................... 8 3 Porting to Raspberry Pi OS .............................................................9 4 Porting to the Yocto Project on Raspberry Pi ................................ 10 4.1 Prerequisite............................................................................................... 10 4.2 Create a Moxa layer for the Yocto Project..................................................... 11 4.3 Install a Moxa layer into the Yocto Project.................................................... 17 4.4 Deploy the Yocto image in Raspberry Pi ....................................................... 17 4.5 Start the Real TTY driver in Raspberry Pi ..................................................... 18 4.6 Set the default tty mapping to the Real TTY configuration ............................
    [Show full text]
  • Javascript to Webassembly Cross Compiler Studienarbeit
    JavaScript to WebAssembly Cross Compiler Studienarbeit Abteilung Informatik Hochschule für Technik Rapperswil Herbstsemester 2018 Autoren: Matteo Kamm, Mike Marti Betreuer: Prof. Dr. Luc Bläser Projektpartner: Institute for Networked Solutions Inhaltsverzeichnis 1 Abstract 3 2 Einführung 4 2.1 Ausgangslage . .4 2.2 Übersicht . .5 2.2.1 Beispiel . .6 2.3 Struktur des Berichts . .7 3 Language Set 8 3.1 Grundsatz des Subsets . .8 3.2 Typen . .9 3.3 Unterstützte Sprachkonstrukte . .9 4 Cross Compilation 11 4.1 Typinferenz . 11 4.2 Template-Based Code Generation . 11 4.2.1 Unäre Operatoren . 12 4.2.2 Binäre Operationen . 12 4.2.3 Expression Statements . 13 4.2.4 Arrayzugriffe . 13 4.3 Control Flow . 15 4.3.1 Block Statement . 15 4.3.2 Branching . 15 4.3.3 While-Loop . 17 4.3.4 For-Loop . 19 4.4 Variablen-Allokation . 19 4.5 Funktionsaufrufe . 20 5 Laufzeitunterstützung 21 5.1 Prüfen der Funktionssignatur . 21 5.2 Kopieren der Array Parameter . 21 5.3 Konvertieren des zurückgegebenen Resultats . 21 5.4 Out Parameter . 21 5.5 Speicher . 22 5.5.1 Import . 22 5.5.2 Export . 22 6 Auswertung 23 6.1 Testfälle . 23 6.2 Setup . 23 6.3 Resultate . 24 6.3.1 Speedup . 24 6.3.2 Varianz . 26 6.3.3 Vergleich zu C++ . 27 6.3.4 Webpack Development Modus . 28 6.4 Fazit . 28 7 Schlussfolgerung 29 7.1 Ausblick . 29 1 Anhang 30 A Erläuterung Language Set 30 A.1 Typen . 30 A.2 Numerische Erweiterung . 30 A.3 Abweichungen der binären Operatoren zu JavaScript .
    [Show full text]
  • Hi, My Name Is Chad Ausen, Technical Director at IMVU, and Today We're Go
    Hi, my name is Chad Aus0n, technical director at IMVU, and today we’re going to talk about a library we’ve developed for connec0ng C++ and JavaScript with Emscripten. 1 2 IMVU is an online social plaorm where you can sign up, dress up an avatar, and meet people from all around the world. We offer other ac0vi0es such as games as well. 3 The content in our world is created by our customers, and to our knowledge, we have the largest catalog of 3D virtual goods on the Internet. 4 We currently offer a downloadable applicaon for Windows and Mac. Windows and Mac are great plaorms, but in recent years, other plaorms have grown to prominence. We’d like our content available everywhere: mobile plaorms, desktop, server-side renderers, and even the web browser! For almost all plaorms, it’s obvious that C++ is a great choice for the core engine. However, our big ques0on was, what about the web browser? In 2011, I benchmarked an upcoming tool called Emscripten and was quite impressed. 5 Emscripten works very well in prac0ce, so the implicaon is that C++ is the portable, high-performance language EVERYWHERE. 6 Here is our Emscripten applicaon running in Firefox. UI is HTML and CSS. Chat over WebSockets, graphics in WebGL. 7 asm.js is the subset of JavaScript that can be stacally compiled into machine code. More informaon at h`p://asmjs.org/ 8 The C heap is stored in an ArrayBuffer in JavaScript. One con0guous blob of memory. This memory is indexed by eight different typed array views that alias each other.
    [Show full text]
  • Static Typescript
    1 Static TypeScript 56 2 57 3 An Implementation of a Static Compiler for the TypeScript Language 58 4 59 5 60 6 Thomas Ball Peli de Halleux Michał Moskal 61 7 Microsoft Research Microsoft Research Microsoft Research 62 8 Redmond, WA, United States Redmond, WA, United States Redmond, WA, United States 63 9 [email protected] [email protected] [email protected] 64 10 Abstract 65 11 66 12 While the programming of microcontroller-based embed- 67 13 dable devices typically is the realm of the C language, such 68 14 devices are now finding their way into the classroom forCS 69 15 education, even at the level of middle school. As a result, the 70 16 use of scripting languages (such as JavaScript and Python) 71 17 for microcontrollers is on the rise. 72 18 We present Static TypeScript (STS), a subset of TypeScript (a) (b) 73 19 (itself, a gradually typed superset of JavaScript), and its com- 74 20 piler/linker toolchain, which is implemented fully in Type- Figure 1. Two Cortex-M0 microcontroller-based educational 75 21 Script and runs in the web browser. STS is designed to be use- devices: (a) the BBC micro:bit has a Nordic nRF51822 MCU 76 22 ful in practice (especially in education), while being amenable with 16 kB RAM and 256 kB flash; (b) Adafruit’s Circuit Play- 77 23 to static compilation targeting small devices. A user’s STS ground Express (https://adafruit.com/products/3333) has an 78 24 program is compiled to machine code in the browser and Atmel SAMD21 MCU with 32 kB RAM and 256 kB flash.
    [Show full text]
  • Gnu Compiler Collection Backend Port for the Integral Parallel Architecture
    U.P.B. Sci. Bull., Series C, Vol. 74, Iss. 3, 2012 ISSN 1454-234x GNU COMPILER COLLECTION BACKEND PORT FOR THE INTEGRAL PARALLEL ARCHITECTURE Radu HOBINCU1, Valeriu CODREANU2, Lucian PETRICĂ3 Lucrarea de față prezintă procesul de portare a compilatorului GCC oferit de către Free Software Foundation pentru arhitectura hibridă Integral Parallel Architecture, constituită dintr-un controller multithreading și o mașina vectorială SIMD. Este bine cunoscut faptul că motivul principal pentru care mașinile hibride ca și cele vectoriale sunt dificil de utilizat eficient, este programabilitatea. În această lucrare vom demonstra că folosind un compilator open-source și facilitățile de care acesta dispune, putem ușura procesul de dezvoltare software pentru aplicații complexe. This paper presents the process of porting the GCC compiler offered by the Free Software Foundation, for the hybrid Integral Parallel Architecture composed of an interleaved multithreading controller and a vectorial SIMD machine. It is well known that the main reason for which hybrid and vectorial machines are difficult to use efficiently, is programmability. In this paper we well show that by using an open-source compiler and the features it provides, we can ease the software developing process for complex applications. Keywords: integral parallel architecture, multithreading, interleaved multithreading, bubble-free embedded architecture for multithreading, compiler, GCC, backend port 1. Introduction The development of hardware technology in the last decades has required the programmers to offer support for the new features and performances of the last generation processors. This support comes as more complex compilers that have to use the machines' capabilities at their best, and more complex operating systems that need to meet the users' demand for speed, flexibility and accessibility.
    [Show full text]
  • BROWSIX: Bridging the Gap Between Unix and the Browser Bobby Powers, John Vilk, Emery D
    BROWSIX: Bridging the Gap Between Unix and the Browser Bobby Powers, John Vilk, Emery D. Berger University of Massachusetts Amherst Abstract As a representative example, websites like ShareLaTeX1 2 A Applications written to run on conventional operating sys- and Overleaf let users write and edit LTEX documents in the tems typically depend on OS abstractions like processes, pipes, browser without the need to install a TEX distribution locally. signals, sockets, and a shared file system. Porting these ap- This workflow lowers the barrier for students and first-time A plications to the web currently requires extensive rewriting LTEX authors and enables real-time collaboration, eliminating or hosting significant portions of code server-side because some of the complexity of creating multi-author documents. browsers present a nontraditional runtime environment that These applications achieve this functionality by providing a lacks OS functionality. browser-based frontend for editing; user input is sent to the server for persistence and collaboration purposes. When the This paper presents BROWSIX, a framework that bridges pdflatex the considerable gap between conventional operating systems user requests a generated PDF, the website runs bibtex and the browser, enabling unmodified programs expecting a and server-side on the user’s behalf, with the resulting PDF sent to the browser when complete. Unix-like environment to run directly in the browser. BROWSIX comprises two core parts: (1) a JavaScript-only system that These web applications generate PDFs server-side out of makes core Unix features (including pipes, concurrent pro- necessity because browsers lack the operating system services cesses, signals, sockets, and a shared file system) available to and execution environment that Unix programs expect.
    [Show full text]
  • Porting the QEMU Virtualization Software to MINIX 3
    Porting the QEMU virtualization software to MINIX 3 Master's thesis in Computer Science Erik van der Kouwe Student number 1397273 [email protected] Vrije Universiteit Amsterdam Faculty of Sciences Department of Mathematics and Computer Science Supervised by dr. Andrew S. Tanenbaum Second reader: dr. Herbert Bos 12 August 2009 Abstract The MINIX 3 operating system aims to make computers more reliable and more secure by keeping privileged code small and simple. Unfortunately, at the moment only few major programs have been ported to MINIX. In particular, no virtualization software is available. By isolating software environments from each other, virtualization aids in software development and provides an additional way to achieve reliability and security. It is unclear whether virtualization software can run efficiently within the constraints of MINIX' microkernel design. To determine whether MINIX is capable of running virtualization software, I have ported QEMU to it. QEMU provides full system virtualization, aiming in particular at portability and speed. I find that QEMU can be ported to MINIX, but that this requires a number of changes to be made to both programs. Allowing QEMU to run mainly involves adding standardized POSIX functions that were previously missing in MINIX. These additions do not conflict with MINIX' design principles and their availability makes porting other software easier. A list of recommendations is provided that could further simplify porting software to MINIX. Besides just porting QEMU, I also investigate what performance bottlenecks it experiences on MINIX. Several areas are found where MINIX does not perform as well as Linux. The causes for these differences are investigated.
    [Show full text]
  • UNIX Operating System Porting Experiences*
    UNIX Operating System Porting Experiences* D. E. BODENSTAB, T. F. HOUGHTON, K. A. KELLEMAN, G. RONKIN, and E. P. SCHAN ABSTRACT One of the reasons for the dramatic growth in popularity of the UNIX(TM) operating sys- tem is the portability of both the operating system and its associated user-level programs. This paper highlights the portability of the UNIX operating system, presents some gen- eral porting considerations, and shows how some of the ideas were used in actual UNIX operating system porting efforts. Discussions of the efforts associated with porting the UNIX operating system to an Intel(TM) 8086-based system, two UNIVAC(TM) 1100 Series processors, and the AT&T 3B20S and 3B5 minicomputers are presented. I. INTRODUCTION One of the reasons for the dramatic growth in popularity of the UNIX [1, 2] operating system is the high degree of portability exhibited by the operating system and its associated user-level programs. Although developed in 1969 on a Digital Equipment Corporation PDP7(TM), the UNIX operating system has since been ported to a number of processors varying in size from 16-bit microprocessors to 32-bit main- frames. This high degree of portability has made the UNIX operating system a candidate to meet the diverse computing needs of the office and computing center environments. This paper highlights some of the porting issues associated with porting the UNIX operating system to a variety of processors. The bulk of the paper discusses issues associated with porting the UNIX operat- ing system kernel. User-level porting issues are not discussed in detail.
    [Show full text]
  • Prioritizing Pull Requests
    Prioritizing pull requests Version of June 17, 2015 Erik van der Veen Prioritizing pull requests THESIS submitted in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE in COMPUTER SCIENCE by Erik van der Veen born in Voorburg, the Netherlands Software Engineering Research Group Q42 Department of Software Technology Waldorpstraat 17F Faculty EEMCS, Delft University of Technology 2521 CA Delft, the Netherlands The Hague, the Netherlands www.ewi.tudelft.nl www.q42.com c 2014 Erik van der Veen. Cover picture: Finding the pull request that needs the most attention. Prioritizing pull requests Author: Erik van der Veen Student id: 1509381 Email: [email protected] Abstract Previous work showed that in the pull-based development model integrators face challenges with regard to prioritizing work in the face of multiple concurrent pull requests. We identified the manual prioritization heuristics applied by integrators and ex- tracted features from these heuristics. The features are used to train a machine learning model, which is capable of predicting a pull request’s importance. The importance is then used to create a prioritized order of the pull requests. Our main contribution is the design and initial implementation of a prototype service, called PRioritizer, which automatically prioritizes pull requests. The service works like a priority inbox for pull requests, recommending the top pull requests the project owner should focus on. It keeps the pull request list up-to-date when pull requests are merged or closed. In addition, the service provides functionality that GitHub is currently lacking. We implemented pairwise pull request conflict detection and several new filter and sorting options e.g.
    [Show full text]