\section{Introduction}
The main purpouse of this document is to sum up the work done during the project for the \textit{Advanced Operating Systems} course.

\subsection{Problem statement}
Quoting the project assignment of the project, the goal is to \textit{Compile a OpenCL runtime (pocl) on a ARM board. Run some benchmarks. Provide a comparison in terms of execution time, power/energy consumption.}\\
Let's characterize more in detail the hardware and software used for the project.

\subsection{Hardware}

\subsubsection{ARM Board}
The main ARM board used for the project is a \textbf{ODROID-XU3} produced by \textbf{Hardkernel co., Ltd.} provided by the \textbf{HEAP lab}.\\
It mounts a CPU belongin to the \textbf{Arm big.LITTLE} series, in particular a Samsung Exynos5422 Cortex\texttrademark-A15 2Ghz and Cortex\texttrademark-A7 Octa core CPU.\\
The GPU is a \textbf{Mali-T628 MP6} that is certified for OpenGL ES 3.1/2.0/1.1 and OpenCL 1.2 Full profile.\\
This configuration of the board is equipped with \textbf{2Gbyte LPDDR3 RAM} PoP stacked.
\href{http://www.hardkernel.com/main/products/prdt_info.php?g_code=g140448267127}{You can visit the product page for further details on the hardware}\\
I also used an \textbf{ODROID-XU4} of my own to adavance in the completion of the project during the summer. I opted for this model since the previous model wasn't available from the producer, and the SOC platform (CPU and GPU) is identical with respect to the \textbf{ODOID-XU3} except for small differences with ports and integrated peripherals, and I don't expect that this have influenced the results of the benchmarks, also because the final results proposed here have been \textbf{always} produced with the board present in \textbf{laboratory}.\\
There is a small chance that problems may arise from the fact that I manly tested the auto-deployment scripts on my personal board during the summer when the University was closed, keep in mind that if there are some problems with the deploy scripts, since they may simply be differences on packages names or something like this.

\subsubsection{Power Measurement}
For the energy consumption measurements I used the \href{http://www.hardkernel.com/main/products/prdt_info.php?g_code=G137361754360}{Hardkernel Smart Power} provided me in the laboratory. I also had available an \href{http://www.hardkernel.com/main/products/prdt_info.php?g_code=G148048570542}{Hardkernel Smart Power 2} but unfortunately it wasn't compatible with the measurement software(detailed in the software paragraph).

\subsubsection{x86 Platform}
The comparison of performances with an \textbf{x86} platform have been made on a Thinkpad X1 Carbon 3rd gen. that mounts and \href{https://ark.intel.com/products/85212/Intel-Core-i5-5200U-Processor-3M-Cache-up-to-2_70-GHz}{\textbf{Intel i5 5200U CPU}} and 8 GB of ram.

\subsection{Software}
In this section we will describe the software component used for the development of the project.

\subsubsection{OS}
For what concerns the OS used during the development, I used the \textbf{Ubuntu 16.04.2 Kernel 4.9} image downloaded from the \href{http://odroid.com/dokuwiki/doku.php?id=en:xu3_release_linux_ubuntu_k49}{Hardkernel site}. I then used the suggested utility called \href{https://etcher.io/}{Etcher} to flash the image to the eMMC of the ODROID-XU4. I assume that also the flash of the ODROID-XU3 has been done in a similar way.

\subsubsection{OpenCL Runtime}
For the benchmarks we actually used two OpenCL runtimes.The one used for the integrated Mali GPU is provided in the repository directly by the Hardkernel developers, and can be installed via the \textbf{mali-fbdev} package.\\
Instead for the CPU we manually fetched and compiled the runtime provided by the \href{http://portablecl.org/}{Portable Computing Language (\textbf{pocl})}, version 0.14.

\subsubsection{Benchmark Suite}
The benchmark suite used is the \href{https://www.cs.virginia.edu/~skadron/wiki/rodinia/index.php/Rodinia:Accelerating_Compute-Intensive_Applications_with_Accelerators}{\textbf{Rodinia Benchmark Suite}, version 3.1}. This suite includes a lot of benchmarks specifically designed for systems that provide accelerators, and thus belong to the \textbf{heterogeneous computer systems} category. In fact the benchmarks provides parallelization features for three of the main parallel computing paradigms, that are \textbf{OpenMP, CUDA, and OpenCL}. We will of course use only the OpenCL benchmarks. The project has been started and it is mantained by the Computer Science Department of \href{https://engineering.virginia.edu/departments/computer-science}{\textbf{University of Virginia}}

\subsubsection{Result Analysis}
For what concerns the gathering and the analysis of the results obtained by the benchmarks, I mainly take advantage of \textbf{Bash} and \textbf{Python} scripts to collect the results, and also of \textbf{Gnuplot} to create graphs representing the results.

\pagebreak
