OCR computer science paper 1

studied byStudied by 3 people
0.0(0)
Get a hint
Hint

what is the function of the Arithmetic Logic Unit (ALU) ?

1 / 523

flashcard set

Earn XP

Description and Tags

topics 1.1.1 to 1.5.2

524 Terms

1

what is the function of the Arithmetic Logic Unit (ALU) ?

  • completes all arithmetic and logic functions

  • results are often stored in general-purpose registers (e.g. the ACC)

New cards
2

give three examples of operations the ALU performs.

  • arithmetic operations on fixed/floating point numbers (e.g. ADD, SUBTRACT, MULTIPLY or DIVIDE)

  • bitwise shift operations

  • boolean logic operations (e.g. comparisons, AND, OR, NOT or XOR)

New cards
3

what is the function of the Control Unit (CU) ?

  • coordinates all activities of the CPU

  • accepts and decodes instructions

  • sends memory read/write requests to RAM along the control bus

  • sends control signals

    • e.g bus requests/grants, or interrupt requests

  • makes extensive use of the status registers and clock

  • communicates with all elements of the CPU

New cards
4

define a register.

registers are small memory cells that operate at a very high speed, they are used to temporarily store data

New cards
5

what is the function of the Program Counter (PC) ?

  • holds the address of the next instruction to be executed

  • this could be:

    • the next instruction in a sequence

    • an address to jump to, if the previous instruction was to branch (copied from the CIR)

  • at the start of every FDE cycle, the instruction in the PC is copied to the MAR

New cards
6

what is the function of the Memory Data Register (MDR) ?

  • used to temporarily store data/instructions that are to be written to memory, or have been read from memory

  • contents of MDR are copied to the CIR (if MDR contains an instruction)

  • acts as a buffer

New cards
7

what is the function of the Memory Address Register (MAR) ?

  • holds the address of a memory location from which data or an instruction is to be fetched, or which data is to be written to

  • sends this address to memory down the address bus

New cards
8

where does the address in the MAR come from?

  • it is either the address of an instruction sent from PC

  • or the address of data sent from CIR

New cards
9

what is the function of the accumulator (ACC) ?

  • data and control information often stored here

  • stores the results of operations performed in the ALU

New cards
10

describe two ways the accumulator is used.

  • temporary storage for data being processed during calculations

  • I/O in processor, used as a buffer

New cards
11

what is the function of the Current Instruction Register (CIR) ?

  • holds the current instruction being executed

  • contents of MDR are copied to the CIR (if MDR contains an instruction)

  • contains the opcode and operand(s) of the instruction

New cards
12

what is a bus?

buses are a set of parallel wires which connect two or more components inside the CPU

New cards
13

what does the ‘width‘ of a bus represent?

  • the width of the bus is the number of parallel wires the bus has:

    • the width of the bus is directly proportional to the number of bits that can be transferred simultaneously at any given time

    • buses are typically 8, 16, 32 or 64 wires wide

New cards
14

what is the function of the data bus?

a bi-directional bus that transports data and instructions (in binary) between components

New cards
15

what is the function of the address bus?

transmits memory addresses to RAM, specifying where data or instructions are to be sent to/retrieved from

New cards
16

what is the function of the control bus?

  • transmits control signals between internal/external components

  • coordinates the use of the address and data buses

  • provides status information between system components

New cards
17

what is a bus request?

a control signal that shows that a device is requesting the use of the data bus

New cards
18

what is a bus grant?

a control signal that shows that the CPU has granted access to the data bus

New cards
19

what is a memory write request?

a control signal that requests that data is written into the addressed location using the data bus

New cards
20

what is a memory read request?

a control signal that requests that data is read from a specific location to be placed onto the data bus

New cards
21

what is an interrupt request?

a control signal that shows that a device is requesting access to the CPU

New cards
22

what is the Fetch Decode Execute cycle?

the cycle that a CPU follows to process and execute a instruction

New cards
23

what occurs during the fetch stage?

  • address of the next instruction is copied from PC to MAR

  • contents of MAR are sent along the address bus to memory, where it waits to receive a signal from the control bus

  • the data/instruction held in the corresponding memory address is copied to MDR by the data bus

  • if MDR holds an instruction, its contents are copied to CIR

  • PC is incremented by 1

