Docsity

Computer Architecture: Von Neumann Architecture, CPU, Memory, and Storage, Exams of Nursing

Toggle sidebar
bg1
CHN Ch. 1 actual solution
EDEXCEL GCSE COMPUTER SCIENCE
TOPIC 3 ACTUAL SOLUTION
Stored program concept
von Neumann wanted to make a computer that was easy and quick to reprogram so that it can carry out
a variety of tasks
Computer architecture
Refers to the structure of a computer system - the hardware components it has and how they work
together to execute programs
von Neumann architecture - CPU
A processing unit to decode and execute program instructions fetched from memory one at a time
von Neumann architecture - main memory
A memory unit into which program instructions and data are loaded prior to being processed
von Neumann architecture - input and output
Input and output mechanisms to input programs and data and output the results of processing
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Computer Architecture: Von Neumann Architecture, CPU, Memory, and Storage and more Exams Nursing in PDF only on Docsity!

EDEXCEL GCSE COMPUTER SCIENCE

TOPIC 3 ACTUAL SOLUTION

Stored program concept von Neumann wanted to make a computer that was easy and quick to reprogram so that it can carry out a variety of tasks Computer architecture Refers to the structure of a computer system - the hardware components it has and how they work together to execute programs von Neumann architecture - CPU A processing unit to decode and execute program instructions fetched from memory one at a time von Neumann architecture - main memory A memory unit into which program instructions and data are loaded prior to being processed von Neumann architecture - input and output Input and output mechanisms to input programs and data and output the results of processing

Key facts about main memory

  1. It is short-term, working memory. It only holds the program instructions and data that the CPU is currently using. The contents of main memory are continually changing
  2. It consists of a collection of storage locations, each with its own unique address. A storage location can hold a program instruction or an item of data
  3. It is often referred to as RAM - short for random access memory - because storage locations can be read from and written to in any order
  4. It is classed as primary storage because the CPU has fast, direct, access to it.
  5. It is volatile. It needs power to retain its contents. When the computer is switched off, its main memory is completely wiped.
  6. Modern laptops, tablets, and phones typically have between 4 and 32 GiB of RAM. This enables them to store several programs in memory at the same time Central processing unit The CPU is the hardware component that decodes and executes program instructions. The components of the CPU include the clock, the buses, memory, the registers, and the ALU Control unit Fetches program instructions from main memory one at a time, decodes them and directs the operations of the other parts of the system to execute them Registers Direct access storage for instructions, intermediate results and data within the CPU. Some registers are general purpose, others such as the program counter and the instructions register have specific functions. Arithmetic logic unit
  1. The content of the specified memory location is transferred along the data bus to the CPU. On arrival, its stored in one of the CPUs registers DECODE The CU looks up the instruction in the CPUs instruction set. Every CPU has its own unique instruction set
  • a list of all the operations it can carry out EXECUTE The CU coordinates the actions of the other components of the CPU to carry out the operation. If an arithmetic or logic operation is required, the control unit signals the ALU to carry it out. Once a cycle is complete, the next one starts Secondary storage Provides long-term storage for programs and data
  • Non-volatile. Its content is retained even when the power is switched off.
  • Programs and data must be transferred to memory in order for them to be accessed by the CPU
  • Large storage capacity ( a magnetic hard drive can store up to 4 TiB of data). Can be expanded using external devices, such as portable hard drives and USB memory sticks Primary storage
  • Volatile and power dependent. Its contents are lost when the power is switched off
  • Short-term
  • It is directly accessed by the CPU
  • Limited storage capacity (between 500 MiB and 8 GiB) and only limited scope for expansion How primary and secondary storage work together
  1. When a user opens an application, it is loaded into main memory from secondary storage
  2. Any data files that are opened for use in that application are also loaded into main memory
  3. When the user saves a file, it is transferred from main memory into secondary storage
  4. When the application is closed, it is removed from main memory 3 types of secondary storage

Magnetic, optical, solid state Magnetic storage EXAMPLES = hard disk drives & magnetic tape drives (used in int/ext hard drives, tape drives) A HDD contains a stack of circular, metal platters that spin at high speed. Both surfaces of each platter are coated with a substance that can be magnetised.Each platter has its own read-write head. TO WRITE DATA: An electromagnet in the read-write head magnetises the surface of the platter to one of two polarities : north-south or south-north. These represent 1 or 0 respectively. Data is stored on a series of concentric tracks, subdivided into sectors TO READ DATA: The read-write head detects the magnetic state of the platter ADVANTAGES:

  • high capacity
  • fast data access DISADVANTAGES:
  • has moving parts that will eventually fail
  • noisy Optical storage Optical storage devices, such as CD and DVD drives, use patterns of light to store data on removable disks TO WRITE DATA: A laser is used to burn the surface of the disk, changing its form to become more reflective or less reflective. Reflective areas are called lands; less reflective areas are called pits. A land represents 1 and a pit 0. Data is stored as a series of lands and pits on a single track that spirals out from the centre of the disk TO READ DATA: A laser beam is shone onto the surface of the disk. A pit reflects light more dimly than a land. The amount of light reflected off the surface is detected by a light sensor and translated into 1s and 0s

