MNEME: A Memory Hierarchy Simulator for an Engineering Computer Architecture Course LORENZO MORENO, EVELIO J. GONZA ´ LEZ, BEATRICE POPESCU, JONAY TOLEDO, JESU ´ S TORRES, CARINA GONZALEZ Departamento de Ingenierı´a de Sistemas y Automa´tica y ATC, University of La Laguna, CP 38207 CanaryIslands, Spain Received 9 June 2008; accepted 2 December 2008 ABSTRACT: As in other fields of Engineering, simulators are widely used to teach Memory hierarchy topics. In this paper, a simulator called MNEME (due to the muse of the memory in Greek mythology), which includes a complete vision of memory hierarchy topics, is presented. This simulator has been validated and improved using feedback from students during two academic years. This way, the students have taken part significantly in the MNEME design process. ß2009 Wiley Periodicals, Inc. Comput Appl Eng Educ 19: 358À364, 2011; View this article online at wileyonlinelibrary.com; DOI 10.1002/cae.20317 Keywords: computer architecture; memory hierarchy; simulator INTRODUCTION Due to its importance, Memory hierarchy is taught in several subjects and degrees, with different level of depth and related to different topics. Apart from other resources (as reference books, like [1]), the use of simulators is a tested valuable tool for the teaching of this discipline, since the students can test how cache memory works with a detail that it is impossible to reach by other techniques. Nevertheless, although simulators are widely used in Computer Architecture courses, simulators by themselves are not enough to significantly improve the learning process. It is necessary to carry out other activities which allow the students to gain knowledge, comprehend theoretical concepts and apply those concepts to the real world [2]. From their experience, the authors have observed three statements: * There are many concepts defining themselves many parameters to establish in a practical way: global/local memory, execution/wait queues, eviction algorithms, bus size between the different cache levels, cache memory size, allocation page size, page size in virtual memory, line size in cache memory, write allocate/non write allocate, TLB size, mapping functions, etc. * Memory hierarchy teaching process should include every characteristic existing in actual machines: cache levels, page table implementations, eviction algorithms, etc. * It would be desirable, even more in a nearly Design-based Research (DBR) approach, to make experiments on the hardware. Nevertheless, due to technical limitations, experiments are often executed in a relatively old processor, with a simple cache organization, damaging the learning process extensibility. In addition to this, concerning the other alternative, existing simulators, especially trace- driven oriented ones, are often too simple and show how caches work in an isolated way. In contrast, execution- driven simulators are usually too complicated and without a friendly interface, becoming inappropriate for undergradu- ate students [3À5]. Regarding to this, a survey of simulators can be found in Ref. [6]. Keeping these statements in mind, the authors have proposed a learning scheduling based on the design and implementation of a simulator. This simulator, called MNEME [7,8], reflects those statements and takes advantage from the flexibility of the software. The debate about simple or complex simulators is out of the scope of this paper. Nevertheless, the authors will state that a simulator should not carry out an excessive simplification in order to make it simple. In other words, developers should not oversimplify their design because doing this, they could lead to new misconceptions. In contrast, if the real context is complex itself (i.e., with many parameters and many concepts to be monitored for a pedagogical pursue), the simulator needs to be complex. In this last case, implementers must include some kind of mechanism in order to make the simulator useful from a pedagogical point of view. Thus, MNEME will result in a complex simulator, and this is its main strength: its complexity Correspondence to E. J. Gonza ´lez (evelio@cyc.dfis.ull.es). ß 2009 Wiley Periodicals Inc. 358