# CIE-Research-Internship, Simics: ## **Project name** : *Benchmarking scheduling algorithms with Simics* ## **Problem Statement** : *Utilizing Simics for the simulation of CPU scheduling algorithms and subsequent benchmarking.* ### Synopsis: > Simics stands as a comprehensive full-system simulator proficient in executing firmware and unaltered kernel and driver code. Its primary purpose is to facilitate the operation of unmodified production binaries tailored for the target hardware. Simics boasts the capability to simulate CPU boards, accommodating specific hardware configurations. > It is capable of simulating CPU boards as required with any specified hardware configuration. It also has a huge capability of being able to change the micro-architechture present on the board using a language called Device Modeling Language(DML). > > ![image](https://hackmd.io/_uploads/rJ1-oXDjp.png) > as seen in the above image I have simulated a 4 core X86 machine > with this it also starts a linux terminal with bash running on it and also a GUI monitor. > ![image](https://hackmd.io/_uploads/r1gwwHEwj6.png) > All of this is controlled by a terminal where a binary called simics is running ![image](https://hackmd.io/_uploads/BJlAHVDo6.png) ## Project Idea While running through the tutorials and observing a fully functional terminal within the Simics environment, with minimal additional processes compared to our own systems, which typically have numerous processes running upon booting up, I realized that this could serve as an ideal platform for testing the scheduling algorithms I am currently studying in my OS class. I could leverage this environment to execute tasks and benchmark various scheduling algorithms. ## Prerequisites To embark on this project, a profound understanding of the Linux kernel is imperative. Mastery of the Simics simulation environment, including the location and modification of kernel files within the simulation, is crucial. Additionally, expertise in recompiling files to binaries and replacing them in the original Simics location may be necessary. ## Assistance Required: we can develop a basic understanding of the kernel part but, guidance from CIE is sought to comprehend Simics' kernel implementation. Specific assistance is required in incorporating tools such as GCC into the virtual environment created within Simics. ## Future of this project: In future I would like to go deeper Looking ahead, the project envisions delving deeper into the realm of CPU scheduling algorithms. The objective is to develop advanced algorithms infused with Machine Learning (ML) and Artificial Intelligence (AI), ultimately optimizing CPU scheduling for Intel CPU boards. <hr> ### discoveries I was checking out if kernel files are accessible >first thing that I did was check for the kernel version >what I found out that simics linux is using 5.0.8-734 >![image](https://hackmd.io/_uploads/B1Mb0Moi6.png) >After about an hour of surfing around I found the source code for this version in the official site : > - https://www.kernel.org/nonprofit.html > - https://cdn.kernel.org/pub/linux/kernel/v5.x/ > - https://mirrors.aliyun.com/linux-kernel/v5.x/ >then I tried searching the files withiin myn own system I found it at ![image](https://hackmd.io/_uploads/rJnV77joa.png) >finaly I tried searching for the same files within the simics environment but the files were missing: >![Screenshot from 2024-02-15 07-51-43](https://hackmd.io/_uploads/SkqzSXooT.png) > Eventhough I am sure that iys not using my system kernels itself (cause they have a different version I don't get where the files are located) <hr> ### Found scheduling codeson which I wish to work ![image](https://hackmd.io/_uploads/BJel0Xoo6.png) > trying to find some referance manual for the same > Hope i find something