Introduction to Computing PDF

Summary

This chapter provides a foundational overview of computing systems. It emphasizes the underlying simplicity within complex computational concepts and examines the importance of understanding computer systems from a programmer's perspective. The chapter also touches upon the practical aspects of program optimization and system tuning.

Full Transcript

es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION Computing is not about computers anymore. It...

es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION Computing is not about computers anymore. It is about living.... We have seen computers move out of giant air-conditioned rooms into closets, then onto desktops, and now into our laps and pockets. But this is not the © Jones & Bartlettend.Learning,... Like a force LLC ©denied of nature, the digital age cannot be Jones or & Bartlett Learn NOT FOR SALE stopped.... The information superhighway may be mostl y hype today,SALE OR DISTRIBUTION NOT FOR but OR DIST it is an understatement about tomorrow. It will exist beyond people’s wildest predictions.... We are not waiting on any invention. It is here. It is now. It is almost genetic in its nature, in that each generation will become more digital © Jones & Bartlett Learning, than LLC the preceding one. © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION —Nicholas Negroponte, NOTChairman FOR SALE OR Emeritus, MITDISTRIBUTION Media Lab CHAPTER Introduction 1 es & Bartlett Learning, LLC OR SALE OR DISTRIBUTION © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION © Jones & Bartlett Learning, LLC © Jones & Bartlett Learn NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST 1.1 OVERVIEW D r. Negroponte is among many who see the computer revolution as if it were a force of nature. This force has the potential to carry humanity to its ­digital destiny, allowing us to conquer problems that have eluded us for centuries, as © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC well as all of the problems that emerge as we solve the original problems. Com- NOT FOR SALE puters OR DISTRIBUTION NOT tasks, have freed us from the tedium of routine FOR liberating SALE OR ourDISTRIBUTION collective creative potential so that we can, of course, build bigger and better computers. As we observe the profound scientific and social changes that computers have brought us, it is easy to feel overwhelmed by the complexity of it all. This com- plexity, however, emanates from concepts that are fundamentall y very simple. es & Bartlett Learning, These LLC simple ideas are the ones © Jones & Bartlett that have brought usLearning, to where weLLCare today and OR SALE OR DISTRIBUTION NOT FOR are the foundation for the computers SALE of the ORToDISTRIBUTION future. what extent they will sur- vive in the future is anybody’s guess. But today, they are the foundation for all of computer science as we know it. Computer scientists are usually more concerned with writing complex pro- gram algorithms than with designing computer hardware. Of course, if we want © Jones & Bartlett our algorithms to beLearning, LLC eventually has to run useful, a computer © Jones them. Some& Bartlett algo- Learn NOT FORareSALE rithms so complicated that they would take too long to runNOT OR DISTRIBUTION FOR systems. on today’s SALE OR DIST These kinds of algorithms are considered computationally infeasible. Certainly, at the current rate of innovation, some things that are infeasible today could be feasible tomorrow, but it seems that no matter how big or fast computers become, someone will think up a problem that exceeds the reasonable limits of the current technology. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC To understand why an algorithm is infeasible, or to understand why the NOT FOR SALE implementation OR DISTRIBUTION NOT FOR of a feasible algorithm is running SALEyou too slowly, ORmustDISTRIBUTION be able to see the program from the computer’s point of view. You must understand what © Paggi Eleanor/Shutterstock 1 es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 2    Chapter 1 /  Introduction © makes Jonesa & computer system Bartlett tick before Learning, LLC you can attempt to optimize the programs © Jones & Bartlett Learn that it runs. Attempting to optimize a computer system without first understand- NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST ing it is like attempting to tune your car by pouring an elixir into the gas tank: You’ll be lucky if it runs at all when you’re finished. Program optimization and system tuning are perhaps the most important moti- vations for learning how computers work. There are, however, many other reasons. For example, © Jones & Bartlett Learning,if you LLCwant to write compilers, © youJones must understand & Bartlett theLearning, hardware LLC environment within which the compiler will function. The best compilers leverage NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION particular hardware features (such as pipelining) for greater speed and efficiency. If you ever need to model large, complex, real-world systems, you will need to know how floating-point arithmetic should work, as well as how it really works in practice. If you wish to design peripheral equipment or the software that drives peripheral es & Bartlett Learning, LLC equipment, you must know every © Jones detail of Learning, & Bartlett how a particular LLCcomputer deals with its input/output (I/O). If your work involves embedded systems, you OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION need to know that these systems are usually resource constrained. Your under- standing of time, space, and price trade-offs, as well as I/O architectures, will be essential to your career. All computer professionals should be familiar with the concepts of bench- © Jones and marking be able toLearning, & Bartlett interpret andLLC present the results of benchmarking © Jonessystems. & Bartlett Learn People who perform research NOT FOR SALE OR DISTRIBUTION involving hardware systems, networks, NOTorFORalgorithms SALE OR DIST find benchmarking techniques crucial to their day-to-day work. Technical managers in charge of buying hardware also use benchmarks to help them buy the best sys- tem for a given amount of money, keeping in mind the ways in which performance benchmarks can be manipulated to imply results favorable to particular systems. © Jones & BartlettThe precedingLLC Learning, examples illustrate the idea that a fundamental © Jones & Bartlettrelationship Learning, LLC exists between NOT FOR SALE OR DISTRIBUTION computer hardware and many NOT FORprogramming aspects of and soft- SALE OR DISTRIBUTION ware components in computer systems. Therefore, regardless of our areas of expertise, as computer scientists, it is imperative that we understand how hard- ware interacts with software. We must become familiar with how various circuits and components fit together to create working computer systems. We do this es & Bartlett Learning, LLC the study of computer through © organization. Jones & BartlettComputer organization Learning, LLCaddresses issues such as control signals (how the computer is controlled), signaling meth- OR SALE OR DISTRIBUTION NOT FOR ods, and memory types. It encompasses all SALE physicalOR DISTRIBUTION aspects of computer systems. It helps us to answer the question: How does a computer work? The study of computer architecture, on the other hand, focuses on the struc- ture and behavior of the computer system and refers to the logical and abstract © aspects Jonesof&system implementation Bartlett Learning, LLC as seen by the programmer.©Computer Jones &archi-Bartlett Learn tecture includes many elements, such as instruction sets and formats, operation NOT FOR codes, dataSALE types, OR the DISTRIBUTION number and types of registers, addressing NOTmodes, FOR SALEmain OR DIST memory access methods, and various I/O mechanisms. The architecture of a sys- tem directly affects the logical execution of programs. Studying computer archi- tecture helps us to answer the question: How do I design a computer? © Jones & BartlettThe computer LLC Learning, architecture for a given machine is the combination © Jones of its hard- LLC & Bartlett Learning, ware components plus its instruction set architecture (ISA). The ISA is the NOT FOR SALEagreed-upon OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION interface between all the software that runs on the machine and the hardware that executes it. The ISA allows you to talk to the machine. es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 1.2 / Computer Systems    3 © Jones The&distinction Bartlett between Learning,computer LLCorganization and computer architecture © Jones is not Learn & Bartlett clear-cut. People in the fields of computer science and computer engineering hold NOTdiffering FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST opinions as to exactly which concepts pertain to computer organization and which pertain to computer architecture. In fact, neither computer organization nor computer architecture can stand alone. They are interrelated and interdependent. We can truly understand each of them only after we comprehend both of them. Our com- prehension © Jones & Bartlett of computer Learning, LLC organization and architecture © Jones ultimately leadsLearning, & Bartlett to a deeper LLC understanding of computers and computation—the heart and soul of computer science. NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 1.2 COMPUTER SYSTEMS 1.2.1 The Main Components of a Computer es & Bartlett Learning, Although LLC it is difficult to distinguish between © Jones the ideas belonging & Bartlett Learning, to computer LLC organiza- tion and those ideas belonging to computer architecture, it is impossible to say where OR SALE OR DISTRIBUTION NOTissues hardware issues end and software FOR SALE begin. OR DISTRIBUTION Computer scientists design algorithms that usually are implemented as programs written in some computer language, such as Java or C++. But what makes the algorithm run? Another algorithm, of course! And another algorithm runs that algorithm, and so on until you get down to the machine level, which © Jones can be thought & Bartlett of as LLC Learning, an algorithm implemented as©anJones electronic device. Learn & Bartlett Thus, modern computers are actually implementations of algorithms that execute other NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST algorithms. This chain of nested algorithms leads us to the following principle: Principle of equivalence of hardware and software: Any task done by software can also be done using hardware, and any operation performed directly by hardware can be done using software.1 © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC A special-purpose computer can be designed to perform any task, such as word NOT FOR SALE processing, OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION budget analysis, or playing a friendly game of Tetris. Accordingly, programs can be written to carry out the functions of special-purpose computers, such as the embedded systems situated in your car or microwave. There are times when a simple embedded system gives us much better performance than a com- es & Bartlett Learning, plicated LLC computer program, © and there are times when a program is the preferred Jones & Bartlett Learning, LLC approach. The principle of equivalence of hardware and software tells us that OR SALE OR DISTRIBUTION we have a choice; any taskNOT FOR directly performed SALE OR DISTRIBUTION in hardware can be done using software, and anything done using hardware can be simulated using software. Our knowledge of computer organization and architecture will help us to make the best choice and allow us to minimize cost and size while maximizing perfor- mance, resulting in a perfect combination of hardware and software. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learn We begin our discussion of computer hardware by looking at the components NOT FOR SALE necessary OR to build DISTRIBUTION a computing NOTa FOR system. At the most basic level, SALE computer is a OR DIST device consisting of three pieces: 1. A processor (CPU, or central processing unit) to interpret and execute ­programs © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE 1OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION What this principle does not address is the speed with which the equivalent tasks are carried out. Hardware implementations are almost always faster. es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 4    Chapter 1 /  Introduction © 2. A memory Jones to store Learning, & Bartlett both data andLLC programs © Jones & Bartlett Learn 3. AFOR NOT mechanism SALEfor ORtransferring data to and from the outside world DISTRIBUTION NOT FOR SALE OR DIST The CPU is essentially the computer’s brain. A processor consists of an arith- metic logic unit (ALU, to perform computations and make decisions) and a control unit (to act as a “traffic police officer” directing data to correct loca- tions). It also contains very special storage locations called registers; these reg- © Jones & Bartlett isters Learning, LLC hold data that the CPU needs to access©very Jones & Bartlett quickly. Learning, When a program is LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE running, the CPU executes instructions found in memory. Memory is used to OR DISTRIBUTION store anything that the computer needs. There are two types of memory: (1) long-term memory, such as disk drives and flash drives, which stores data even when the power is off; and (2) temporary memory, which loses data when it loses power, and includes registers and RAM. (You can find more on RAM in es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC Section 1.3.) Think of temporary memory as that space needed by the processor OR SALE OR DISTRIBUTION NOTworking to store information it is currently FOR SALE on, andOR DISTRIBUTION long-term memory as space to store data needed in the future. Typically, memory is “hierarchical,” meaning that there are different levels of memory, varying in size and speed. The goal of this memory hierarchy is to give the best performance at the lowest cost. © For Jonesexample, a hard drive provides a large, inexpensive place to store long- & Bartlett Learning, LLC © Jones & Bartlett Learn term data, whereas cache is a small, but fast and expensive type of memory that stores data being used most often. By accessing the cache, NOT NOT FOR SALE OR DISTRIBUTION FOR the CPU canSALE read OR DIST and write data quickly without bogging down the entire system. You will learn about this hierarchical relationship in Chapter 6. The ALU must be connected to the registers, and both must be connected to the memory; this is done by a special pathway called a bus. The collection of ALU, reg- © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC isters, and bus is called a datapath, an extremely important component of any com- NOT FOR SALE OR DISTRIBUTION puter, because it is the hardware that is ultimatelyNOT FOR SALE responsible OR programs. for running DISTRIBUTION A computer would do us no good if we couldn’t give it information and get results in return. Input/output components, such as keyboards, mice, monitors, printers, web cameras, scanners, graphics tablets, and thumb drives, are all examples of devices that allow us to communicate with the computer. In the following chapters, we discuss es & Bartlett Learning, LLC these © Jones components in detail as they & Bartlett relate to computer Learning, LLC hardware. OR SALE OR DISTRIBUTION NOT FOR Once you understand computers SALEofOR in terms DISTRIBUTION their component parts, you should be able to understand what a system is doing at all times and how you could change its behavior if so desired. You might even feel like you have a few things in common with it. This idea is not as far-fetched as it appears. Consider how a student sitting in class exhibits the three components of a computer: The © student’s Jones & Bartlett brain Learning, is the processor, theLLC notes being taken represent©theJones & Bartlett memory, and Learn NOT FOR or the pencil SALE pen used take notes is the I/O mechanism. ButNOT OR toDISTRIBUTION FOR keep in mindSALE that OR DIST your abilities far surpass those of any computer in the world today, or any that can be built in the foreseeable future. © Jones1.2.2 System Components & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALEWeOR have an idea of what a computer is, but what DISTRIBUTION NOT is aFOR computer SALE system? Although OR DISTRIBUTION a computer is composed of hardware, typically we refer to the combination of hardware and software as a computer system. The most important software is system software, which includes the operating system. (You can find more on es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 1.2 / Computer Systems    5 © Jones & Bartlett Learning, LLC © Jones & Bartlett Learn Null Pointers: Tips and Hints NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST Throughout this text we include sidebars called “Null Pointers.” These are tips and helpful hints regarding concepts that can be potential pitfalls. For example, in this chapter we have found that although there are no complicated concepts, read- ers often have trouble in two areas. First, the principle of equivalence of hardware © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC and software is an interesting idea to consider. Although you may not have given NOT FOR SALE itOR much thought, it is an extremel y important NOT DISTRIBUTION FOR concept, SALE particularl OR DISTRIBUTION y when it comes to the design of computer architecture. Cost and speed are often the determin- ing factors when making design decisions regarding whether to implement some- thing in hardware or software. Throughout this text, you will see that there is often es & Bartlett Learning, aLLC hardware/software design©trade-off. Jones If& the goal isLearning, Bartlett performance,LLC functionality will typicall y be moved to hardware as much as possible. However, if the goal is OR SALE OR DISTRIBUTION to achieve compatibility for theNOT FOR future, SALEisOR ­software DISTRIBUTION often used, because it is easy to update. Note that by “equivalent” we mean “functionall y equivalent.” In princi- ple, any function performed by one can be performed by the other. However, at the lowest level, we must have hardware. One interesting detail is the patent ver- sus copyright © Jones problem. & Bartlett If someoneLLC Learning, has a hardware device that© provides Jonesa & specific Bartlett Learn function, this device is eligible for a patent. However, the p ­ rinciple says that this NOT FOR SALE OR DISTRIBUTION NOT FOR SALE machine can be exactl y duplicated in software, yet patent status is often denied for OR DIST software. Thus, the choices made for implementation in hardware versus s­ oftware are often based on simpl y which is more practical, is more efficient, is more profit- able, or provides better performance. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION operating systems in Chapter 11.) System software is the collection of programs that allow you to use your computer. This type of software integrates closely with the hardware of your system, thus becoming the interface between you and the computer hardware. Without system software, your computer would be useless. es & Bartlett Learning, Other LLC software includes application © Jones software (such asLearning, & Bartlett programs for email or word LLC processing) and utility software (such as programs designed to clean up your hard OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION drive or software designed to protect your computer while on the Internet). Both application software and utility software use the system software to communicate with the hardware, reiterating how important system software really is. When discussing computer systems, it is also important to consider any peripheral devices connected © Jones & Bartlett Learning, to the LLCmain computer hardware©asJones part of&that sys- Learn Bartlett tem. Keyboards, mice, printers, monitors, scanners, and speakers are examples of NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST peripherals you have probably used. In fact, your tablet, smartphone, and smart- watch can be considered peripherals as well, because they can connect easily to your computer and become part of the system. The difference between these lat- ter devices and the others is that your tablet, phone, and watch can typically run © Jones & Bartlettwithout being connected Learning, LLC to anything else. © Jones & Bartlett Learning, LLC Although NOT FOR SALE OR DISTRIBUTION we often refer to a computerNOT system FORas simply SALEaOR computer, it is DISTRIBUTION important to note that technically, the term computer refers to the hardware only. However, it has become quite common to refer to the combination of hardware and software as a computer. es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 6    Chapter 1 /  Introduction 1.2.3 © Classification Jones & Bartlettof Computing Learning, Devices LLC © Jones & Bartlett Learn If someone NOT FOR SALEwere toORask DISTRIBUTION you how many computers you own, youNOT mightFOR countSALE your OR DIST laptop, your tablet, and your desktop. What about your phone? Your smartwatch? Your TV? Your video game system? Your car? There are many different classifica- tions of computers, and thus computer systems. Your car, for example, contains an embedded computer; these are computer systems that perform dedicated tasks spe- © Jones & Bartlett Learning, cifically LLC designed for the product in which they © areJones & These enclosed. Bartlett Learning, systems can be LLC NOT FOR SALE programmable or not, depending on the application, OR DISTRIBUTION NOTand FORtheirSALE main goals OR are speed, DISTRIBUTION low power usage, size, and reliability. Your mobile devices, such as your phone and tablet, contain computers as well, but these computers do more than the one con- trolling your car. These systems have Internet capabilities, allowing you to down- load various programs and “apps” to assist you with day-to-day activities. es & Bartlett Learning, LLC We classify computer systems© Jones & Bartlett into five Learning, different categories: LLC supercomputers, OR SALE OR DISTRIBUTIONmainframes, personal computers, NOT mobile FORdevices, SALE and OR embedded systems. There DISTRIBUTION are no definitive lines dividing these categories; for example, your smartwatch could be considered both a mobile device and an embedded system. Supercom- puters are simply very powerful mainframes that are used for compute-intensive applications, such as weather calculations, advanced biological modeling, and © genetic Jonesresearch. & Bartlett TheyLearning, can operate LLC at speeds of a quadrillion (a©1Jones followed&byBartlett 15 Learn zeros!) NOT FOR calculations SALE OR per DISTRIBUTION second and more. Research to develop computers NOT FORthat can OR DIST SALE operate at a quintillion (1018) operations per second is currently being funded by various countries around the world and has finally been achieved as of 2022 (see the sidebar “The Final Frontier”). © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC NOTThe FORFinal Frontier SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION An exascale computer is one that can calculate at least 1018 (a billion billion!) 64-bit floating-point operations per second (or exaFLOPs), which is very similar to what the human brain can do with its roughl y 86 billion neurons. In earl y 2022, the Hewlett- Packard Frontier supercomputer was introduced as the fastest supercomputer in es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC the world, beating out the Fugaku system from Japan that had held that top spot for OR SALE OR DISTRIBUTION two years. Consisting of 9400 CPUs NOTand FOR SALE 37,000 GPUsOR DISTRIBUTION (graphics processing units), this liquid-cooled computer has a total core count of 8,720,112, is capable of paral- lel processing, has 9.2 petabytes (see Table 1.1 for an explanation of petabytes and terabytes) of memory, and has reached 1.1 exaFLOPs of performance. This computer © isJones capable of 1 quintillion calculations per second! To put that in perspective, if each & Bartlett Learning, LLC © Jones & Bartlett Learn human on Earth did one calculation per second, it would take four years for this “human NOT FOR toSALE computer” do whatOR DISTRIBUTION Frontier can do in one second. NOT FOR SALE OR DIST The Frontier has 74 cabinets, with each weighing 8000 pounds. The in-system storage layer can achieve peak read speeds of 75 terabytes per second and write speeds of 35 terabytes per second, enabling the Frontier supercomputer to achieve more Learning, © Jones & Bartlett than 15 billionLLC I/O operations per second. The Frontier supercomputer © Jones also has & Bartlett Learning, LLC a huge amount of storage in its external file system, providing roughl y 700 petabytes, NOT FOR SALEwhich ORisDISTRIBUTION NOT FOR SALE 35 times the amount of data stored in the Library of Congress. OR DISTRIBUTION es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 1.3 / An Example System: Wading Through the Jargon     7 © Jones & Bartlett There Learning,for are many applications LLC © Jones fast computers with large storage such&asBartlett the Learn NOTFrontier FORsupercomputer, SALE OR DISTRIBUTION NOT FOR SALE including quantum circuit simulation, weather forecasting and OR DIST climate models, fusion power, particle physics and studying the universe, and human brain research. In fact, the Human Brain Project has been endeavoring to understand the complexities of the brain, which requires working with significant amounts of data. This new supercomputer will allow the researchers to simulate the human brain and © Jones & Bartlett Learning, hopefull LLC y gain more insight into how neurons © Jones connect with&each Bartlett Learning, other to form our LLC NOT FOR SALE cognitive OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION pathways. This could result in potential cures for many neurologic diseases. This computer, however, isn’t for everyone. Keeping this computer cool requires 6000 gallons of water, circulated using four 350-horsepower pumps, to be pumped through the system every minute! Even so, this computer has taken first place on the Green500 list as the most power-efficient supercomputer architecture in the world. es & Bartlett Learning, The LLC © Jones & Bartlett Learning, LLC U.S. Department of Energy has installed a Frontier supercomputer at Oak Ridge OR SALE OR DISTRIBUTION National Laboratory in Tennessee,NOT withFOR SALE full science ORbeginning access DISTRIBUTION in 2023. © JonesMainframe computers & Bartlett are used Learning, LLCby companies for specific applications © Jones such Learn & Bartlett as data processing (a good example is systems used by airlines for ticket reserva- NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST tions) and financial transactions (such as those at a bank). Your desktop and laptop ­computers are considered personal computers. (You can read more about personal computers later in this chapter.) Although laptops (and even tablets) have become very popular, desktops typically yield better performance for less money and are © Jones & Bartlett often more “worker-friendly” Learning, LLC (better keyboard, © larger Jones screen, etc.). ButLearning, & Bartlett even among LLC desktops, there are choices: Do you want a full-sized computer? A compact com- NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION puter? An all-in-one? Maybe a gaming computer? (You can find more on these terms in the next section.) Mobile devices include any handheld portable comput- ing device, such as your smartphone, e-reader, or tablet. They are typically used to take photos, make phone calls, send text messages, access calendars, and surf web- es & Bartlett Learning, pages LLC (and even watch cat videos!). © Jones & Bartlett Learning, LLC The cost for the various classifications of systems ranges anywhere from less OR SALE OR DISTRIBUTION NOT FOR than a dollar for the mass-produced, SALE minimal OR DISTRIBUTION memory embedded computers (such as those found in greeting cards) to tens of millions of dollars for some supercom- puters. To help the reader gain a better understanding of both the various clas- sifications and computer hardware in general, we illustrate these concepts via an example&inBartlett © Jones the following section.LLC Learning, © Jones & Bartlett Learn NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST 1.3 AN EXAMPLE SYSTEM: WADING THROUGH THE JARGON This text will introduce you to some of the vocabulary that is specific to comput- ers. This jargon can be confusing, imprecise, and intimidating. We believe that withLearning, © Jones & Bartlett a little explanation, LLC we can clear the fog. © Jones & Bartlett Learning, LLC For the sake of discussion, we have provided a facsimile computer advertise- NOT FOR SALE ment OR DISTRIBUTION (see Figure 1.1). The ad is typical of NOT many, FOR in thatSALE OR DISTRIBUTION it bombards the reader with phrases such as “32GB DDR4 SDRAM,” “PCIe sound card,” and “128KB es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 8    Chapter 1 /  Introduction © JonesFOR & Bartlett Learning, SALE: OBSOLETE LLC– CHEAP! CHEAP! CHEAP!© Jones & Bartlett Learn COMPUTER NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST Compact computer Intel i9 16 Core, 4.20 GHz 3733MHz 32GB DDR4 SDRAM 128KB L1 cache, 2MB L2 cache © Jones & Bartlett Learning, LLC © Jones Dual storage (7200RPM SATA& 1TB Bartlett Learning, HDD, 128GB SSD) LLC NOT FOR SALE OR DISTRIBUTION Wireless 802.11NOT FOR4.0SALE OR DISTRIBUTION + Bluetooth 7-in-1 card reader 10 USB ports, 1 serial port, 4 PCI expansion slots (1 PCI, 1 PCI x 16, 2 PCI x 1), HDMI 24" widescreen LCD monitor, 16:10 aspect ratio, es & Bartlett Learning, LLC © Jones & Bartlett 1920 x 1200 WUXGA, 300 Learning, cd/m2, active LLC matrix, 1000:1 OR SALE OR DISTRIBUTION NOT(static), FOR8ms,SALE OR(16.7 24-bit color DISTRIBUTION million colors), VGA/DVI input, 2 USB ports 16x CD/DVD +/– RW drive 1GB PCIe video card PCIe sound card © Jones & Bartlett Learning, Gigabit LLC ethernet © Jones & Bartlett Learn NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST FIGURE 1.1 A Typical Computer Advertisement L1 cache.” Without having a handle on such terminology, you would be hard- pressed to know whether the stated system is a wise choice, or even whether the © Jones & Bartlett system Learning, LLC your needs. As we progress is able to serve © Jones & Bartlett through Learning, this text, you will LLC NOT FOR SALE ORthe learn DISTRIBUTION concepts behind these terms. NOT FOR SALE OR DISTRIBUTION Before we explain the ad, however, we need to discuss something even more basic: the measurement terminology you will encounter throughout your study of computers. It seems that every field has its own way of measuring things. The computer es & Bartlett Learning, LLC field © Jones is no exception. For computer & to people Bartlett tell eachLearning, LLC other how big something is, OR SALE OR DISTRIBUTION or how fast something is, they must use the same units NOT FOR SALE OR DISTRIBUTION of measure. The com- mon prefixes used with computers are given in Table 1.1. Back in the 1960s, Prefix Symbol Power of 10 Power of 2 Prefix Symbol Power of 10 Power of 2 Kilo K 1 thousand = 103 210 = 1024 Milli m 1 thousandth = 10–3 2–10 Mega M © Jones & Bartlett Learning, 1 million = 106 220 LLC Micro μ © Jones 2&–20Bartlett Learn 1 millionth = 10–6 Giga G NOT1 FOR billion =SALE 109 OR DISTRIBUTION 230 Nano n 1 billionth = 10NOT –9 FOR2–30SALE OR DIST Tera T 1 trillion = 1012 240 Pico p 1 trillionth = 10–12 2–40 Peta P 1 quadrillion = 1015 250 Femto f 1 quadrillionth = 10–15 2–50 Exa E 1 quintillion = 1018 260 Atto a 1 quintillionth = 10–18 2–60 © Jones Zetta & Bartlett Z Learning, 1 sextillion = LLC 1021 270 Zepto z© Jones = & Bartlett 1 sextillionth 10–212–70 Learning, LLC Yotta Y 1 septillion = 1024 280 Yocto y septillionth = 10–24 2–80 NOT FOR SALE OR DISTRIBUTION NOT1 FOR SALE OR DISTRIBUTION TABLE 1.1 Common Prefixes Associated with Computer Organization and Architecture es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 1.3 / An Example System: Wading Through the Jargon     9 someone © Jones decided that & Bartlett because the Learning, LLCpowers of 2 were close ©to Jones the powers of 10, Learn & Bartlett the same prefix names could be used for both. For example, 210 is close to 103, NOTsoFOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST kilo is used to refer to them both. The result has been mass confusion: Does a given prefix refer to a power of 10 or a power of 2? Does “a kilo” mean 103 of something or 210 of something? Although there is no definitive answer to this question, there are accepted standards of usage. Power-of-10 prefixes are © Jones & Bartlettordinarily used for Learning, LLCpower, electrical voltage,©frequency Jones &(such as computer Bartlett clock LLC Learning, speeds), and multiples of bits (such as data speeds in number of bits per ­second). NOT FOR SALE IfOR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION your antiquated modem transmits at 28.8kb/s, then it transmits 28,800 bits per second (or 28.8 × 103). Note the use of the lowercase “k” to mean 103 and the lowercase “b” to refer to bit. An uppercase “K” is used to refer to the power- of-2 prefix, or 1024. If a file is 2KB in size, then it is 2 × 210 or 2048 bytes. 20 es & Bartlett Learning, Note LLCthe uppercase “B” to © refer to byte. Jones If a disk holds & Bartlett 1MB, then Learning, LLCit holds 2 bytes (or 1 megabyte) of information. To give you an idea of how these terms OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION relate to things you might have stored on your computer, a byte is one character; a small email containing only text might be 1 or 2KB; whereas your four-page term paper might be 100KB or more, depending on the formatting used; and that picture you took on your smartphone could be 16GB (see explanation of “GB” later © Jones in this section). & Bartlett Learning, LLC © Jones & Bartlett Learn NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST 5G Versus 6G © Jones & Bartlett WhatLearning, does it meanLLC © Jones when smartphones boast being & Bartlett Learning, 4G (fourth-generation), 5G (fifth- LLC generation), NOT FOR SALE OR DISTRIBUTIONor 6G (sixth-generation) compatible? For a long time, mobile NOT FOR SALE OR DISTRIBUTION networks were 1G (with a bandwidth of 30kHz and a speed of 2.4Kbps, allowing onl y voice calls), 2G (with a bandwidth of 30kHz to 200kHz and speeds up to 64Kbps), and 3G (with speeds 50 times faster than 2G and centered on person-to-person communica- tion using voice and text messaging). 4G (with speeds up to 500 times faster than 3G, es & Bartlett Learning, or LLCup to 1Gbps) has allowed mobile © Jonesusers to &consume Bartletta huge amount of Learning, data (such as LLC videos and streaming services), and 5G (with speeds of up to 20Gbps) has focused on OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION the Internet of Things (IoT), allowing connections to virtuall y everyone and everything. It does this by incorporating extremel y high data speeds, very low latency, and more uniformity and reliability. 5G is quickl y becoming the mainstream, but 6G will most certainl y be faster. © Jones 6G & willBartlett expand the capabilitiesLLC Learning, of 5G with speeds estimated to be 100 © Jones & times Bartlett Learn faster than 5G with NOT FOR SALE OR DISTRIBUTION significantl y higher bandwidth, but with much lower latency. NOT FOR SALE This OR DIST will allow the robust use of intelligent knowledge systems and additional comput- ing power, while also allowing people to be more connected than we ever dreamed, including via holographic video. It is projected that 6G will be commerciall y available around 2030 (it will take some time to build the necessary infrastructure) and that © Jones & Bartlett Learning, it will LLC integrate with © Jones satellite networks for true global & Bartlett coverage. The use ofLearning, a massive LLC number NOT FOR SALE OR DISTRIBUTION of sensors, combined with artificial intelligence and machine learning, NOT FOR SALE OR DISTRIBUTION will allow us to connect with our physical world in ways we never imagined. es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 10    Chapter 1 /  Introduction Not knowing © Jones whether & Bartlett specific LLC Learning, prefixes refer to powers of © 2 or powers Jones & of 10 Bartlett Learn can be very confusing. For this reason, the International Electrotechnical Com- NOT FOR SALE OR DISTRIBUTION NOT FOR SALE mission, with help from the National Institute of Standards and Technology, has OR DIST approved standard names and symbols for binary prefixes to differentiate them from decimal prefixes. Each prefix is derived from the symbols given in Table 1.1 by adding an “i.” For example, 210 has been renamed kibi- (for kilobinary) and is represented © Jones & Bartlett Learning, by the LLC symbol Ki. Similarly, 220©is Jones mebi-, or&Mi, followed Bartlett by gibi- LLC Learning, (Gi), tebi- (Ti), pebi- (Pi), exbi- (Ei), and so on. Thus, the term mebibyte, which NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION means 220 bytes, replaces what we traditionally call a megabyte. There has been limited adoption of these new prefixes. This is unfortunate because, as a computer user, it is important to understand the true meaning of these prefixes. A kilobyte (1KB) of memory is typically 1024 bytes of memory rather es & Bartlett Learning, LLCthan 1000 bytes of memory. © Jones However, a 1GBLearning, & Bartlett disk drive might LLC actually be 1 billion bytes instead of 230 (which means you are getting less storage than OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION you think). All 3.5" floppy disks are described as storing 1.44MB of data when in fact they store 1440KB (or 1440 × 210 × 1474560 bytes). As mentioned ear- lier, another convention some professionals use to distinguish base 10 from base 2 when using these prefixes is to use a lowercase letter for the prefix to indicate a © power Jones of & (1KB = 1024 10Bartlett bytes, but Learning, LLC 1kB = 1000 bytes). You should © Jonesalways read & Bartlett Learn the manufacturer’s fine NOT FOR SALE OR DISTRIBUTION print just to make sure you know exactly what 1K, 1KB, NOT FOR SALE OR DIST or 1G represents. See the sidebar “When a Gigabyte Isn’t Quite...” for a good example of why this is so important. When we want to talk about how fast something is, we speak in terms of frac- tions of a second—usually thousandths, millionths, billionths, or trillionths. Pre- fixes Learning, © Jones & Bartlett for these metrics LLCare given in the right-hand side of © Jones & Table 1.1. Learning, Bartlett Generally, LLC negative powers NOT FOR SALE OR DISTRIBUTION refer to powers of 10, not powers of 2. For this reason, NOT FOR SALE OR DISTRIBUTIONthe new binary prefix standards do not include any new names for the negative powers. Notice that the fractional prefixes have exponents that are the reciprocal of the pre- fixes on the left side of the table. Therefore, if someone says to you that an opera- tion requires a microsecond to complete, you should also understand that a million of LLC es & Bartlett Learning, those operations could take©place Jones in one & second. When Bartlett you needLLC Learning, to talk about how many of these things happen in a second, you would use the prefix mega-. OR SALE OR DISTRIBUTION When you need to talk about NOT how fast FORthe SALE ORare operations DISTRIBUTION performed, you would use the prefix micro-. Who Uses Zettabytes and Yottabytes Anyway? © Jones & Bartlett Learning, LLC © Jones & Bartlett Learn The National Security Agency NOT FOR SALE OR DISTRIBUTION (NSA), an intelligence-gathering organization NOTinFOR the United SALE OR DIST States, opened its new Intelligence Community Comprehensive National Cybersecurity Initiative Data Center in Bluffdale, Utah, in October 2013. Approximatel y 100,000 square feet of the structure is utilized for the data center, whereas the remaining 900,000+ square feet houses technical support and administration. The new data center will help © Jones & Bartlett the NSA Learning, monitor theLLC © Internet. vast volume of data traffic on the Jones & Bartlett Learning, LLC NOT FOR SALE OR It isDISTRIBUTION estimated that the NSA collects roughl y 2 NOT million FOR gigabytes SALEof data OR every hour, DISTRIBUTION 24 hours a day, seven days a week. This data includes foreign and domestic emails, es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 1.3 / An Example System: Wading Through the Jargon     11 © Jones & Bartlett cell phone Learning, calls, Internet LLC purchases, text messages, searches, various © Jones & Bartlett Learn videos watched NOTonline, FORcredit SALE card transactions, social media interactions, and other forms of SALE OR DISTRIBUTION NOT FOR digital OR DIST data. The computer responsible for anal yzing this data for the new data center is the Titan supercomputer, a water-cooled machine capable of operating at 100 petaflops (or 100,000 trillion calculations each second). The PRISM (Planning Tool for Resource Integration, Synchronization, and Management) surveillance program will gather, © Jones & Bartlett Learning, ­process, and track LLC all collected data. © Jones & Bartlett Learning, LLC NOT FOR SALE ORAlthough DISTRIBUTION we tend to think in terms of gigabytes NOTand FOR SALE terabytes whenOR DISTRIBUTION buying stor- age for our personal computers and other devices, the NSA’s data center storage capacity is measured in zettabytes (with many hypothesizing that storage will eventu- all y be in thousands of zettabytes, or yottabytes). To put this in perspective, in a 2003 study done at the University of California (UC) Berkeley, it was estimated that the es & Bartlett Learning, amount LLC of new data created in©2002 Jones & Bartlett Learning, LLC was roughl y 5 exabytes (5EB). An earlier study OR SALE OR DISTRIBUTION by UC Berkeley e­ stimated that by the end ofSALE NOT FOR 1999, the OR sumDISTRIBUTION of all information, includ- ing audio, video, and text, created by humankind was approximatel y 12EB of data. In 2006, the combined storage space of every computer hard drive in the world was esti- mated at 160EB; in 2009, the Internet as a whole was estimated to contain roughl y 500 total exabytes, or a half zettabyte, of data. Cisco, a U.S. computer network hard- © Jones & Bartlett Learning, LLC © Jones & Bartlett Learn ware manufacturer, estimated that by 2016, the total volume of data on the global NOT FOR SALE OR DISTRIBUTION Internet would be 1.3ZB, and Seagate Technology, an American manufacturer NOT FORofSALE hard OR DIST drives, estimated that the total storage capacity demand would reach 7ZB in 2020. This zettabyte level was actuall y reached in 2013. The NSA is not the onl y organization dealing with information that must be ­measured in numbers of bytes beyond the typical “giga” and “tera.” It is estimated that © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC Facebook collects 4PB of new material per day; YouTube observes roughl y 1TB of new NOT FOR SALE video OR DISTRIBUTION information every four minutes, or roughl yNOT FORofSALE 500 hours OR every new videos DISTRIBUTION min- ute; the CERN Large Hadron Collider generates 1PB of data per second; and the sen- sors on a single, new Boeing jet engine produce 20TB of data every hour. Although not all of these examples require ­permanent ­storage of the data they create/handle, they nonetheless ­provide evidence of the remarkable quantity of data we deal with every es & Bartlett Learning, day. LLC This ­tremendous volume of©information Jones &isBartlett Learning, what prompted the IBM LLC Corporation, in OR SALE OR DISTRIBUTION 2011, to develop and announce NOT FOR its new SALE 120PB OR DISTRIBUTION hard drive, a storage cluster consisting of 200,000 conventional hard drives harnessed to work together as a single unit. If you plugged your MP3 player into this drive, you would have roughl y two billion hours of music! In this era of smartphones, tablets, cloud computing, and other electronic devices, © Jones we will & Bartlett continue Learning, to hear LLC about petabytes, exabytes, people talking © Jones & Bartlett Learn and zettabytes NOT FOR (and, SALE in the case OR NSA, even yottabytes). However, if we NOT of theDISTRIBUTION outgrow FOR SALE OR DIST yottabytes, what then? In an effort to keep up with the astronomical growth of information and to refer to even bigger volumes of data, the next generation of prefixes will most likel y include the terms brontobyte for 1027 and gegobyte for 1030 (although some argue for geobyte and geopbyte as the terms for the latter). Although these are not yet © Jones & Bartlett Learning, universall LLC y accepted international prefix units, if© Jones history & indication, is any Bartlettwe Learning, will need LLC NOT FOR SALE them OR DISTRIBUTION sooner rather than later. NOT FOR SALE OR DISTRIBUTION es & Bartlett Learning, LLC © Jones © Jones & Bartlett Learning LLC, an Ascend Learning &NOT Company. Bartlett FOR SALELearning, LLC OR DISTRIBUTION. es & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC OR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION 12    Chapter 1 /  Introduction © Jones & Bartlett Learning, LLC © Jones & Bartlett Learn Null Pointers: Tips and Hints NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST Understanding the various prefixes introduced in this section can be confusing. We suggest spending some time to make sure the common prefixes associated with computer organization and architecture are well understood. It is important to understand that these prefixes can refer to both base 10 and base 2 values. For © Jones & Bartlett Learning, LLC © Jones & Bartlett Learning, LLC example, 1K could mean 1000, or it could mean 1024. We encourage you to find NOT FOR SALE OR DISTRIBUTION computer ads with example systems and read through NOT FOR SALEspecifications. the various OR DISTRIBUTION See if you can find a memory that is listed using 210 and a several-GB hard drive that uses 1030. Make sure you know the difference between kilobits (Kb, often used for expressing transmission speeds) and kilobytes (KB, typicall y used when referring to es & Bartlett Learning, LLC In addition, it is important storage). to know how © Jones to convertLearning, & Bartlett from one unit to another. LLC For example, 1024KB = 1MB because 1024KB = 210 × 210 = 220. If we are working OR SALE OR DISTRIBUTION NOT with time, and using base 10, you FOR should be SALE OR DISTRIBUTION able to determine that there are 1000 milliseconds in 1 second (1 second = 100 = 103 × 10-3). You should practice convert­ ing from one unit to another to make sure you understand the relationship between different prefixes. © Jones & Bartlett Learning, LLC © Jones & Bartlett Learn NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DIST When a Gigabyte Isn’t Quite... Purchasing a new array of disk drives should be a relatively straightforward process once you determine your technical requirements (e.g., disk transfer rate, interface type, etc.). From © Jones & Bartlett here, youLLC Learning, should be able to make your©decision Jonesbased on a simple & Bartlett price/ Learning, LLC capacity ratio, such as dollars per gigabyte, and then you’ll be done. Well, not so fast. NOT FOR SALE OR DISTRIBUTION NOT FOR SALE OR DISTRIBUTION The first boulder in the path of a straightforward anal ysis is that you must make sure that the drives you are comparing all express their capacities either in formatted or unformatted bytes. As much as 16% of drive space is consumed during the format- ting process. (Some vendors give this number as “usable capacity.”) Naturall y, the price– capacity ratio looks much better when unform

Use Quizgecko on...
Browser
Browser