New cards
24

what occurs during the decode stage?

  • the instruction in CIR is split into opcode and operand

  • the instruction is decoded in the decode unit

New cards
25

what occurs during the execute stage?

  • the instruction is executed, for example…

    • performing arithmetic operations in the ALU

    • storing the contents of the accumulator in a memory address in RAM

New cards
26

what is clock-speed?

  • clock speed is the number of clock cycles completed per second

  • clock speed is determined by the system clock (an electronic device which generates signals, switching periodically between 0 and 1)

New cards
27

how does the clock regulate CPU operations?

all processor activities begin on a clock pulse, and each CPU operation starts as the clock changes from 0 to 1

New cards
28

how is clock-speed measured?

  • measured in GigaHertz (GHz)

  • one GHz is one billion instructions fetched per second

New cards
29

what is a core?

an independent processor that is able to run its own FDE cycle

New cards
30

give a reason why a multi-core processor may run faster than a single-core processor.

computers with multiple cores can execute multiple instructions/FDE cycles at the same time

New cards
31

give a reason why a multi-core processor may not run faster than a single-core processor.

  • some instructions may not be able to be run in parallel

  • an instruction may be dependent/waiting for other instructions to be completed

  • other factors influence processing speed (e.g. clock speed/ cache/bottlenecks)

  • a program/OS needs to be written to specifically use multiple cores

New cards
32

what is cache memory?

  • cache memory is located on or near the CPU

  • much faster to access than RAM

  • instructions fetched from main memory are copied to the cache, so if required again, they can be accessed quicker

  • as cache fills up, unused instructions are replaced

New cards
33

what is pipelining?

  • pipelining is the process of completing the FDE cycles of separate instructions simultaneously and holding appropriate data in a buffer in close proximity to the CPU until it’s required

  • it aims to reduce the amount of the CPU which is kept idle

  • it is separated into instruction pipelining and arithmetic pipelining

New cards
34

what is instruction pipelining?

separating out the instruction into fetching, decoding, and executing

New cards
35

what is arithmetic pipelining?

breaking down the arithmetic operations and overlapping them as they are performed

New cards
36

why can pipelining sometimes become inefficient?

  • pipelining is inefficient when programs contain lots of branching

  • as each time a program branches the processor will have to ‘flush the pipe’ and remove any instructions that would have been performed had the program not branched

New cards
37

describe harvard processor architecture.

  • instructions and data stored in separate memory units

  • each has its own bus

  • reading/writing data can be done at the same time as fetching an instruction

  • used in RISC processors

New cards
38

describe von neumann processor architecture?

  • shared memory space for data and instructions

  • built on the ‘stored program’ concept

  • instructions and data stored in the same format

  • a single control unit follows a linear FDE cycle

  • one instruction at a time

New cards
39

what are the advantages of von neumann architecture?

  • cheaper to develop, control unit is easier to design

  • programs can be optimised in size

New cards
40

what are the advantages of harvard architecture?

  • quicker execution as data and instructions can be fetched in parallel

  • memories can be different sizes, makes efficient use of space

New cards
41

what is CISC?

  • Complex Instruction Set Computing

  • a computer architecture that uses a large number of complex instructions with variable lengths

  • these instructions may require multiple machine/clock cycles to execute

New cards
42

what devices use CISC architecture?

used in laptops and desktop computers

New cards
43

why is CISC architecture more expensive that RISC?

  • requires larger and more complex circuitry

  • this requires more silicone to produce

  • therefore it is more expensive

New cards
44

what are some benefits of CISC architecture?

  • compiler has to do less work

  • small code sizes and higher cycles per second

  • makes more efficient use of RAM

  • multiple addressing modes available

New cards
45

what are some drawbacks of CISC architecture?

  • greater energy consumption

  • more expensive

  • can't support pipelining

New cards
46

what is RISC?

  • Reduced Instruction Set Computing

  • a computer architecture that uses a smaller number of simple, standardised instructions of a fixed length

  • single machine cycle per instruction

