
COVER FEATURE Simics: A Full System Simulation Platform A full system simulator attempts to strike a balance between accuracy and performance by modeling the complete final application and providing a unified framework for hardware and software design within that context. Peter S. hat all computers can simulate each other jects in this area. It is the first commercial full sys- Magnusson is an immediate consequence of the theo- tem simulator, and it is just beginning to demon- Magnus retical work of Alan Turing and Alonzo strate the possibilities for system development. Christensson Church. Computer architects made direct use of this property as early as the EDSAC FULL SYSTEM SIMULATION T 1 Jesper project in the 1950s, and simulation in its various Increasingly, we must design computer hardware or Eskilson shapes and guises has been used to support the software within the context of the final application. Daniel design of computers ever since. Simulation offers A component’s value lies in its contribution to that Forsgren the traditional benefits of software construction: It application. For example, no particular signal or exe- can arbitrarily parameterize, control, and inspect cuted instruction provides value at Amazon.com’s Gustav the system it is modeling—the target system. Its Web site. Instead, the value lies in letting a customer Hållberg measurements are nonintrusive and deterministic. expediently execute a search and make a purchase Johan Further, it provides a basis for automation: Multi- decision. An end-user service like this is usually built Högberg ple simulator sessions can run in parallel, and ses- from a mixture of different manufacturers’ equip- sions can be fully scripted. ment, in turn running a mixture of standard software Fredrik Naturally, we wish to simulate an entire system and proprietary components. The availability, per- Larsson and to do so with total accuracy—a perfect model. formance, and reliability of that end-user service moti- Andreas There are obvious problems with seeking perfec- vates the entire digital value chain up to that point. Moestedt tion, including cost, time to completion, specifica- Large projects aimed at developing high-end dig- Bengt Werner tion inaccuracies, and implementation errors. But ital systems employ a variety of simulation-oriented Virtutech AB, most important is the problem of workload real- tools and methodologies. We can classify these along Stockholm ism. In most cases, we do not know how to imple- two dimensions: scope (what is being modeled) and ment an accurate model with performance sufficient level of abstraction (the abstraction level at which to run realistic workloads. So, in practice, models it is modeled). Abstraction level, in turn, is best that attempt to be highly accurate end up running viewed from two perspectives: the functional behav- very small “toy” workloads. The result is accurate ior (“what”) and the timing behavior (“when”). answers to irrelevant questions. If the goal is to model realistic workloads, then Simics is a platform for full system simulation, the scope must be the full system or we will not be which attempts to strike a balance between accu- able to represent modern scenarios at all. The racy and performance. That is, it is sufficiently abstraction level must be functionally low enough abstract to achieve tolerable performance levels to boot and run unmodified commercial operating with, at the same time, sufficient functional accu- systems and industry benchmarks, and temporally racy to run commercial workloads and sufficient low enough to support hardware engineering. timing accuracy to interface to detailed hardware However, the descent into more detailed levels of models. Simics was one of the first academic pro- abstraction must not result in an overall simulation 50 Computer 0018-9162/02/$17.00 © 2002 IEEE Figure 1. Simics simulation of target systems based on several processor architectures. Each simulated system can run unmodified operating systems and applications. performance that precludes realistic workload telecom switches, multiprocessor systems, clusters, scale, in terms of data set sizes and execution and networks of all these items. At the same time, lengths. Today, a high-end workload scenario has Simics is flexible enough to support a broad variety a total code base of 105 to 108 lines, with execution of tasks throughout the product development cycle, lengths of 109 to 1012 instructions operating on a including such seemingly disparate activities as physical memory of 108 to 1011 bytes, with backing microprocessor design, operating system develop- storage of 1010 to 1013 bytes. ment, fault injection studies, and hardware design Full system simulation supports the design, devel- verification. opment, and testing of computer hardware and Simics simulates processors at the instruction-set software within a simulation framework that level, including the full supervisor state. Currently, approximates the final application context. In this Simics supports models for UltraSparc, Alpha, x86, case, “system” does not mean some arbitrary sub- x86-64 (Hammer), PowerPC, IPF (Itanium), MIPS, set of digital components running simple test code. and ARM. Simics is pure software, and current ports Referring to the Amazon.com example, it would include Linux (x86, PowerPC, and Alpha), Solaris/ include multiple Windows/Linux desktop clients UltraSparc, Tru64/Alpha, and Windows 2000/x86. connected over a network to a cluster of worksta- Figure 1 shows multiple instances of Simics sim- tions and servers running Web software, databases, ulating target systems based on a variety of differ- and various application-specific tasks related to the ent processor architectures, each running a corre- value proposition. sponding operating system: SIMICS OVERVIEW • An x86 (Pentium II) machine running Red Hat Simics provides such a simulation platform. We 6.2 and a KDE desktop (large window in the designed it from the ground up to be sufficiently center), showing two Netscape sessions con- detailed to run unmodified operating systems nected to actual, live Web servers; (including both embedded systems such as VxWorks • A second x86 machine (top right) showing the and general-purpose desktop/server systems such as Windows NT login screen; Solaris, Linux, Tru64, and Windows XP). It is fast • An UltraSparc II machine running Solaris 8 enough to run realistic workloads, including the and MySQL (middle left); SPEC CPU2000 benchmark suite, database bench- • A Simics command line for an UltraSparc III marks such as TPC-C, interactive desktop applica- model before “powering on” (bottom left); tions, and games. Simics is also sufficiently generic to • An IPF (Itanium) model running Red Hat 7.2 model embedded systems, desktop or set-top boxes, (top left); February 2002 51 Figure 2. Sample Host 1 Host 2 network setup for Simics simulation. Simics/x86 Simics/Hammer Client A Client B The simulation is Red Hat Linux 6.2 WinXP distributed over four KDE Explorer host workstations, Netscape and two clients are talking to the Web Host 3 server, which has a database back end. Simics/Alpha Web server enough to use interactively. Through the mouse or Red Hat Linux 6.0 Simics Central a keyboard, users can give input to clients A or B, Apache which run within windows on the respective host mwforum window systems. Simics Central acts as a router that lets users traceroute into the simulated net- Host 4 work from the host environment (and vice versa). With this setup, we can interactively browse the Simics/Ultra III DB server different discussion groups on the Web server and Solaris 8 write new messages with acceptable response. MySQL Retrieving the first Web page that includes a list of all discussion groups takes approximately 30 sec- onds. Network of simulators The point here, of course, is that this is a fully Simulated network simulated setup. For example, any Simics session can be stopped to single step, inspect state, and so on, in which case the other Simics processes auto- • A PowerPC machine running VxWorks (top matically pause pending simulated global time center); and progress. The simulation can access memory traf- • An x86-64 (Hammer) machine running fic anywhere, set breakpoints anywhere, and Windows XP (the simulated processor is run- modify any of the systems (such as adding new ning in 32-bit legacy mode), in the bottom instructions or caches). It can record and time- right window. stamp all user input—for example, keyboard and mouse—and play back the entire session. The sim- The window in the bottom-left corner of ulation can also save the entire setup to a check- Figure 1 shows the Simics command line. All other point and bring it up again in repeat sessions. Simics command windows are hidden. The screen shot is taken from a dual-processor 933-MHz APPLICATIONS FOR FULL SYSTEM SIMULATION Pentium III system with 512 Mbytes of memory, Figure 3 shows the major task dependencies in running Red Hat Linux 7.2. All the Simics pro- developing a complete high-end digital system. cesses are running on that same system. Note that full system simulation relaxes many In addition to processor models, Simics includes dependencies by providing a single platform across device models accurate enough to run the real the development cycle. Each task can move from firmware and device drivers. For example, an existing system model toward the intended next- Simics/UltraSparc III will run the real Open Boot generation model at its own pace. In other words, PROM, and Simics/x86 will correctly install and each task can begin within an abstract and—by run Windows XP from the installation disks. design—incorrect context, which gradually be- Simics views each target machine as a node, rep- comes more representative of the real future sys- resenting a resource such as a Web server, a data- tem. The time-to-market gains and risk reductions base engine, a router, or a client.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages9 Page
-
File Size-