You are ChatGPT, a large language model trained by OpenAI.
- User
System: You are ChatGPT, a large language model trained by OpenAI. User: I will send you a body of text, I will then state what you do next. User: 230 28 Hardware and software INTRODUCTIONThe term ‘system’ is often used to refer to the various physical components of your computer – the monitor, keyboard, etc. A computer system has two main elements: hardware and software . It is only when the two ar e combined that you create a fully working system. There is no point in having one without the other. Some defi nitions of a computer system add in a third vital element – the user. In this chapter we will look at the main elements of hardware and software that make up a computer system.SPECIFICATION COVERAGE3.6.1 Hardware and software LEARNING OBJECTIVES In this chapter you will learn: •the defi nition of hardware and software•that hardware is classifi ed into internal and external components •that there are many different types of software•many programs are created to make a computer system work, suchas o perating systems, library and utility programs•specifi c software exists to convert programming code into machine code•how the operating system manages resources. ●HardwareComputer hardware is the physical components of the computer. Sometimes this is described as ‘the parts you can touch’. This is not particularly helpfulas many elements of hardware are contained inside your computer and canonly be seen (or touched) by taking off the case. Therefore, it is importantto distinguish between the internal components, which are the processingand storage devices, and external components, normally referred to asperipherals.KEYWORDSHardware: a generic term for the physical parts of the computer, both internal and external. Software: a generic term for any program that can be run on a computer.HARDWARE 231●External components (peripherals): The external components of hardware the parts that you can touch, for example the monitor, mouse, keyboard, and printer. The external components are used either to get data into or outof the system. Consequently, they are referred to as input and output (I/O)devices. Some storage devices are also external, for example DVD and flashdrives may be added as peripherals. Input devices include the keyboard,mouse, scanner, digital camera and microphone. Output devices include themonitor, printer and speakers. Figure 28.1 External hardware devices ●Internal components (processing and storage): the internal hardwarecomp onents are housed within the casing of the computer and includethe processor, the hard disk, memory chips, sound cards, graphics cardsand the circuitry required to connect all of these devices to each otherand to the I/O devices. Figure 28.2 Internal hardware components2328 Hardware and software●Software Hardware is useless on its own unless we have some programs to run onit. Software is the general term used to describe all of the programs thatwe run on our computers. These programs contain instructions that theprocessor will carry out in order to complete various tasks. This covers an enormous range of possibilities from standard applications,such as word processors, spreadsheets and databases, to more specificapplications, such as web-authoring software and games. It also includesprograms that the computer needs in order to manage all of its resources,such as file management and virus-checking software. As users, we tend tobe aware of the software that we use on a regular basis, yet this is only onepart of the software that is on our computers. The range of software is so great now that some classification is needed inorder to make sense of it all. A first level of distinction is made betweenapplication software and system software. Application software refers to all of the programs that the user uses in orderto com plete a particular task. In effect, it is what users use their computers for. People do not buy computers for the sake of it, they buy them because theyhave a need to do something: write essays, email, manage a business, createweb pages, etc. To carry out any of these, application software is needed thathas the necessary features. There is a wide range of application software available and, in most cases,a number of different applications to choose from that complete the sametask. For example, you need application software to access web pages on theInternet – it is called a browser. There are three main ones to choose from: Internet Explorer, Google Chrome and Mozilla Firefox; and many more lesswell known ones. All of them do the same thing although there are subtledifferences between them. System software Whereas application software is what we use our computers for, systemsoftware covers a range of programs that are concerned with the moretechnical aspects of setting up and running the computer. Many aspectsof system software are invisible to the user which means that they willnot even realise that they have system software on their computer. Systemsoftware exists to support the applications software. There are four main types: utility programs; library programs; compilers,assemblers and interpreters; and operating system software. Utility programsThis covers software that is written to carry out certain housekeeping taskson your computer. They are normally supplied with the operating systemthough they can be purchased separately. Utility programs are often made available as free downloads. Utility programs are designed to enhance the use of your computer and programs though your computer will stillwork without them.KEYWORDApplication software: programs that perform specific tasks that would need doing even if computers didn’t exist, e.g. editing text, carrying outcalculations. KEYWORDUtility programs: programs that perform specific common task related to running the computer, e.g. zipping files.SOFTWARE233A common example of a utility program is compression software which allows you to compress files, making them much smaller. Other examples include anti-virus software, back-up software and registry cleaners. Library programs are similar to utility programs in that they are written to carry out common tasks. The word library indicates that there will be a number of software tools available to the users of the system. Whereas some utility programs are non-essential, library programs tend to be critical for the applications for which they were built. For example, the Windows operating system uses Dynamically Linked Library (DLL) files, which contain code, data and resources. These are similar to executable files and are loaded dynamically by Windows as they are required. There are hundreds of DLL files that carry out a wide range of actions including controlling dialog boxes, managing memory, displaying text and graphics and configuring device drivers. The Python programming languages also has an extensive library that contains built-in modules that provide various standard system functions and solutions. For example, the library contains code modules for handling common data types, displaying fonts and graphics and performing mathematical and functional operations. Translators: compilers, assemblers and interpretersTranslators are software used by programmers to convert programs from one language to another. There are three types: compilers , assemblers and interpreters . At some point, every piece of software, whether it is application software or system software, has to be written by a programmer. A program is simply a series of instructions written by a programmer that the computer’s processor must carry out. In order to write software, programmers use programming languages which allow them to write code in a way that is user-friendly for the programmer. However, the processor will not understand the programmers’ code, so it has to be translated into machine code, that is, 0s and 1s. Compilers, assemblers and interpreters are used to carry out this translation process. There is more detail on how these work in Chapter 29. Operating system softwareAn operating system is a collection of software designed to act as an interface between the user and the computer and manages the overall operation of the computer. It links together the hardware, the applications and the user, but hides the true complexity of the computer from the user and other software – a so-called virtual machine . When you are using a computer you are obviously aware of the applications software you are using, whether it is an Internet browser, a spreadsheet or a game of some sort, but you are much less aware of the software that is running in the background. The systems software is dominated by the operating system (OS). The OS in a modern computer is very large. For example, Microsoft Windows 8 needs a minimum of 1 GB of RAM and 16 GB of hard disk space KEYWORDS Translators: software that converts programming language instructions into 0s and 1s (machine code). There are three types – compilers, assemblers and interpreters. Compiler: a program that translates a high-level language into machine code by translating all of the code. Assembler: a program that translates a program written in assembly language into machine code. Interpreter: a program for translating a high-level language by reading each statement in the source code and immediately performing the action. Operating system software: a suite of p rograms designed to control the operations of the computer. Virtual machine: the concept that all of the co mplexities of using a computer are hidden from the user and other software by the operating system.KEYWORDLibrary programs: code, data and resources that can be called by other programs.23428 Hardware and softwarewhen the computer is in use. This gives you some idea of the complexity of the OS. This is because the OS carries out many tasks. For example it: ●controls the start-up configuration of your computer, including whaticons to put on your desktop and what backdrop to use ●recognises when you have pressed a mouse button and then decides what, ifany, action to take ●sends signals to the hard disk controller, telling it what program totra nsfer to memory●decides which sections of memory to allocate to the program you are intending to use and manages memory to ensure all of the programs you want to run are allocated the space they need●attempts to cope with errors as and when they occur. For example, if apri nter sends an ‘out of paper error’ or you fail to save a file correctly, itis the operating system that displays the appropriate message ●makes sure that your computer shuts down properly when you have finished ●controls print queues●manages the users on a network – it maintains the lists of usernames and passwords and controls which files and resources users have access to. ●Resource managementComputers are capable of running many programs, seemingly at the sametime. It is the job of the operating system to make sure that each program isallocated enough memory to operate efficiently.In a computer with only one processor , only one program can actually be live at any one moment in time. In order to allow more than one program to appear to run simultaneously, the operating system has to allocate accessto the processor and other resources such as peripherals and memory. Oneof the main tasks that an operating system has to do is to make sure that allthese allocations make the best possible use of the available resources. Usually the most heavily used resource in a computer is the processor. The process of allocating access to the processor and other resources is calledscheduling . The simplest way that an operating system can schedule access tothe pr ocessor is to allocate each task a time slice. This means that each task isgiven an equal amount of processor time. This process of passing access to theprocessor from one task to the next is also known as ‘round-robin’ scheduling. Time slicing is a crude system because a particular task might not need allor even any of its allotted time slice with the processor. For example, a wordprocessor might be waiting for the slowest part of any computer system, theuser, to press a key. Waiting for this to happen is a waste of processor timeand so a more sophisticated scheduler might pass the time slice on to thenext task before the word processor’s time slice has expired. Managing input/output devices The operating system also controls the way in which the various input andoutput devices are allocated, controlled and used by the programs that areusing them. Common examples would include: ●allocating print jobs to printers●rendering the windows, frames and dialog boxes to the screen ●controlling the read/write access to the hard disk.KEYWORDSResource management: how an operating system manages hardware and software to optimise the performance of the computer. Processor: a device that carries out comp utation on data by following instructions, in order to produce an output. Scheduling: a technique to ensure that dif ferent users or different programs are able to work on the same computer system at the same time.RESOURCE MANAGEMENT 235Accessing some devices is a relatively slow process compared to the speed at which the processor can handle requests. At the same time there are likely to be competing requests where several processes are waiting for the same device. For example, reading and writing to a standard hard disk is relatively slow. Rather than wait for each process to end before it can continue, the OS can effectively create a queue of commands that are waiting for the device and then handle each request in sequence or based on priority. Every input/output device has a device driver, which is a piece of software that enables the device to communicate with the OS. Device drivers are often built in to the OS or installed when new devices are attached. When the OS starts up it loads the various drivers for all of the input/output devices it detects. There is more on how input/output devices connect to the computer in Chapter 32. Memory management In the same way that the operating system of a computer controls the way files are stored on a secondary storage system, such as a hard disk, the operating system also controls how the primary memory or RAM is used. The operating system stores details of all the unallocated locations in a section of memory known as the heap. When an application needs some memory, this is allocated from the heap, and once an application has finished with a memory location or perhaps an application is closed, the now unneeded memory locations are returned to the heap. When a user asks for a file to be loaded, it is the job of the memory management routines to check to see if enough memory is available and then alocate the appropriate memory and load the file in to those locations. The operating system controls the use of main memory by creating a memory map, which shows which blocks of memory have been allocated to each task. This way an operating system can control more than one task in the RAM at any one time. The amount of memory needed by each task is dependent on the size of the program itself, the variables that will be needed and any files that might be generated by the task, but it is up to the operating system to decide how much space can be allocated. When the operating system processes a request to load an application or file from the hard disk it is the job of the memory management system to decide whereabouts in the RAM the file will be stored. As you add to a file it is highly likely that the work will need more than one block of RAM. In this case, a type of linked list is used to show where each subsequent block is stored. App1 File1 unusedIn this stylised example of a memory map, the application, App1 was loaded first and work started on File1 . App1 File1 App2 File1 unused After a while the application App2 is loaded, then work carried on with File1 . Because App2 is now in the memory, File1 is now spread across two sections of RAM. App1 File1 App2 File1 File2 File1 unusedKEYWORDMemory management: how the operating system uses RAM to optimise the performance of the computer.236 28 Hardware and softwareA little work is done using App2 which generates File2 , and then work recommences on File1 which is now spread across three sections of RAM and so on. App1 unused App2 unused File2 unusedFile1 is now saved and then deleted from RAM, the memory map now looks something like this. App1 App2 File2 unusedThe operating system might now decide to rationalise this and move the applications and existing files so that all the unused space is put together. Even with this simple example you can see that managing the memory can be a complex task for the operating system to control. Virtual memory and pagingIn some cases, the application or file you are trying to work with will be too big to fit in the available RAM. In this case a process called virtual memory can be used. This involves using secondary storage such as a hard disk to store code or files that would normally be held in RAM. The operating system then treats that part of the hard disk as if it is part of the RAM, hence the name virtual memory. An alternative method is to hold a kernel or central block of the code in RAM. Other sections of code known as ‘pages’ are loaded from the secondary storage as and when they are needed. Using this method allows very large applications to run in a small section of RAM. This in turn frees up memory for other applications to use. A word processor will hold instructions about how to cope with the text itself in the kernel but if the user selects a less commonly used task, such as spell checking or mail merging, the appropriate page of the program will be loaded into RAM from the hard disk. This downloading often causes a noticeable delay in the operation of the application. File managementOne of the many tasks the operating system has to deal with is managing files – this includes controlling the structures that are used to store the files. The hard disk on a home computer is likely to contain many thousands of files and without some sort of logical storage structure it would be impossible to find a specific file amongst so many. The operating system on a home computer uses folders or directories. These allow the user to group similar files together so that, for example, all the files for your Computing course might be kept in one folder whilst all the photos from your digital camera would be kept in another. In the case of the photos, it is highly likely that there will be folders within folders. The way folders like these are arranged is known as a hierarchical structure – it looks rather like an inverted tree and indeed the start or base folder is normally referred to as the root folder. Each file has a filename but because of the folder structure it is possible to use the same filename for different files. In the coursework/photo example there might be a folder called miscellaneous and a file called latest in each area. Obviously this is not particularly good practice, especially if you want to move files between folders and you lose track of which folders you are working with. It is a good practice to use folder and file names that indicate what they are being used for.KEYWORDFile management: how an operating system stores and retrieves files.RESOURCE MANAGEMENT 237As hard disks get larger and larger, it is becoming increasingly common to split up or partition a hard disk. This means that although you actually only have one hard disk in your computer, the operating system splits it up into a number of partitions or logical drives. This means your computer seems to be fitted with more than one hard drive. You might use this system to store your applications on one logical drive and your data on another. Module2Module 1MockAS Module2Module 1MockAExam papersWo rksheetsMark bookSchoolFigure 28.3 Hierarchical file structure Practice questions can be found at the end of the section on page 264. TASKS1 Explain the terms hardware and software, differentiating between different types of hardware and software.2 Identify two utility programs that are not normally part of an operating system.3 Explain the term virtual machine in the context of an operating system. This should include details of the main tasks performed by the OS.4 Explain how it is possible for two programs to apparently be running at the same time. 5 Explain how it is possible for two files with the same name to be stored in a file structure.6 Explain the difference between resource and file management. STUDY / RESEARCH TASKS1 What type of software is a DLL and what is its purpose? 2 What are the most common operating systems in use for mobile devices?3 Compare two commonly used operating systems. Why would you choose to use one over the other?4 Open source operating systems such as Linux are not as widely used as Windows or Mac OS. Why not? 5 In a computer system with multiple processors, what implications does this have for how the OS handles resources?KEY POINTS•A computer system is madeup of har dware and software. •Hardware is usually classifiedin terms of internal and external components. •System software includes theoperating system, library and utility programs. •Compilers, interpreters andassemblers are programs that convert high-levelprogramming language intoexecutable instructions. •The operating system playsa critical role in managing resources. User: Make the following text more clear. Format it properly. Do NOT change the meaning of the words or methods used to obtain the answer or anything like that. This is for AQA A(S)-Level Computer Science. I repeat, do not alter the words as it could have an effect on the marks acquired from the marking scheme. However, remove any redundant information or USELESS examples that are not needed for a student to know, or simplify unnecessary information (if it has a definition or keywords, it is not unnecessary). If you can, use different values for the examples. For things that will not score a mark or are generally useless, for example, "we will cover" or a fun fact, change the wording. This is for AS Level, do not include information about topics that are ONLY A-Level Content (if it says it is) Link the 'sections' of your answer to the following spec-points (by title): e.g. " (Spec Points: a.b.c. Whatever) 3.6.1.1 Relationship between hw and sw Content Additional information Understand the relationship between hardware and software and be able to define the terms: hardware software.
- Assistant
This refers to virtual memory, which uses secondary storage to store data temporarily when the main memory (RAM) is insufficient.