New cards
47

what devices use RISC architecture?

used in smartphones and embedded systems

New cards
48

what are some benefits of RISC architecture?

  • smaller and less complex circuitry so typically cheaper to produce

  • lower energy requirements

  • can support pipelining

New cards
49

what are some drawbacks of RISC architecture?

  • compiler has to do more work

  • larger code sizes, lower cycles per second

  • heavier use of RAM

    • risks bottlenecks if RAM is limited

  • fewer addressing modes available

New cards
50

what is a Graphics Processing Unit (GPU) ?

  • a type of co-processor which has lots of independent processors (stream processors) which work in parallel

  • this makes it very efficient at completing repetitive tasks such as image processing and machine learning

  • highly specialised

  • SIMD structure

New cards
51

what is a multi-core processor?

  • a single chip with multiple independent cores

  • these can process instructions separately

  • this results in higher performance

New cards
52

what is parallel processing?

the process of dividing instructions between multiple processors or processor cores, to be executed simultaneously

New cards
53

give an example of an input device

  • keyboards

  • webcams

  • magnetic stripe readers

  • barcode readers

New cards
54

give an example of an output device

  • speakers

  • printers

  • projectors

New cards
55

what factors affect the performance of an input or output device?

  • speed

  • accuracy

  • cost

  • relevance to task

New cards
56

how is data represented through optical storage?

  • read from and written to using lasers

  • binary information represented by portions of the disc which either reflect or scatter the incident laser light

    • a pit scatters light and represents a 0

    • a land reflects light and represents a 1

  • pits and lands are written in spiral tracks on the disc’s surface

New cards
57

what is a CD and what does it commonly store?

  • Compact Disc

  • use optical technology to store small quantities of information

  • most commonly used for audio files

  • can also be used to store text and digital images

New cards
58

what are the benefits of using a CD for storing data?

  • small, thin and light so very portable

New cards
59

what are the drawbacks of using a CD for storing data?

  • easily damaged by scratches

  • limited storage capacity

  • relatively slow transfer speeds

New cards
60

what is a DVD and what does it commonly store?

  • use optical technology to store information

  • has higher storage capacity than CDs

  • suited to storing digital videos

New cards
61

what is a Blu-Ray disc and what does it commonly store?

  • use optical technology to store information

  • more than five times as much storage than traditional DVDs

  • useful for storing high-resolution films

New cards
62

how is data represented through magnetic storage?

binary information is represent using two magnetic states: polarised and unpolarised

New cards
63

how is data stored on a Hard Disc Drive (HDD) ?

  • data is stored on magnetic platters

  • the HDD rotates these magnetic platters at high speeds under a read/write head on an actuating arm

  • most will have multiple platters stacked to maximise storage capacity

New cards
64

what are the benefits of using a HDD for storing data?

  • typically have high capacities of between 500GB and 5TB

  • cheapest (per GB) type of secondary storage

New cards
65

what are the drawbacks of using a HDD for storing data?

  • have somewhat slow data transfer speeds

  • many moving parts introduces tendency to be damaged by movement

New cards
66

what is magnetic tape?

  • popular storage medium through to the 1980s

  • long stretches of (magnetic) tape wound onto reels passed through readers

  • a space consuming way to store data

New cards
67

what is a floppy disc?

  • a thin magnetic disk enclosed in plastic to protect the disk from dust and dirt

  • thin size and low weight made them extremely portable

  • typical storage capacity of 1MB

New cards
68

how is data represented through flash storage?

  • logic gates used to store electrical charge in one of two states: high or low

  • silicon semiconductors form the logic gates NAND and NOR

    • NOR gate is used for storing small quantities of data

    • NAND is the preferred technology for larger files

  • information stored in blocks, combined to form pages

  • can be erased and reprogrammed electronically

New cards
69

what are the benefits of using an SSD for storing data?

  • extremely light and portable

  • no moving parts, so much more resistant to damage from movement than HDDs

  • renowned for high data transfer rates

New cards
70

what are the drawbacks of using an SSD for storing data?

  • primary drawback is cost

  • another drawback is limited lifespan:

    • when a page is written to, the voltage required increases..

    • over time, this will become too high

