Copyright© Copyright 2013. Computing AcademyAll rights reserved. No part of this publication may be reproduced or transmitted in anyform or by any means, electronic or mechanical, including photocopying and recording, orheld within any information storage and retrieval system, without permission in writingfrom the author or under license from the Copyright holder. Reproduction, distribution andlicensing requests should be made via email to [email protected] i
TermsThis publication may only be used in accordance with the terms set out at:http://www.computingacademy.org.uk/terms. By continuing to access this publication youagree to be bound by these terms.Computing Academy makes every reasonable effort to ensure the quality and accuracy ofthis publication, however errors and omissions do occur. Computing Academy does notguarantee that this publication is accurate, suitable or relevant for a particular syllabus orexamination board. You are responsible for ensuring that this resources meets your needsand the requirements of the syllabus you are following; we will accept no responsibility orliability for any mistakes, errors or omissions in this publication but we will endeavour tocorrect any errors brought to our attention within a reasonable amount of time. ii
AcknowledgementsAll images, photographs, diagrams and text are the original works of the author, with theexception of those acknowledgments made below.Every effort has been made to trace all copyright holders, but if any have beeninadvertently overlooked please do contact us.Photo Creditsp6 http://en.wikipedia.org/wiki/File:Charles_Babbage_-_1860.jpg; p10 © The University ofManchester - used with permission; p27 © Paul Wootton Graphics(www.graphicnet.co.uk); p43 Gnome 3.8 CC BY-SA 3.0; p46 © Google Inc; p51 © GoogleInc; p123-138 Apache OpenOffice Screenshots used with permission from Apache.Apache, Apache Foo, Foo, and the Foo logo are trademarks of The Apache SoftwareFoundation. No endorsement by The Apache Software Foundation is implied by the use ofthese marks; p140-145 © Josh Tynjala, Logicly - used with permission; p150 London Eye:© http://www.sxc.hu/photo/616616; iii
ForewordComputer Science isn’t a new subject. science, get you thinking about how to use computers to solve problems and get youThe science of sequencing instructions excited about creating and running yourand developing algorithms has been own computer programs and games ratheraround since the 17th Century with than just using existing programs andGottfried Wilhelm Leibniz’s ‘Stepped playing games.Reckoner’; a mechanical counting machinebuilt in 1672, Johann Helfrich von Müller’s Students and teachers can use this bookDifference Engine built in 1786 and the first as a companion for any Computer Scienceprogrammable computer built by Charles course: although we do not endorse anyBaggage in 1812. particular examination board, we have paid close attention to the examination boardMuch has changed since then. Computers specifications and believe that this text willno longer fill entire buildings; indeed it is prove to be an invaluable resource.often the case today that we don’t evennotice computers at work.Computers have become so embedded inour everyday lives and so easy to use thatwe’ve stopped thinking about how theyactually work; what goes on inside thatbox?This book aims to guide you through thefundamental principals of computer iv
Charles BabbageThe “father of the computer”. An English mathematician, philosopher, inventor andmechanical engineer who invented the concept of a programmable computer. v
Contents1. Computer Systems ............................................................................ 82. Hardware What Are Computer Systems 93. Software Input, Process, Output 114. Data Representation Using Computer Systems 13 Standards 18 Further Considerations 21 24 ............................................................................ 26 Permanent Storage 31 33 Random Access Memory 35 ROM and Virtual Memory 41 42 Central Processing Unit 43 ............................................................................ 49 50 What Is Software? 53 Operating Systems 54 55 Drivers 71 Applications 81 85 Utilities 90 ............................................................................ Binary Hexadecimal ASCII Images Sound vi
5. Networking ............................................................................ 95 What Are Networks? 966. Databases 1017. Algorithms Network Classification 1038. Programming Network Infrastructure 107 111 Network Types 114 Network Topologies 117 128 Network Protocols 129 The Internet 133 138 ............................................................................ 145 Thinking About Data 148 149 Database Management Systems 156 Relational Databases 163 Queries 164 174 ............................................................................ 176 Logic 182 186 Sequencing 199 ............................................................................ 206 208 Programming Languages 211 The Basics Variables Data Types Operators IF Statements Loops Arrays Documenting Code vii
1 Computer systems take a set of inputs, process them andComputer Systems create a set of outputs
What Are Computer Systems?Computers today are all around us in one form or another. Take a quick look around atypical home and you’re sure to find many different types of computers.There are obvious examples such as desktop computers, laptop computers, tabletcomputers and mobile phones. There are also computer systems which we take forgranted and probably don’t even think of as being ‘computers’ such as alarm clocks,watches, washing machines and microwaves.The first electronic programmable computer, built in 1943 was called Colossus, but asColossus could not store programs the operators had to enter the program from scratcheach time they turned the machine on. 9
The first computer able to store a program was built at Manchester University in 1948; itwas called the Small Scale Experimental Machine, or ‘Manchester Baby’. The first program ‘Baby’ ran took 52 minutes to complete; a modern computer would take less than a second to complete the same calculation. Computers can be dedicated which means that they have been designed for a specificpurpose such as a satellite or terrestrial television recorder, or a burglar alarm. Thesededicated computer systems are designed to perform a specific function and nothing else.Computers may also be general purpose which means they do not have one mainfunction, for example desktop computers and laptop computers.Although computers come in all shapes and sizes they share a common principle: Key Point Computers consist of a set of parts which work together to achieve a common purpose. All computer systems take a set of inputs, process them and create a set of outputs. This is done through a combination of hardware and software. 10
Input, Process, OutputThe following diagram shows a computer system in its most basic form.Computer systems have one or more inputs which sense, detect and collect data. Thisdata is then processed, which can include sorting, searching and calculating. The result 11
of this processing is then output or stored for outputting later. Outputs may includedisplaying data to a screen, printing a hard copy (paper copy), or playing a sound.In order to be clear about whether a device is an input or an output device consider: Is data flowing INTO the computer from the outside world...? ...or is data flowing OUT from the computer to the outside world?Here a few examples of computer hardware that you will be familiar with, separated intoinput and output devices. Input Output Keyboard Monitor / Screen Mouse PrinterCashless Reader / NFC Projector Speakers KeypadTaskWrite down 3 more input and 3 more output devices that might be used aspart of a computer system. 12
Using Computer SystemsWhy are Computer Systems Important?Think about how many computer systems you might interact with during a typical day:checking text messages or email in the morning; microwaving a bowl of porridge; setting aburglar alarm; using a swipe card to enter a building; being observed by a CCTV securitysystem...........and that‘s all before you even arrive at work or school.All day, every day, computer systems are at work; here are just a few examples. 13
Description Input Process Output Cash MachineOnline Cinema Booking User inputs their pin System checks that the Options (such as check Contactless Payment number pin number is valid balance and withdraw cash) output to user via Voice-activated Smartphone the screen User selects film System checks Available seats output to availability user in a diagrammatic representation of the cinema User touches contactless System looks up the A message is displayed card or chip to the card user’s account and to the user stating that checks to see whether either the transaction reader they have sufficient funds was successful or that - if so, the account is the transaction was charged declined User speaks into the The system determines Depending on the microphone (recognised what has been said using command input, the instructions) speech recognition phone may dial a algorithms number, perform a Google search, ‘speak’ a response etc.Here are some further examples of where computer systems can be found.RetailEcommerce / online shopping websites, automatic stock ordering systems, logistics /delivery trackingCommunicationEmail, social networks, video calling, telephone calls, text messagesEducationVirtual Learning Environments (VLEs), interactive learning activities, quizzes andeducational gamesScienceSimulations and data processing / number-crunchingTravelFlight booking and tracking, mobile app bus timetables, GPS navigation, train signalling,aircraft guidance 14
ReliabilityWe rely on computer systems an awful lot. Air traffic control systems and hospital lifesupport systems are just two examples of where we quite literally put our lives in thehands of computer systems. We therefore need to know that they are going to be reliable.System designers, and the companies and individuals buying computer systems talkabout reliability using two main measures.AvailabilityIdeally, a computer system will be available all the time, 24 hours each day, 365 days peryear. In reality that might not be the case due to system failure and the need to temporarilytake a system offline for maintenance. Availability is one measure used to judge thereliability of a system. Over a period of 30 days, if the system was available without issuefor 30 days the system availability would be 100% for this period. If the system had a faultand as such was out of action for 1 out of the 30 days, the system availability would be97% for this period ([29 / 30] * 100).MTBFAnother measure of reliability is the Mean Time Between Failure (MTBF) which is a figureprovided by hardware manufacturers who test their products and generate a MTBF valuebefore they are sold. The MTBF will be the average length of time, usually in hours, that aparticular hardware component is predicted to operate for without failure.TestingSoftware engineers will write millions of lines of programming code, and whilst they areoften highly skilled, even the most experienced programmers sometimes make mistakes.A program to control the operation of a washing machine may seem simple whencompared with the program used to manage and track aircraft, but even the softwarecontrolling that washing machine will consist of thousands of lines of code.Software engineers need to test their code in order to catch any errors they may havemade. Testing is a time consuming and therefore expensive process that requires testers 15
to think about every possible way a system could be used; in the case of the washingmachine this could mean testing every possible combination of buttons that a user couldpress, testing what happens if the door isn’t shut when the start button is pressed, testinghow the system recovers if the power is cut during a wash cycle etc.Extensive testing should take place before software is released, whether that software isan air traffic control program or just a new app for a smartphone.Once the software engineers are happy with the software they may first release this to alimited group of beta testers who may find errors also known as bugs that were missedby the developers.After a piece of software is released and put to use it will need maintenance andsoftware updates. This is necessary to fix further bugs found after release or to ensurethe software continues to function correctly if the systems around it change. Whensmartphone operating systems receive updates, app developers sometimes need toperform updates of their own app in order to ensure that it will continue to run correctly onthe updated smartphone operating system.FailureSystem failure could have catastrophic consequences so it’s important for organisations tobe prepared, and protect against or prepare for system failure. In the context of computingRedundancy means ‘spare’, ‘excess’ or ‘additional’; if a computer system has redundantstorage it means that rather than just one hard drive, it has two or three.High profile ecommerce and social networking websites would lose millions of pounds iftheir systems failed, so they use redundancy. If one hard drive fails, a redundant hard drivewill take over. If an entire server fails, a redundant backup server will automatically takeover.In addition to using redundant hardware, organisations who rely on hardware and data fortheir very survival will have prepared a disaster recovery plan. A disaster recover plan isjust what it sounds like - a plan of what to do in case of a disaster such as fire, theft, flood,power loss, terrorist attack etc. Disaster recovery plans set out which individuals need to 16
do what and when in the event of a disaster. Some individuals may need to make atelephone call to a different city or country asking them to bring a redundant server online;others might need to unplug backup drives and get these to a safe location. Task Think about a computer system that would be used in each of the following categories: Retail, Communication, Education, Science, Travel For each computer system, write down the inputs, processes and outputs taking place. 17
StandardsStandardsIn order to reduce system failure and make systems more reliable, developers adhere tostandards.Here’s an example of two systems trying to work together that don’t use the same set ofstandards. 18
Example Imagine that System A has been designed so that code #105 means “yes, everything is fine”. System A sends out this code to System B to let it know. The problem is, System B is using a different set of standards. In System B code #105 means “please send me some data”. System B now starts sending lots of data to System A. System A wasn’t expecting this data so sends code #993 to System B. The set of standards used by System A say that code #993 means “stop”, but the set of standards used by System B say that code #993 means “can you send the data faster please”.Systems need to operate using an agreed, common set of standards otherwise they justwon’t work very well (or at all) together.Proprietary StandardsProprietary standards are owned and controlled by companies. The .doc and .docx fileformats are owned by Microsoft and these file formats use a particular standard way ofsaving and presenting word processed documents. Every computer which has MicrosoftWord installed will be able to follow this standard in order to open a .doc or .docx fileproperly.Similarly, Pages, the word processor created by Apple uses a different standard. MicrosoftWord does not use the same standard as Apple Pages, so you cannot open Apple Pages’documents using Microsoft Word. 19
Industry StandardsThe computing industry do have some common agreed standards that they all follow.Universal Serial Bus (USB) is a standard way of connecting devices such as digitalcameras and printers to computer systems. The USB standard states the size and shapeof USB connectors and sockets and how data should be transmitted.De Facto StandardsHave you noticed that every keyboard you use has the same standard configuration ofkeys, with ‘QWERTY’ making up the first 6 letters of the first row of letters. Nobody ownsthis standard it has just evolved as the common, conventional way of setting out akeyboard. Although De facto standards are not owned or controlled by one person, theyhave been accepted as the best way of doing something. Should you wish to, you coulddesign a new keyboard with the letters in completely different positions.De Jure StandardIf you wish to create a webpage you’re going to need to write some Hypertext MarkupLanguage (HTML). There is no option here as HTML is a de jure standard - it’s the onlyacceptable way and you must use it if you wish to create a webpage.Open StandardsOpen standards are publicly available. Anyone who wishes to can look at, use and evenchange the standard. HTML is an open standard which means that you can make changesto it and suggest your changes to other users of HTML. If others see the benefit of yourchanges, they could be incorporated into the standard. Other examples of open standardsinclude TCP/IP (the method through which computer networks send and receive data),Android (the smartphone operating system) and Python (the programming language). 20
Further ConsiderationsEnvironmental ConsiderationsEach year the computer systems we use consume millions of Gigawatt Hours (GWh) ofenergy, and millions more GWh of energy are used on air conditioning in order to ensurethat those systems stay cool.The average lifespan of a computer system - whether that be a smartphone, laptop, tabletor desktop - is 3 years. These computer systems contain lots of toxic materials such asmercury and radioactive isotopes, all of which ends up in landfill.Power consumption and waste due to computer systems is a big problem for which we donot yet have a solution 21
Ethical ConsiderationsWhile legalities refer to what you can or can’t do under law, ethics is concerned withfairness; what it right and wrong. Doing something that is ethically wrong does notnecessarily mean that it is against the law.Should you wish to, you could setup a business offering to design websites for customerseven though you don’t really know how to create websites. Ethically, you should not dothis as it’s wrong and you won’t be able to produce good quality websites for yourcustomers; yet while ethically wrong, this would not be illegal.Legal ConsiderationsAs our use of computer systems increases, so does the range of laws and legislation tocontrol and govern our use of these systems. The Data Protection Act (1998) is a law inplace to protect people’s privacy and state what can and cannot be done with datacollected about individuals. The Computer Misuse Act (1990) concerns unauthorisedaccess to and improper use of computer systems. Task 1 Think about 3 more activities or actions involving the use of computer systems that could be considered ethically wrong. 22
Task 2Find out more about the Data Protection Act and the Computer MisuseAct.What can and can’t organisations do with data they collect under the DataProtection Act?What exactly is and isn’t allowed under the Computer Misuse Act? 23
2 Hardware describes the physical components of aHardware computer system
HardwareHardware vs SoftwareComputer systems consist of both hardware and software working together.Software…describes the sequences of instruction, code and programs that computers execute.While software may be stored on a CD, DVD or USB drive – these devices themselves arenot software. Software cannot be physically touched.Hardware…describes the physical components of a computer system – anything that can be seenor touched which can include input, output, storage and processing devices. 25
Permanent StorageComputers need to be able to remember lots of different things.Each time you login to your computer, you expect your documents, music and photos tobe ready and waiting for you - the computer needs to remember them all.Each time you advance to the next level in a computer game, you expect to earn points oradditional lives - the computer needs to be able to remember this data both during thegame, and next time you play the game.When using computers today, we seem to be performing lots of different tasks at thesame time: we check our emails while having a video call with family, while browsing onthe Internet for a new pair of shoes, while streaming a new album. 26
Computers use several different types of memory to ensure that they don’t forget all of thisdata.Permanent Storage / Secondary StorageHard Disk Drives (HDDs) and Solid State Drives (SSDs) are used in modern computers aspermanent, secondary or persistent storage. When you save a piece of work or copy photos from your digital camera to your computer they will be stored on a HDD or SSD. HDD A HDD is a stacked set of magnetic platters or plates. These platters spin up to 10,000 revolutions per minute (rpm), and mechanical arms seek backward and forwards across the spinning platter in order to read or write data to a particular sector of the disk. Data is stored to a HDD by manipulating and adjusting the magnetic charge into one of two directions. Each direction represents 0 (off) or 1 (on).HDDs are a type of secondary or permanent storage. They are persistent which meansthat the data will remain intact even when the power is turned off.In 1956 when IBM invented the first HDD it cost around $65,000 and stored about 5MB.Today, £100 will buy you a 5TB HDD (which is 5,242,880MB). 27
As well as making it very affordable to store large amount of data, HDDs are fairly reliable.Often, when HDDs fail it is either because the disk has been corrupted due to interference fromother magnetic sources (such as speakers), or because the mechanical parts have failed. Advantages Disadvantages Large Capacity Relies on moving partsFaster than optical disks e.g. DVDs Disk surface can become damaged Persistent storage Heavy power consumption Easily replaced / upgraded Noisy Slower read / write speed than RAMSSDA SSD can be used as an alternative to a HDD.Rather than using spinning platters and mechanical arms there are no moving parts inSSDs. SSDs use microchips to store data using electricity rather than magnetism. Specialtransistors are used which can retain their 1 (on) or 0 (off) state even when there is nopower.SSDs have very fast read / write speeds as there is no need to wait for a mechanical diskto spin and an arm to move into position.As there are no moving parts SSDs use much less power than HDDs so they are oftenused in laptop computers in order to extend battery life.As of 2013, SSDs are still a relatively new technology and as with all new technologies,when they first emerge the price is extremely high. Due to the high costs involved, the sizeof a SSD in a laptop is usually only around 300GB, compared with laptops which useHDDs which can be over 2TB. 28
Advantages Disadvantages Fast read / write access Small capacityRobust as no moving parts Very expensive Low power consumption Limited life (100,000 writes) Silent operation Persistent (not volatile)Cloud StoragePeople like to be able to access their files, music, photos and more from anywhere at anytime. Rather than using secondary storage such as HDDs or SSDs to store these types offiles, people are increasingly turning to cloud storage.Cloud storage may sound very science fiction, but all this means is that rather than storingyour data on your own HDD or SSD, you instead upload it to the Internet where it is storedon a HDD or SSD in another computer or server.In order to access your files you can now simply login to your cloud storage system fromany computer or device as long as you have an Internet connection. At the time of writingpopular cloud storage solutions include: Google Drive, Dropbox and iCloud.TaskInvestigate the different types of permanent storage available. What is thetypical size and cost for a HDD or SSD in a computer today? 29
30
Random Access Memory (RAM)The brain of the computer, the CPU, works very quickly. It constantly asks for the nextpiece of data to process. The problem is, the CPU processes data much faster thanpermanent storage can deliver it. Computer systems therefore make use of RAM.RAM operates much faster than permanent storage. There are no moving parts in RAM -just a set of microchips, so reading data from RAM and writing new data to RAM is veryfast.Data is loaded from the permanent storage into RAM. Then, as and when the CPU needsit, data is loaded from RAM into the CPU.When a computer system is powered up, RAM is the main type of memory at work. RAMstores the number of lives you have left in a computer game; it remembers which 31
webpage you were on when you switch to your email and then back to the web browser; itremembers what you have written in a word processed document, even though it hasn’tbeen saved yet. Think of RAM as short term memory.The more RAM a computer has, the better it can perform, especially when multitasking.Let’s say that you open up a music player, a photo editing program, a web browser, asocial networking website and a word processor - all of the data to make the programswork needs to be loaded from permanent storage into RAM.RAM is known as volatile memory; when you shut down your computer and turn thepower off, the contents of RAM is wiped clean. All of the data is lost. Advantages Disadvantages Fast read / write access Small capacityRobust as no moving parts Very expensive Low power consumption Volatile Silent operation 32
ROM and Virtual MemoryRead Only Memory (ROM)Every time you switch on your computer it performs a sequence of tasks such as checkingthat all of the hardware is present, checking that a keyboard and mouse is connected andchecking to ensure that the HDD or SSD contains the operating system; this is known as aboot sequence.We know that RAM is volatile, so once the computer is turned off, everything in RAM iswiped. Part of the boot sequence involves checking the HDD or SSD and we know thatthese storage systems are too slow, so the instructions necessary to perform the bootsequence can’t be stored here. 33
This is where Read Only Memory (ROM) comes in. ROM is non-volatile so it stores dataeven when the power is turned off. ROM is also very quick which is important when we’retrying to boot up a computer and don’t want to be kept waiting.Most computers have a ROM chip built into the motherboard which stores this bootsequence. When you turn on a computer the ROM chip gets to work, performs thenecessary checks and begins to boot the operating system.Virtual MemoryComputers load data and instructions into RAM before passing them to the CPU forprocessing. RAM is used as HDDs and SSDs are too slow. Sometimes, however,computers do not have enough RAM to cope with all of the jobs we are trying to do. Whenthis happens, RAM needs to dump some of the data it has stored that isn’t currently beingused into Virtual Memory in order to free up space in RAM for more urgent jobs.When necessary the operating system designates part of the HDD or SSD as VirtualMemory that can be used by RAM as a temporary extension.HDDs and SSDs are slow in comparison to RAM, so computers using Virtual Memory willsuffer from a significant reduction in performance. Users will notice this as they try andswitch between windows and applications. 34
Central Processing Unit (CPU)The CPU is the brain of the computer where the sorting, calculating and searching takesplace. Although it only looks like one chip, the CPU consists of several components:• Arithmetic and Logic Unit (ALU)• Program Counter (PC)• Control Unit• Cache• Buses 35
ALUThe ALU conducts the arithmetical and logicaloperations such as comparing values,addition, subtraction, multiplication etc.Program CounterThe PC keeps count of which instructionshave been executed and which one is next.The PC passes this information to the controlunit.Control UnitThe control unit keeps things ticking overnicely within the CPU. It uses electrical signalsto ensure that the correct instructions areexecuted at the correct time in the correctorder.CacheCache is another type of volatile memory that is very quick (and very expensive).Instructions and data are loaded into cache from RAM before being passed to the CPUBusesA bus is a pathway between different components of the CPU. Instructions, data andcontrol signals travel through buses within the CPU to the different components.Fetch-Decode-Execute CyclePrograms and data need to be fetched and loaded into RAM before they can beexecuted by the CPU. Once loaded into RAM, the processor needs to decode thestring of binary digits being fed to it and determine whether it is receiving aninstruction such as ‘ADD’ or a data value. The CPU can then execute the instructionsand perform the necessary calculations on the data it has been given. 36
FetchGet location of next instruction from Program Counter (PC), Get instruction and data bygoing to specified location in register, Update (+1) to Program Counter (so the CPU knowsthe address of the next instruction it needs to fetch)DecodeThe CPU now identifies theoperation code (op-code), partof the instruction that hasbeen fetched so it knowswhich operation to perform.The second part of theinstruction will contain thedata to be operated upon.ExecuteThe instructions and the dataare fed to the Arithmetic andLogic Unit (ALU) which thenperforms the calculation. Theresult is saved back to aregister and then back to RAMto be output to the user.Executing InstructionsWhether it’s playing the latest computer game, editing an image or simply browsing theInternet, all of those complicated tasks are broken down into a series of simplemathematical calculations to be processed by the CPU.The CPU runs incredibly quickly but it doesn’t store data, it simply crunches numbers. Weknow that data is stored using secondary storage such as a HDD or a SSD, but thesedevices are not quick enough to keep supplying data to the CPU at the rate at which it can 37
process this data. Computer Systems therefore make use of RAM, and an even quickertype of memory called cache.This constant stream of data from the HDD (or SSD) into RAM and then into Cache meansthat there will always be data ready to pass to the CPU for executing.As cache is so fast and so expensive, computer systems do not have very much cache.There are multiple levels of cache (depending on the brand and type of CPU).• Level 1 (L1) cache is always built into the CPU.• Level 2 (L2) cache is usually either built into the CPU or on the motherboard between the CPU and main memory (RAM)• Level 3 (L3) cache is usually built into the motherboardEach level of cache is increasingly quicker (L1 being the quickest) but with a smallercapacity 38
RegistersEach CPU core executes just one instruction at a time. A typical instruction for a CPU toexecute might be: ADD 8, 4Right before these values are passed to the ALU, they are moved from L1 cache into theCPU registers. Registers are very fast, very small segments of memory. Registers areused to temporarily store the very next instruction and data to be processed. Once theALU has performed a calculation, the result of that calculation is then stored back to aregister, before moving back through memory into cache, then into RAM.Hit or MissIf everything goes to plan, the CPU will always have enough data to process. When theCPU can find the next instructions in cache and load these into the registers ready toexecute this is known as a cache hit; the data and instructions are ready and the CPUdoes not have to wait around.If the instructions are not ready as they are still being loaded into cache from RAM (or evenfrom the HDD or SSD) the CPU will have to wait, this is known as a cache miss.Clock SpeedIn the human body, the beating of a heart is controlled by the Sinoatrial Node (SAN); someindividuals with heart conditions need to have a pacemaker fitted in order to replicate thefunctionality of the SAN. The SAN (or pacemaker) causes the heart to beat and at thatmoment oxygenated blood is pumped out of the heart and around the body, anddeoxygenated blood is pumped out of the heart into the capillaries surrounding the lungs 39
in order to collect more oxygen. In between beats the heart and the blood vessels are atrest.The operation of a CPU within a computer system has some remarkable similarities to thissystem. Rather than a Sinoatrial node, a CPU has an electronic clock chip which keepstime and regulates how frequently the CPU executes instructions. With each signal fromthe clock chip data flows through the CPUs buses, calculations are performed by the ALU,data is exchanged with RAM and data is read and written to the HDD or SSD.If a computer system had a clock speed of 500Hz, this would mean 500 cycles persecond. Modern single core CPUs running at 3GHz execute around 3 billion instructionsper second. Most computer systems today have multi-core CPUs which feature 2, 4 oreven 8 cores. This means that the CPU might have up to 8 ALUs each executing severalbillion instructions per second.While a CPU might be clocked at 3GHz, the fastest RAM available today runs at1066MHz; RAM is operating much slower than the CPU. This is why cache is soimportant. L1 cache operates the same clock speed as the CPU and L2 cache operates ata clock speed between RAM and L1 cache.The whole operation of the computer system is timed to the clock chip and within the CPUitself the clock chip controls the fetch-decode-execute cycle. 40
3 Software describes the sequences of instruction,Software code and programs that computers execute
What Is Software?We know that Computer systems consist of both hardware and software working togetherand we’ve explored hardware (the physical components of a computer system – anythingthat can be seen or touched which can include input, output, storage and processingdevices). So what is software?Software describes the sequences of instruction, code and programs that computersexecute; the computer games, smartphone apps, operating systems and applications thatrun on hardware.There are several types or categories of software. 42
Operating SystemsAn operating system (OS) is a collection of programs that control the system hardwareresources. The OS manages the flow of data between permanent storage (HDDs andSSDs), main memory (RAM) and the CPU. The OS also controls communication withperipherals connected to the computer system such as the keyboard and mouse.An OS can be found running on almost all computer systems from digital televisionrecorders and smartphones to games consoles and web servers. Other software such asword processors and web browsers rely on the OS and could not function without it. 43
SecurityPart of managing the system involves protecting users, system resources and files. Thereis a danger when passing data between permanent storage, main memory and the CPUthat data could be lost, corrupted or overwritten - it is the job of the OS to ensure that thisdoes not happen and prevent conflicts.One computer is not necessarily used by just one person. In schools, businesses andeven at home, computers need to manage several user accounts and ensure that thecorrect files and access permissions are granted to the correct users.Graphical User Interface (GUI)When we use computer systems we manipulate windows, click on buttons, and scrollthrough menus.We use a mouse to control a cursor on the screen and navigate this cursor to the icon wewish to click on. This type of interface is called a Graphical User Interface (GUI). GUIs 44
allow users to interact with the system using graphical icons and visual indicators; todaythis is the most common way for home users to interact with computer systems.The way we interact with computer systems continues to change and develop. We areincreasingly using touch, voice and even gesture commands to control our computersystems.Command-Line InterfaceBefore GUIs were developed, computer users had to type in each command they wantedto give to the computer using a command-line interface. While today home users findusing a GUI easier, many systems administrators, programmers and expert users stillprefer to use the command-line as it can allow greater control and speed up certainprocesses.WindowsDeveloped by Microsoft, the Windows series is still the most popular operating system forpersonal computers. The first version of this proprietary commercial OS was released in1985 and called Windows 1.0. The latest version, Windows 8, was released in 2012. 45
Mac OSThe first version of Mac OS was released in 1984 and was simply known as the “system”.It was not until 1996 when the software became known as Mac OS. The latest version isknown as OS X Mountain Lion and was released in 2012.LinuxAlthough not as popular as an OS for home PCs, most of the websites that we visit andthe online services that we use are hosted on computers that run a Linux OS. As Linux isopen source, any developer can freely access the source code and modify it as theywish; this has led to the development of many different versions or distributions of Linuxincluding Debian, Ubuntu, Fedora and Red hat.Linux is a popular choice for embedded systems and can be found controlling manymodem routers, digital and satellite television recorders and smartphones. In fact, almost30% of smartphones in use today run a version of Linux. Did you know that Android is amodified version of Linux?Mobile Operating SystemsMobile devices are designed to be used differently to homePCs. They need to consume less power as they run on abattery, the screen is smaller so information needs to belaid out appropriately, and today, most smartphones accepttouch or voice commands rather than input from akeyboard. As such, standard operating systems were notsuitable to be used on mobile devices and developers hadto build specialist platforms suitable for this type of device.Palm developed Palm OS and Windows developedWindows CE in 1996, Nokia launched S40 OS (Java ME) in1999 and Symbian brought out their OS in 2000.Blackberry brought out their OS in 2002 and this providedextremely popular with business users before Applelaunched iOS on the first iPhone in 2007. Google released 46
Android in 2008 and Windows unveiled Windows Phone OS in 2010.Despite all of the available operating systems for desktop and mobile devices, someremain dominant as depicted in the following charts . Desktop Operating System Market Share 2013 5037.52512.5 0 Windows 7 Windows XP OS X Windows 8 Windows Vista Linux Other Mobile Operating System Market Share 2013604530150 iOS Android Java ME Symbian Blackberry Windows Phone Other 47
TaskConduct some research using the Internet to find an example of acomputer system controlled by touch, voice and gesture. 48
DriversWhile the OS takes on much of the responsibility for controlling and managing peripheralssuch as the mouse, keyboard and printer, it needs a little help. There are thousands ofmanufacturers, producing thousands of different products that you might wish to connectto your computer system; many of these peripherals may have been designed after the OSwas released - so there is no way that an OS can possibly be prepared to communicatewith and control peripherals without some additional help.Device Drivers are small programs written by the hardware designers specifically for apiece of hardware. When you purchase a new printer or webcam it normally comespackaged with the drivers, or instructions about where on the Internet you can downloadthe drivers. A driver recognises signals sent from a piece of hardware and translates theseso that the OS understands. 49
Search
Read the Text Version
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 209
- 210
- 211
- 212
- 213
- 214