Outline Installing Gem5 SPEC2006 for Gem5 Configuring Gem5.

Slides:



Advertisements
Similar presentations
An Overview Of Virtual Machine Architectures Ross Rosemark.
Advertisements

IERG4180 Tutorial 4 Jim.
Overview Basic functions Features Installation: Windows host and Linux host.
Go to & click on Install/Download Menu optionhttp://osddlinux.osdd.net/ Go to & click on Install/Download.
Virtualization for Cloud Computing
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Tanenbaum 8.3 See references
Introduction to HP LoadRunner Getting Familiar with LoadRunner >>>>>>>>>>>>>>>>>>>>>>
Go to & click on Install/Download Menu optionhttp://osddlinux.osdd.net/ Go to & click on Install/Download.
Tutorial 11 Installing, Updating, and Configuring Software
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Welcome to the World of Nachos CPS 110 Spring 2004 Discussion Session 1.
LING 408/508: Programming for Linguists Lecture 3 August 31 st.
Linux in a Virtual Environment Nagarajan Prabakar School of Computing and Information Sciences Florida International University.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
(1) A Beginner’s Quick Start to SIMICS. (2) Disclaimer This is a quick start document to help users get set up quickly Does not replace the user guide.
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
Vagrant workflow Jul. 15, 2014.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
MIPS Project -- Simics Yang Diyi Outline Introduction to Simics Simics Installation – Linux – Windows Guide to Labs – General idea Score Policy.
ALICE Use of CMF (CC) for the installation of OS and basic S/W OPC servers and other special S/W installed and configured by hand PVSS project provided.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Operating Systems A Biswas, Dept. of Information Technology.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
S ALVATORE DI G IROLAMO (TA) Networks and Operating Systems: Exercise Session 1.
Virtualization Neependra Khare
1 Remote Installation Service Windows 2003 Server Prof. Abdul Hameed.
TIZEN STUDIO INSTALLATION & ENVIRONMENT SETUP FOR DEVLAB
Introduction to Operating Systems Concepts
bitcurator-access-webtools Quick Start Guide
Virtualization for Cloud Computing
Virtualization.
VMware ESX and ESXi Module 3.
CS5100 Advanced Computer Architecture
Introduction to Operating Systems
Introduction Trace-driven simulation is frequently used to evaluate the performance of memory hierarchy Trace-driven simulation is particularly useful.
OS Homework 1 February 22, 2017.
Topics Introduction Hardware and Software How Computers Store Data
Desktop Virtualization
Installation and Configuration
Introduction to .NET Core
Using Linux and Lab Setup OS Lab 1
Containers and Virtualisation
GeoPortal Training Workshop 1st Mar 2017
Virtualization overview
Software Development with uMPS
CS4101 Introduction to Embedded Systems Design and Implementation
Chapter III Desktop Imaging Systems & Issues
KERNEL ARCHITECTURE.
Building Android OS Topics: Building Android and Kernel
OS Virtualization.
Operation System Program 4
Introduction to Operating Systems
Virtualization Techniques
Chapter 2: The Linux System Part 1
A Survey on Virtualization Technologies
Architectural Support for OS
Linux Architecture Overview.
bitcurator-access-webtools Quick Start Guide
Computer System Laboratory
Outline Operating System Organization Operating System Examples
Software - Operating Systems
Architectural Support for OS
Computer components is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format. Computer The computer.
CMPE 135: Object-Oriented Analysis and Design March 14 Class Meeting
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
UNISIM (UNIted SIMulation Environment) walkthrough
In Today’s Class.. General Kernel Responsibilities Kernel Organization
Presentation transcript:

