OCR Computer Science Paper 1

0.0(0)
studied byStudied by 8 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/156

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

157 Terms

1
New cards
PC
Program counter, contains the address of the next instruction
2
New cards
CIR
Current Instruction Register: stores the address of the next instruction currently being executed and decoded
3
New cards
MAR
Memory Address Register, holds relevant memory address (to read from or write to)
4
New cards
MDR
Memory Data Register, stores data being transferred to and from memory, acts as a buffer
5
New cards
ALU
Arithmetic and Logic Unit, does all mathematical calculations and makes all logical decisions
6
New cards
Accumulator
A storage register in the ALU that holds data temporarily while the data is processed and before it is transferred to memory.
7
New cards
RISC
Reduced Instruction Set Computer: Only simple instructions taking one clock cycle are executed - currently more widely used than CISC
Advantages: allows for pipelining, execution will be quicker or as fast as CISC
Disadvantages: Compiler has to do more work, more RAM required
8
New cards
CISC
Complex Instruction Set Computer: Large instruction set is used to minimise lines of code required - mainly used for microcontrollers and embedded systems
Advantages: compiler has very little work to do, not much RAM required
Disadvantages: Building in specialised instructions can be inefficient when only ~20% get used per program
9
New cards
GPU
Graphics Processing Unit - dedicated graphics processor on a graphics card, used to render images stored in the RAM of the graphics card.
10
New cards
Multi-core CPU
A CPU with more than one core on the same chip - makes use of parallel processing for optimum efficiency
11
New cards
What affects processor performance?
- The number of processor cores: more cores -\> better performance
- The processor's clock speed: faster clock speed -\> better performance
- Amount/type of cache memory: more/better cache memory -\> better performance
12
New cards
RAM
Random Access Memory - stores programs and data currently in use. Volatile
13
New cards
ROM
Read Only Memory - holds information which must be permanently in memory eg. BIOS
14
New cards
What are the functions of an operating system?
- Providing a user interface
- Memory management
- Interrupt service routines
- Processor scheduling
- Backing store management
- Input and output management
15
New cards
What are the types of memory management?
Paging: Available memory is divided into fixed size pages, process in memory can be held in non-contiguous pages, mapped to logical addresses by a page table
Segmentation: Divides address space logically into segments of varying length
16
New cards
What is virtual memory?
A technique that uses a portion of the computer's hard disk as an extension of RAM - swaps files in and out of RAM by a process called disk thrashing
17
New cards
What is a distributed operating system?
Form of parallel processing system which splits tasks over multiple computers - OS coordinates so that the system appears to the user as a single system
18
New cards
What is a multitasking operating system?
An OS which allows each user to run more than one job at a time.
19
New cards
What is a multi-user operating system?
Allows multiple users to use a computer system by allocating each one a slice of processor time - uses a scheduling algorithm
20
New cards
What does a mobile operating system comprise of?
Mobile OSes are made up of two separate operating systems:
A main system operating the user interface/application software
A low-level real-time operating system which is hardware-specific
21
New cards
What is an embedded operating system?
An OS on a chip instead of on a hard drive, designed to do simple things adapted for specific hardware/functions
22
New cards
What is a real-time operating system
Processes data as it comes in - in real time
23
New cards
Open Source Software
Program code made publicly available for free; it can be copied, distributed, or changed without the stringent copyright protections of proprietary software products.
24
New cards
Closed Source Software
Also know as proprietary software, computer software licensed under exclusive legal right of the copyright holder with the intent that the licensee is given the right to use the software only under certain conditions, and restricted from other uses, such as modification, sharing, studying, redistribution, or reverse engineering.
25
New cards
Utility program
A small program that performs many of the general housekeeping tasks for the computer, such as system maintenance and file compression - Disk defragmentation, automatic backup/updating, virus checking, compression software
26
New cards
Scheduling Algorithms
- Round robin
- Shortest remaining time
- Shortest job first
- First come, first served
- Multi-level feedback queues
27
New cards
Shortest remaining time
A scheduling algorithm that deals with each user or task based on a calculating an estimated time remaining to complete.
28
New cards
Shortest job first
A scheduling algorithm that deals with each user or task based on the getting the smaller ones out of the way.
29
New cards
Multi-level feedback queues
This algorithm is designed to give preference to short jobs, give preference to input/output bound processes and separate processes into categories based on their need for the processor.
30
New cards
Round Robin
Processes are dispatched on a first in first out (FIFO)
basis, with each process in turn being given a limited amount of CPU time, called a time slice.
31
New cards
First come first served
Processes are carried out by the CPU in the order in which they arrive
32
New cards
BIOS
Basic input/output system contains programs to load the hardware, stored in ROM
33
New cards
Device drivers
Utility software used by the operating system to communicate with peripheral devices.
34
New cards
Virtual machines
A software implementation of a computer system, allowing one physical computer to run several "virtual computers", each with their own independent operating system and application software.
35
New cards
Low-level language
A programming language that is designed to be easy for a computer to execute; also called machine language or assembly language.
36
New cards
High-level language
A programming language like Python that is designed to be easy for humans to read and write.
37
New cards
Interpreter
Converts a program written in a higher level language into a lower level language and executes it, one line at a time
38
New cards
Compiler
Translates a high-level source program into machine instructions readable by a processor and saves it to disk. The program executes when run.
39
New cards
Assembler
Translates an assembly-language program into machine code
40
New cards
Stages of compilation
lexical analysis - syntax analysis - code generation - optimisation
41
New cards
Lexical analysis
Comments and whitespace are removed
Variables, and subroutines stored in symbol table
Which also holds data such as scope and data type
Code is converted to a series of tokens
42
New cards
Syntax analysis
The code is checked to ensure it follows the rules of the language. Where it breaks the rules of the language errors are generated.
If no rules are broken then it's passed on to the next stage
43
New cards
Code generation and optimisation
Here the object code (accept machine code) is created.
(i.e. the binary that is executed by the processor)
This code may be inefficient: may contain unnecessary instructions or groups of instructions that can
be replaced by simpler ones (point of optimisation)
44
New cards
Linker
Combines together a number of separate object code files.
45
New cards
Loader
Loads an executable program into main memory
46
New cards
Library programs
A collection of compiled routines that other programs can use
47
New cards
Waterfall lifecycle
Sequential stages, each stage must be completed for the next to follow - suitable for small projects requiring supervision, drawback that no user involved
48
New cards
Spiral model
Uses structured steps but develops a program iteratively, constantly improving upon a prototype, allows for productive user input as they can comment on a prototype
49
New cards
Agile modelling
Prioritises user participation: keeps model simple and relies on rapid user feedback to make rapid incremental changes, allows for productive user input as they can comment on a prototype
50
New cards
Extreme Programming
Produces frequent project releases in short development cycles, improving productivity and introducing checkpoints, good for large projects to present bogging down
51
New cards
Rapid Application Development (RAD)
A development method that uses workshops/focus groups and an iterative approach to rapidly produce a high-quality system, good for large projects to present bogging down
52
New cards
Procedural Programming
Method of programming that uses step-by-step instructions (encompasses structured programming) supported by python/pascal
53
New cards
Object-oriented programming
A style of programming that involves representing items, things, and people as objects rather than basing the logic around actions, supported by Java, Python, Delphi
54
New cards
Declarative programming
Problem is described, language implementation decides how to solve it eg. SQL
55
New cards
Functional Programming
A programming paradigm that uses functions to create programs. Supported by Haskell, Python, Java
56
New cards
ADD
Add the contents of the memory address to the accumulator
57
New cards
SUB
Subtract the contents of the memory address from the accumulator
58
New cards
STA
Store the accumulator value in the memory address given
59
New cards
LDA
Load the contents of the given memory address into the accumulator
60
New cards
BRA
Branch- use the address given as the address of the next instruction
61
New cards
BRZ
Branch to the given address if accumulator is zero
62
New cards
BRP
Branch to the given address if the accumulator value is positive (or zero)
63
New cards
INP
Input into the accumulator
64
New cards
OUT
Output contents of the accumulator
65
New cards
HLT
Stops the execution of the program
66
New cards
DAT
Indicates a location containing data
67
New cards
Addressing modes
-Immediate addressing
-Direct addressing
-Indirect addressing
-Indexed addressing
68
New cards
Immediate Addressing
The operand is the actual value to be operated on
69
New cards
Direct Addressing
The operand holds the memory address of the value to be operated on
70
New cards
Indirect Addressing
The operand is the location holding the address of the relevant data
71
New cards
Indexed Addressing
Modifies the address in the address field by the addition of a number held in a special-purpose registers, called an index register, before the address is used.
72
New cards
Classes
A description of what data looks like and can do: an object is an instance of a class
73
New cards
Methods
Things that objects are coded to do
74
New cards
Attributes
The data associated with an object
75
New cards
Inheritance
Where a class retains the methods and attributes of its parent class as well as having its own
76
New cards
Polymorphism
When subclasses redefine a method or attribute originally inherited from a superclass
77
New cards
Encapsulation
The process of keeping an object's attributes private so they can only be accessed and changed via public methods
78
New cards
Lossy Compression
data compression techniques in which some amount of data is lost - redundant information is eliminated
79
New cards
Lossless Compression
a data compression algorithm that allows the original data to be perfectly reconstructed from the compressed data - no data is lost, file size is still made smaller
80
New cards
Run Length Encoding
A compression algorithm that represents an image in terms of the length of runs of identical pixels - lossless
81
New cards
Dictionary-based compression
Uses a dictionary to replace repeated phrases with shorter binary strings - lossless
82
New cards
Symmetric Encryption
An encryption method whereby the same private key is used to encode and to decode the message
83
New cards
Asymmetric Encryption
a type of encryption based on algorithms that require two keys -- one of which is secret (or private) and one of which is public (freely known to others).
84
New cards
Hashing
transforming plaintext of any length into a short code called a hash
85
New cards
Uses of Hashing
-Passwords
-Digital signatures
-Digital certificates
-Hash tables
86
New cards
Flat file database
Database which consists of just one table.
87
New cards
Primary Key
A field (or group of fields) that uniquely identifies a given entity in a table
88
New cards
Secondary Key
A field that has some identifying information, but typically does not uniquely identify a record with complete accuracy.
89
New cards
Foreign Key
A primary key of one table that appears as an attribute in another table and acts to provide a logical relationship between the two tables
90
New cards
Composite Key
Two or more fields that collectively define the primary key by unique combinations of their values.
91
New cards
First Normal Form (1NF)
A table that has a primary key and in which there are no repeating attributes or groups of attributes
92
New cards
Second Normal Form (2NF)
A table in first normal form in which there are no partial dependencies (only relevant if the primary key is a composite primary key)
93
New cards
Third Normal Form (3NF)
A table in 2NF where all attributes are dependent on the key, the whole key and nothing but the key
94
New cards
SELECT
SELECT field(s)
FROM table(s)
WHERE criteria
ORDER BY ascending/descending
95
New cards
CREATE TABLE
CREATE TABLE name (
field datatype
)
96
New cards
ALTER TABLE
ALTER TABLE name
ADD field datatype

ALTER TABLE name
DROP COLUMN column

ALTER TABLE name
MODIFY COLUMN name modification
97
New cards
INSERT INTO
INSERT INTO table_name (columns)
VALUES (values)
98
New cards
UPDATE
UPDATE table
SET field \= new value
WHERE condition
99
New cards
ACID
Atomicity, Consistency, Isolation, Durability
100
New cards
Atomicity
Requires that a transaction be processed completely or not at all