An embedded system is a small computer on a chip, that performs a dedicated task within a bigger system. Most embedded systems work in real-time - they must respond immediately to an external event or request Features of embedded systems

  • single purpose, designed for a specific task
  • customised hardware and software
  • limited memory and processing power
  • low power consumption
  • wireless connectivity
  • minimal or no user interface
  • small physical size
  • responsive to their environment
  • low maintenance
  • usually operate in real time Hardware components of an embedded system battery = long life battery to power the system sensors = sensors and other input devices to supply information from the outside world microcontroller = a low powered microcontroller that contains the CPU, memory and input/output actuators = to convert the output commands into mechanical actions firmware = the program that tells the device what to do. once installed on the device, firmware does not need to be modified Examples of devices that use embedded systems
  • A washing machine that regulates water usage according to the size of its load
  • A drinks dispenser that sends a reorder request to the supplier when the stock is running low
  • A burglar alarm that sends a message to the homeowners phone if it detects an intruder Operating System (OS) The program that acts as an interface between the hardware and other software in a computer system, enabling them to communicate with each other. It also provides a way for users to interact with the computer. (page 40 textbook theres a diagram that must be remembered) Main tasks performed by an OS
  • Process management
  • File management
  • User management
  • Peripheral management Process management Overseeing the execution of programs by the CPU and allocating each of them a share of main memory and CPU time When a program is opened, it is copied from secondary storage into main memory so that it can be executed by the CPU. While they are stored in memory, programs are referred to as processes. Modern computers are multitasking - they ca execute several processes simultaneously Since the CPU can only execute one instruction at a time, it is up to the OS to ensure that every process loaded into main memory gets a share of CPU time. The OS uses a scheduling algorithm to do this Memory management When a process is loaded into main memory from secondary storage, the OS allocates it a block of addresses called pages Occasionally, a computers memory may become full. When this happens, the OS frees up space by temporarily moving inactive processes out of main memory into an area of the hard drive designated as virtual memory. It uses a paging algorithm to determine which processes to swap out. Processes are swapped back in again when it is their turn to use the CPU File Management

How it works : scans the damaged file, extracts as much data from it as possible and stores it in a new, usable file Disk defragmentation software Purpose : to speed up access to files stored on a magnetic hard drive (Solid-state drives get just as fragmented as magnetic hard drives but because they have no moving parts, it doesn't affect the data access speed) How it works : It rearranges individual file blocks for each file so that they are stored in contiguous (adjoining) blocks on the disk Why fragmentation occurs When a file is saved to the hard drive, it gets split up into blocks. Ideally, all blocks belonging to one file are saved in adjoining sectors on the disk. As files are changed, blocks have to be saved wherever there is free space. Fragmentation slows down read operations, because more disk accesses are needed to retrieve all the blocks of a single file Backup software Purpose : to keep a copy of files so that if a file gets lost or damaged, the most recent backup can be restored How it works : Backup copies of files are made at regular intervals and stored on a separate device in a different location to the live working environment - possibly in the cloud Anti-malware software Purpose : To protect computer systems from damage caused by malware, such as viruses, worms, and spyware How it works : Some types of anti-malware software use a database of malware signatures (the patterns associated with a known piece of malware). If the anti-malware detects a file that has a pattern that matches a known signature, it deletes or quarantines it Some use heuristic analysis to detect suspicious behaviour Robust software Code that can handle unexpected actions without crashing or producing incorrect output and is free from vulnerabilities that could be exploited by criminals.

Things programmers can do to make their programs robust

  • adhere to good programming practices
  • carry out regular code reviews
  • keep an audit trail Code vulnerabilities A program may have hidden weaknesses that could pose a security threat. Criminals can exploit such code vulnerabilities to cause damage or gain access to sensitive information. Code reviews Purpose : to check that software adheres to agreed standards AND to find any instances of inefficient code AND to identify potential vulnerabilities. Reviews are carried out by other programmers or specialised software that checks the code to make sure it meets a pre-defined set of rules. Can detect bugs and security issues and may suggest ways to fix them Audit trails Helps improve accountability by keeping track of who made what changes and when during the development process Low-level languages EXAMPLES : machine code and assembly language A programmer must have detailed knowledge of a computer's architecture in order to write a program in a low-level language. weaknesses:
  • are difficult and time consuming to use
  • have few tools to help with maintenance and debugging
  • are machine-specific, programs written in low-level languages will not run on a computer with a different type of CPU strength:
  • interact directly with the hardware, enabling memory to be used efficiently High-level languages

strengths:

  • when an error is found, the interpreter reports it, stops and pinpoints the error so that the programmer knows where it has occurred
  • the code is not platform specific and can be run on different operating systems as long as there is an interpreter
  • the program can be easily edited as it always exists as source code weaknesses:
  • every line has to be translated each time it is executed, and therefore is slower to run Assemblers Assemblers translate the mnemonics of assembly language into machine code instructions Assembly language is very similar to machine code. There is one assembly language instruction for each machine-code instruction