ESSENTIALS OF
COMPUTER ARCHITECTURE
Second Edition
ESSENTIALS OF
COMPUTER ARCHITECTURE
Second Edition
DOUGLAS COMER
SPARC is a registered trademark of SPARC International, Inc. in the United States and other countries.
ARM is a registered trademark of ARM Limited in the United States and other countries.
MIPS is a registered trademark of MIPS Technologies, Inc. in the United States and other countries.
Itanium and Xeon are trademarks of, and Intel and Pentium are registered trademarks of Intel Corporation.
All other trademarks referred to herein are the property of their respective owners.
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
2017 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S. Government works
Printed on acid-free paper
Version Date: 20161102
International Standard Book Number-13: 978-1-138-62659-1 (Hardback)
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe.
Library of Congress Cataloging-in-Publication Data
Names: Comer, Douglas, author.
Title: Essentials of computer architecture / Douglas Comer.
Description: Second edition. | Boca Raton : Taylor & Francis, a CRC title, part of the Taylor & Francis imprint, a member of the Taylor & Francis Group, the academic division of T&F Informa, plc, [2017] | Includes index.
Identifiers: LCCN 2016041657 | ISBN 9781138626591 (hardback : alk. paper)
Subjects: LCSH: Computer architecture.
Classification: LCC QA76.9.A73 C625 2017 | DDC 004.2/2--dc23
LC record available at https://lccn.loc.gov/2016041657
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
To Chris, who makes all the
bits of life meaningful
Contents
Hardware engineering has shifted the use of discrete electronic components to the use of programmable devices. Consequently, programming has become much more important. Programmers who understand how hardware operates and a few basic hardware principles can construct software systems that are more efficient and less prone to errors. Consequently, a basic knowledge of computer architecture allows programmers to appreciate how software maps onto hardware and to make better software design choices. A knowledge of the underlying hardware is also a valuable aid in debugging because it helps programmers pinpoint the source of problems quickly.
The text is suitable for a one-semester undergraduate course. In many Computer Science programs, a course on computer architecture or computer organization is the only place in the curriculum where students are exposed to fundamental concepts that explain the structure of the computers they program. Unfortunately, most texts on computer architecture are written by hardware engineers and are aimed at students who are learning how to design hardware. This text takes a different approach: instead of focusing on hardware design and engineering details, it focuses on programmers by explaining the essential aspects of hardware that a programmer needs to know. Thus, topics are explained from a programmers point of view, and the text emphasizes consequences for programmers.
The text is divided into five parts. covers the advanced topics of parallelism, pipelining, power and energy, and performance.
describes an important aspect of the course: a hands-on lab where students can learn by doing. Although most lab problems focus on programming, students should spend the first few weeks in lab wiring a few gates on a breadboard. The equipment is inexpensive (we spent less than fifteen dollars per student on permanent equipment; students purchase their own set of chips for under twenty dollars).
provides a quick introduction to x86 assembly language and the x64 extensions. Many professors teach x86 and have requested that it be included. The material is in an appendix, which means that professors who choose to focus on a RISC assembly language (e.g., the ARM architecture) can use it for comparison.
The second edition contains two new chapters as well as changes and updates throughout. on power and energy covers the basics without going into detail. It explains why a dual-core chip in which each core runs at half speed takes less power than a single core chip that runs at full speed.
We have set up a Web site to accompany the book at:
http://www.eca.cs.purdue.edu
The text and lab exercises are used at Purdue; students have been extremely positive about both. We receive notes of thanks for the text and course. For many students, the lab is their first experience with hardware, and they are enthusiastic.
My thanks to the many individuals who contributed to the book. Bernd Wolfinger provided extensive reviews and made several important suggestions about topics and direction. Professors and students spotted typos in the first edition. George Adams provided detailed comments and suggestions for the second edition.
Finally, I thank my wife, Chris, for her patient and careful editing and valuable suggestions that improve and polish the text.
Douglas E. Comer
About The Author
Dr. Douglas E. Comer, PhD, has an extensive background in computer systems, and has worked with both hardware and software. Comers work on software spans most aspects of systems, including compilers and operating systems. He created a complete operating system, including a process manager, a memory manager, and device drivers for both serial and parallel interfaces. Comer has also implemented network protocol software and network device drivers for conventional computers and network processors. Both his operating system, Xinu, and TCP/IP protocol stack have been used in commercial products.
Next page