CS5100 Advanced Computer Architecture Installing and Running Gem5 Prof. Chung-Ta King Department of Computer Science National Tsing Hua University, Taiwan (Materials from http://gem5.org/Documentation, http://learning.gem5.org/book/index.html)

Outline Installing Gem5 SPEC2006 for Gem5 Configuring Gem5

Gem5 Gem5 is a modular discrete event driven computer system simulator platform: Modular: Gem5's components can be rearranged, parameterized, extended or replaced easily Discrete-event driven: It simulates the passing of time as a series of discrete events Computer system simulator: Its intended use is to simulate one or more computer systems in various ways It is a simulator platform that lets you use its premade components to build up your own simulation system Supports for executing Alpha, ARM, MIPS, Power, SPARC, and 64 bit x86 binaries on CPU models, including single CPI models, out of order model, in order pipelined model

Gem5: Two Modes Full system (FS) Syscall emulation (SE) Simulate a complete system with devices and an operating system Models bare hardware, including devices, interrupts, exceptions, privileged instructions, fault handlers Syscall emulation (SE) For running user space only programs where system services are provided directly by the simulator Models user-visible ISA plus common system calls System calls emulated, typically by calling host OS Simplified address translation model, no scheduling

Building Gem5 for Architecture Study Our goal is to build a simple simulator that allows us to study architectures of desktop computers Syscall emulation (SE) mode No need to install full systems (FS) SPEC CPU2006 benchmark suites Alpha ISA (SPEC CPU2006 only available on Alpha ISA)

Environment Setup Platform: Linux or Mac OS X If you do not have a Linux environment, the simplest way to set up one, e.g. Ubuntu, on your Windows computer is to: Install a virtualization tool, e.g. VirtualBox or VMWare, on your Windows computer Download the latest Ubuntu disk image (.iso file) and load it on a virtual disk drive, e.g. Daemon Tool, on your Windows computer Create a new virtual machine on the virtualization tool and install Ubuntu from the virtual disk drive Update your Ubuntu from a terminal: If you are not familiar with Linux, there are many tutorials online to learn Now you are ready to install and run Gem5 (assuming Ubuntu) $ sudo apt-get update $ sudo apt-get upgrade

Gem5: Quick Start Getting a copy of Gem5: Gem5's source code is managed using the Mercurial revision control system. Install Mercurial and then get a copy of the Gem5 source repository:  Getting additional tools to build Gem5: g++ (v. 4.8 or newer), SWIG (v. 2.0.4 or newer), m4, Python (v. 2.6 - 2.7), Scons (v. 0.98.1 or newer), zlib (zlib1g-dev, any recent version) $ sudo apt-get install mercurial $ hg clone http://repo.gem5.org/gem5 gperftools: a collection of a high-performance multi-threaded malloc() implementation, plus some pretty nifty performance analysis tools. g++ version 4.8 or newer or clang version 3.1 or newer. Python, version 2.6 - 2.7 (gem5 links in the Python interpreter, so you also need the Python header files and shared library (e.g., /usr/lib/libpython2.6.so) by installing the "python-dev" package in addition to the "python" package SCons, version 0.98.1 or newer. SCons is a powerful replacement for make SWIG, version 2.0.4 or newer, a tool that easily allows a developer to wrap C/C++ functions for use with scripting languages zlib, any recent version, a compression library.. For Debian/Ubuntu, you will need the "zlib-dev" or "zlib1g-dev" package to get the zlib.h header file as well as the library itself. m4, the macro processor. build-essential is a package which contains references to numerous packages needed for building software in general $ sudo apt-get install swig m4 python python-dev \ libgoogle-perftools-dev scons zlib1g-dev \ build-essential

Gem5: Quick Start Building Gem5: Building gem5 with a cache protocol: $ cd gem5/ $ scons build/ALPHA_MOESI_CMP_directory/gem5.fast \ -j 6

Outline Installing Gem5 SPEC2006 for Gem5 Configuring the simulator

SPEC2006 Benchmarks Download the alpha ISA binaries of SPEC2006 GEM5_SPEC2006.tar.gz package from iLMS and move it to your “gem5/” directory Or you can build it by yourself: http://www.m5sim.org/SPEC_CPU2006_benchmarks Decompress the file to get the benchmark binaries Different benchmarks require different input data Need to read details in each benchmark Download spec06_config.py & pec06_benchmarks.py from iLMS and move them to “gem5/configs/example” $ cd gem5/ $ tar –zxvf GEM5_SPEC2006.tar.gz

Execution Script Download the script run.sh from iLMS and move it to your “gem5/” directory To run using the two supportive scripts, spec06_config.py & pec06_benchmarks.py , from the previous step Can also be used to easily configure GEM5 Modify execution path within run.sh to be your own line 22: GEM5_DIR=absolute path of your gem5 directory line 23: SPEC_DIR=absolute path of benchmarks directory line 222: $GEM5_DIR/build/THE CACHE PROTOCOL YOU BUILT WITH/gem5.fast ….. Usage: run.sh benchmark_name path_of_out_directory

Result You can see the result in “stats.txt” Note: The benchmark – bzip2 needs a bigger stack. If you set up the environment according to this ppt, your have to modify the memory size.

Outline Installing Gem5 SPEC2006 for Gem5 Configuring the simulator

Configuring the Simulator “gem5/cinfigs/common/Options.py” contains many options to configure the simulated machine, e.g. CPU clock, memory type and size, cache size… There is a “help” comment followed by each option to explain the meanings of the option To change the configuration of the simulated machine, you can simply add the specific option (-- option) into the launch command line at the bottom of “gem5/run.sh”.

Example: Change CPU Clock According to the description in “Options.py”, the default CPU clock is 2GHz If we want to change the CPU clock to 3GHZ, we can add --cpu-clock “3GHz” at the bottom of “run.sh”.

Example: Enable Cache Simulation To do cache simulation, there are two things to be configured first: Add "--cpu-type=timing" flag to set the CPU model that would stall on cache accesses and wait for the memory system to respond prior to proceeding. (http://www.m5sim.org/SimpleCPU#TimingSimpleCPU) Add "--caches --l2cache“ flag to enable cache modeling.