- Created by: 14imogehalli
- Created on: 23-04-19 11:58
Central Processing Unit (CPU)
CPU is an abbreviation for Central Processing Unit and is where most calculations in the computer take place. It is often said to be the "brain" of the computer and it is the most important element of a computer. The performance of a CPU is impacted by 3 things: cores (the more cores, the faster the data can be processed), clock speed (the faster theclock speed, the more CPU cycles that can be completed in a second) and cache size (the bigger the cache size, the quicker intructions can be sent to the control unit). The CPU is made up of two main componeets; the control unit and the arithmetic and logic unit. The control unit uses electrical signals to direct the system to carry out th instructions ij stored programs. The arithmetic and logic unit carries out all of the operations and comparisons.
The Fetch-Decode-Execute cycle is also known as the CPU cycle and s the process of the CPU collecting instructions from the storage (RAM, ROM, Cloud etc) and runs them so that the user can use that piece of software. The control unit sends an address bus to get data stored in the RAM (or other type of storage) to open a program requested by the user. Before the CU can execute the instructions, they first have to be decoded by the ALU. The ALU uses cache memory to decode the instructions into a language the CU can understand (e.g. binary). The decoded instructions are then sent back to the CU in a data bus. Lastly, the CU executes the instructions which are the displayed on the screen.
Programs for both installed software and the boot-up are saved in a form of storage component. RAM (Random Access Memory) stores all the current instructions that a piece of software requires to run and temporarily stores data processed by the CPU. RAM is temporary (volatile) memory as it can be cleared. It allows the computer to access any memory address at random and read or write to it. If the amount of RAM a computer has is increased then the computer's overall speed will increase but after a while the memory space will run out and the RAM must overwrite previous addresses. ROM (Read Only Memory) contains all the information required for the computr to boot-up. The contents of ROM are programmed by the manufacturer and cannot be re-written ( the memory is permament or non-volatile). The instructions saved in the ROM are always present even when the power is turned off. Virtual memory is located on the hard drive and is used as storage for program/software instructions that will not fit into the RAM. Cache memory is memory that is used to store instructions that are frequently used or ones that have been recently used. This is because it is quicker for the adress bus to access the cache memory so frequently used programs will be opened quicker.
John Von Neuman came up with the Von Neuman model in 1945. He designed a stored program computer where the programs and the data are stored in the memory. This is the design used in computers today. The components of the Von Neuman model are: a processing unti (CPU), a program counter, memory to store data and instructions (including boot-up instructions) and input and output mechanisms.
Secondary storage is non-volatile storage that can be internal or external to the computer and is an extra form of storage. There are three main types of secondary storage - optical, magnetic and solid state. Optical storage is when lasers are used to store data along a track running around an optical disc. The lasers etch pits into the track of the disc which then sorrospond to the data being saved there. Examples of optical storage are CDs, Blu-rays and DVDs. Advantages of optical storage are that it is cheap, portable and has a fast write speed however some disadvantages are that they are easy to scratch or break (which will cause the data to be unreadable or some data to be lost) and they sometimes have a relatively small storage capacity. Magnetic storage uses electromagnets to record data along circular tracks in segments of a disc and is often used to store back-ups. When the data is read from the disc, a magnetised arm moves across the disk so that it hovers above the segment where the data is stored. The part of the segment that contains the desired data then becomes magnetised to attract the arm so that the data can be read. Examples of magnetic storage include hard disc drive and magnetic tape. Advantages of magnetic storage are that it is able to store large amounts of data and it is easy to replace o upgrade however it is slow at reading/writing data, requires a lot of power and has moving parts that could get broken. Solid state memory uses charged transistors to save different documents to different transistors - if a transistor has no charge then it has something saved to it however if it has charge then a document can be saved there. Examples of solid state memory are USB flash drives and SD cards. Advantages of solid state memory are that it is cheap, portable and fast at reading/writing data however they can be easily broken and have less storage capacity compared to other storage components.
Cloud storage is off-site storage that is made available to users over a netwrok (usually the internet). Users can store and back-up documents on storage devices (usually hard disc drives) somewhere they can access over the internet but cannot physically see. Cloud storage is an example of virtualisation becauseit is a process that hides the true physical nature od a computing resource (you cannot see the storgae componenet but know it is there) and instead appears as an icon on the computer. Advantages of using cloud storage are that the data is still secure if something happens at the original site where the data is stored because it can be accessed over the internet, as long as there is an internet connection the data can be accessed, there is no need to buy an expensive storage device, many users can access the same documents and work collectively on a project even if they are in different places and the data can be synced beween devices. However, somed disadvantages are that there must be an internet connection, download and upload speeds can be impacted by the strength of the internet connection and so may take a long while, the hosting company could be hacked, the user has less control over their data and storing certain data online may break the Data Protection Act because it might be required to be kept confidential.
An embedded system is a computer system that is built into another device in order to control the other device better. They are sometimes known as "real tme systems because they produce an immediate response). Components in an embedded system are all on one printed circuit board (PCB - supports components that are soldered or fitted into sockets) and include a processor, memory component and input and output interfaces. Input devices are commonly manual switches and dials. Each embedded systme is built to control only a small range of specific tasks.
An operating system is a computer program that allows application software to work and a computer cannot function without one. Operating systems are in charge of a lot of things such as: deciding where data is stored; dealing with security (passwords etc); organising files and folders; managing data transfers between the CPU and the peripherals (e.g. printer, monitor etc) and dealing with the saving, deleting, opening and closing of files. There are four main componenets of the operating system and each componenet controls a different section.The kernal is the essential part of the computer operating system - it is the core that provides basic services for all other ports of the operating system. Device drivers are programs that each control a particular type of device attached to the computer. The user interface is a set of dials, knobs, operating system commands, graphical display formats and other devices provided by a computer of program to allow the user to communicate with the computer or the program. Finally, system utilities are a set of small programs that provide an addition to the capabilities provided by the computer e.g. "print utility" allows the computer t connect to a printer.
Scheduling and Paging
The operating system of a computer also makes it possible for several programs to be run at one time. Although only one program will be run by the CPU at a time, there are three states that a program can be in: running (when the program is being used), waiting (when the program is waiting to be used but is already open) and runnable (most recent programs used that are waiting to be opened). The job of working out when to swap processes and which program is in which state is called scheduling. Swapping between processes happens so fast so that it appears that all programs are running at the same time. When there are too many processes it can look as though some of them are not working (when the computer freezes). Paging is the process of moving information to the virtual memory from the RAM when the RAM gets too full and back to the RAM from the virtual memory when space is made.
Utility software is a collection of tools each of which does a specific job. Utility software helps to configure the system, analyse how it is woking and optimise it to improve its effiiciency. There are five type of utility software: encryption software (scrambles messages so a third party cannot read them), data compression software (reduces file sizes so they do not need to take up as much storage and are easier to transmt, upload and download), defragmentation software (puts pieces of data back together again after they have been separated in order to be stored and places the whole file in a storage space that is big enough to improve efficiency when finding the file), bsck-up tool (copies files to a second medium such as the cloud ) and malware and anti-malware software (security tools designed to combat viruses and hackers).
Simulation and modelling
Computer models are attempts to abstract the rules and mechanisms that control real-life systems and apply them in computer programs so that they can be used to simulate the behaviour of those systems under different conditions - this is commonly known as virtual realltiy. Computer models allow people to see what would happen in a real-life scenario and how things can be improved in real-life. There are lots of examples of computer modelling but here are four common examples: flight simulators allow pilots to train to fly passenger aircraft safely without the cost of using actual aeroplans and with the knowledge that if the pilot crashed nobody would be injured; weather forecasting models are used to simulate the atmosphere and changes that affect weather to help predivct the weather; traffic flow models are used to simulate traffic when new roads and motorways are being planned and financial modelling is used to investigate the impact of changing tax rates when budget changes are being investigated. Advantages of using computer models are that they have the ability to experiment without harming people of the environment (safer), they allow new products to be tested without having to build prototypes and are therefore more cost-effective, they allow tests to be repeated to see if the results are similar every time and adjustments to the rules and imput data can be made quickly to see the outcomes. However some disadvantages are that some mathematical calculations may be too complex to model real life situations, it may be difficult to identify all of the rules correctly, the model is not reality and so not all factors can be allowed for (reality does not always plan out as the model says it will) and the power needed to run the model may be more than is available.
There are two levels of computer language - high level langauges and low level languages. Instructions for a computer are written in a programming language and need to be translated out of this into machine code for the computer to understand them.Machine code is a low level language that is written in binary as te CPU can only understand instructions written in binary, therefore all instructions have to be converted to binary before they can be executed. Assembly language is another example of a low level language where each instruction is easier to understand than machine code as it uses mneumonics instead of binary however nowadays almost no programs are written in assembly language. If assembly language is used it it used in the programs used by embedded systems or to write device drivers although machine code can also be used when working with device drivers. High level languages are programming languages that ressemble human language - they address the programming logic rather than dealing with hardware issues. Most programs today are wtitten in high level languages such as Java or Python because it is less time consuming, easier to understand and quicker to test. High level langauge programs can be run on different types of CPU ans so they can be trasnferred from one device to the other, unlike low-level languages.
Compilers and Interpreters
Both compilers and interpreters are translators that convert programs however compilers translate the whole program at once and interpreters translates and runs the program one line at a time. Compilers converts high level language to machine code and saves the output as a machine code progra, (usually with the file extension .exe). Interpreters translate the source code one line at a time and runs the program there and then but does not save a machine code version of the program. Interpreters find errors when they happen and can often tell you what has gone wrong however when they are used programs tend to run slower becaue it takes longer for the interpreter to translate the source code while the program is running and if mor than one device was to run the program then every device would need the interpreter software installed. When compilers are used it can be easier to protest your code from being altered or copied becaude people will only be given the machine code copy whoch is hard to understand and this code will be able to run similarly on any computer however the compiler cannot translate and produce a machine code copy if not all of the program is correct and so will usually initially report a lot of errors but not tell you wher they are making it hard to de-bug your code.