New cards
71

what is Random Access Memory (RAM)?

a fast, volatile main memory that stores data and instructions for programs that the computer is currently running

  • having more RAM speeds up the computer’s execution

  • higher access speeds than even flash memory

  • more expensive per gigabyte than secondary storage devices

  • computers often have only 4 - 8 GB of RAM

New cards
72

what is Read Only Memory (ROM)?

  • a non-volatile memory used for storing fixed sequences of instructions like a computer’s startup (bootstrap) routine

  • once programmed, the state of the memory cells inside does not change

New cards
73

what is virtual storage?

  • name given to storing information remotely so that it can be accessed by any computer with access to the same system (e.g. over the Internet)

  • often an abstraction of multiple drives acting like one

New cards
74

give an example of a virtual storage system?

  • cloud storage services

  • networked storage used in offices and schools

New cards
75

give a benefit to using virtual storage.

  • the data from multiple machines can be backed up at the same time

  • can be accessed from elsewhere/on other machines

  • storage can be expanded as necessary (no limit on size)

  • no on site maintenance required/allows more local storage capacity for data

New cards
76

give a drawback to using virtual storage.

  • limited by user’s network speed

  • high costs

  • unclear who is in possession of data

New cards
77

what is an operating system?

  • a collection of programs that work together to provide an interface between the user and computer

  • it enables the user to communicate with the computer and perform certain low-level tasks involving the management of computer memory and resources

New cards
78

name three features of an operating system.

  • memory management (paging, segmentation, virtual memory)

  • resource management (scheduling)

  • file management (moving, editing, deleting files and folders)

  • input/output management (device drivers)

  • interrupt management

  • utility software (disk defragmenter, backup, formatting etc.)

  • security (firewall)

  • user interface

New cards
79

why do computers need memory management?

  • RAM is often not large enough to store all of the programs being used

  • if RAM is unavailable or full, applications cannot be loaded

  • memory management is used by the OS to ensure RAM is shared effectively by programs

  • it removes data not needed anymore, frees up space and allocates memory to applications (through the use of paging, segmentation and virtual memory)

New cards
80

what is paging?

  • a memory management process where memory is split up into equal-sized sections known as pages

  • pages are physical divisions

  • programs are split to fit a given number of pages

  • pages are swapped between RAM and the hard disk as needed

New cards
81

what is segmentation?

  • a memory management process where memory is split up into logical divisions, called segments

  • segments are complete sections of a program such as if statements or loops

  • segments vary in size

  • segments represent the structure and logical flow of the program

New cards
82

name 3 differences between paging and segmentation.

  • pages is physical divisions, segments are logical divisions

  • pages are fixed size, segments can vary in size

  • paging causes internal fragmentation , segmentation causes external fragmentation

  • a page table is used to map page location which is slower than a segmentation table

  • its easier for the OS to manage page locations as they can be stored non-contiguously, segments can be non-contiguous but work better contiguously

  • paging can be more effective because any free memory space can be used to swap data in and out, with segments lots of space will sit unused until a segment the right size is available

New cards
83

what is virtual memory?

  • a process where a section of the hard drive acts as RAM when the space in main memory is insufficient to store programs being used

  • sections of programs not currently being used are temporarily moved into virtual memory through paging

  • this frees up memory for other programs in RAM

  • RAM is much more expensive than secondary storage (per GB) so virtual memory is useful rather than having to buy more RAM

*note, the exam will not accept VRAM in place of virtual memory

New cards
84

what are the drawbacks of using virtual memory?

  • slower to access than RAM as pages have to be swapped back to RAM to be accessed

  • can cause slow down or even disk thrashing, when the computer ‘freezes’ due to pages being swapped too frequently between the hard disk and main memory

New cards
85

what is an interrupt?

  • a signal generated by software or hardware to indicate to the processor that a process needs attention

  • interrupts have different priorities and this is considered when allocating processor time

  • stored within an abstract data structure called a priority queue in an interrupt register

New cards
86

describe the process of a processor checking for interrupts.

  • processor checks the interrupt register at the end of each FDE cycle

  • if there is an interrupt exists with a higher priority to the current process

    • the current contents of the registers in the CPU are transferred into a stack.

    • the relevant interrupt service routine (ISR) is loaded into RAM.

    • a flag is set to signal the ISR has begun

    • the flag is reset once the ISR has finished.

    • this process is repeated

  • if there are no interrupts with a higher priority to the current process

    • the contents of the stack are popped back into the registers

    • FDE cycle resumes

New cards
87

why do operating systems use scheduling?

to ensure all sections of programs being run (jobs) receive a fair amount of processing time

New cards
88

what are the two types of scheduling algorithm?

  1. pre-emptive: jobs are actively made to start and stop by the operating system

  2. non pre-emptive: once a job is started, it is left alone until it is completed

New cards
89

describe the round robin algorithm.

  • pre-emptive scheduling algorithm

  • each job is given a section of processor time (a time slice) within which it runs

  • once each job in the queue has used its first time slice, they are given another slice of processor time until a job has been completed

  • completed jobs are removed from the queue

New cards
90

what are the benefits/drawbacks of using the round robin algorithm?

  • all jobs will eventually be attended to

  • longer jobs will take a much longer time for completion

  • does not take into account job priority or urgency

New cards
91

describe the first come first served algorithm.

  • non pre-emptive scheduling algorithm

  • jobs are processed in chronological order by which they entered the queue

New cards
92

what are the benefits/drawbacks of using the first come first served algorithm?

  • straightforward to implement

  • does not take into account job priority or urgency

New cards
93

describe the multi-level feedback queue algorithm.

  • pre-emptive scheduling algorithm

  • makes use of multiple queues, each which is ordered based on a different priority

New cards
94

what are the benefits/drawbacks of using the multilevel feedback queue algorithm?

  • takes into consideration different job priorities

  • difficult to implement

New cards
95

describe the shortest job first algorithm.

  • non pre-emptive scheduling algorithm

  • the queue storing jobs to be processed is ordered according to the time required for completion

  • the longest jobs are serviced at the end

New cards
96

what are the benefits/drawbacks of using the shortest job first algorithm?

  • suited to batch systems, as waiting time is reduced

  • requires processor to calculate how long each job will take

  • risk of processor starvation if short jobs are continuously added to the queue

  • does not take into account job priority or urgency

New cards
97

describe the shortest time remaining algorithm.

  • pre-emptive scheduling algorithm

  • the queue storing jobs to be processed is ordered according to the time left for completion

  • the jobs with the least time to completion are serviced first

New cards
98

what are the benefits/drawbacks of using the shortest time remaining algorithm?

  • throughput is increased as shorter processes can be quickly completed

  • does not take into account job priority or urgency

  • processor starvation if short jobs are continuously added to the queue

New cards
99

what is a distributed operating system?

  • run across multiple devices

  • means the load of a task is spread across multiple computers

*note, the exam will not accept processors instead of computers

New cards
100

what is an embedded operating system?

  • built to perform a small range of specific tasks

  • catered towards a specific device e.g. a household appliance

  • limited functionality and is read-only (so it cannot be updated)

  • consumes less power than other types of OS

New cards

Explore top notes

note Note
studied byStudied by 60 people
... ago
5.0(1)
note Note
studied byStudied by 47 people
... ago
5.0(1)
note Note
studied byStudied by 9 people
... ago
5.0(1)
note Note
studied byStudied by 14 people
... ago
5.0(2)
note Note
studied byStudied by 9 people
... ago
5.0(1)
note Note
studied byStudied by 7 people
... ago
5.0(5)
note Note
studied byStudied by 25 people
... ago
5.0(1)
note Note
studied byStudied by 10069 people
... ago
4.7(58)

Explore top flashcards

flashcards Flashcard (100)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (24)
studied byStudied by 23 people
... ago
5.0(1)
flashcards Flashcard (26)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (34)
studied byStudied by 4 people
... ago
5.0(2)
flashcards Flashcard (20)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (63)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (64)
studied byStudied by 6 people
... ago
5.0(1)
flashcards Flashcard (27)
studied byStudied by 1 person
... ago
5.0(1)
robot