F453 Describe Flashcards

1
Q

Describe two reasons why scheduling is used.

A
Maximise number of users… 
…with no apparent delay 
maximise number of jobs processed… 
…as quickly as possible 
obtain efficient use of processor time / resources… 
…dependent upon priorities 
…to ensure all jobs obtain processor time/long jobs do not 
monopolise the processor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe the term assembly language.

A

A language related closely to the computer being programmed/low level language/machine specific, uses descriptive names (for data stores), uses mnemonics (for instructions), uses labels to allow selection, each instruction is generally translated into one machine code
instruction, may use macros

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the term machine code.

A

Binary notation, set of all instructions available, to the architecture/which depend on the hardware design of the
processor, instructions operate on bytes of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe one feature of an interpreter.

A

Translates one line/statement…
…then allows it to be run before translation of next line, reports one error at a time…
…and stops.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe what happens during lexical analysis.

A

Source program is used as the input, tokens are created from individual symbols and from…
…the reserved words in the program, a token is a fixed length string of binary digits, variable names are loaded into a look-up table / symbol table, redundant characters (eg spaces) are removed, comments are removed, error diagnostics are given, prepares code for syntax analysis.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe indexed addressing.

A

Uses an index register/IR
… and an absolute address…
… to calculate addresses to be used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe how virtual memory is used.

A

Use of backing store as if it were main
memory/temporary storage, paging/fixed size units, swap pages between memory & backing store…
…to make space for pages needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe the problem of disk threshing.

A

Occurs when using virtual memory/moving pages between memory & disk, disk is relatively slow, high rate of disk access, more time spent transferring pages than on processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe one method of scheduling.

A
Round robin 
Each user allocated a short period of time/in a sequence 
or 
System of priorities 
Highest priority first 
or 
Length of job 
Shortest job first 
or 
First come, first served 
Jobs processed in order of arrival
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe what optimisation does.

A

Makes code as efficient as possible, increases processing speed, reduces number of instructions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe the fetch-execute-cycle.

A
PC holds address of next instruction, 
Copy contents of PC to MAR, 
Increment PC,
Load instruction pointed to by the MAR to MDR,
Copy instruction from MDR to CIR, 
Decode instruction in CIR.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe how a jump instruction is executed.

A

By changing contents of PC (to address part of instruction),
Copy address part of instruction…
… in CIR to PC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Describe relative addressing.

A
Allows a real address to be calculated… 
…from a base address… 
…by adding the relative address,
Relative address is an offset, 
Can be used for arrays, 
Can be used for branching.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In printing, describe spooling and why it is used.

A

Output data to disk drive/storage device,
For printing at another time,
To allow sharing/on a network,
Job references stored in a queue/buffer,
Avoids delays / avoids speed mismatch,
As printers are relatively slow,
Jobs can be prioritised.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe what happens during syntax analysis.

A

Accepts output from lexical analysis,
Statements/arithmetic expressions/tokens are checked…
…against the rules of the language/valid example given eg matching brackets
Errors are reported as a list (at the end of compilation),
Diagnostics may be given,
(if no errors) code is passed to code generation,
Further detail is added to the symbol table…
…eg data type /scope/address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe the features of a procedural high level language.

A
Imperative language, 
Uses sequence, selection & iteration, 
Program states what to do… 
… & how to do it, 
Program statements are in blocks, 
Each block is a procedure or function, 
Logic of program is given as a series of procedure calls.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Describe immediate addressing.

A

Used in assembly language,
Uses data in address field…
… as a constant.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

When producing programs, library routines may be used. Describe how library routines are used.

A
Library routines: 
Routines are pieces of software… 
…which perform common tasks… 
…such as sorting/searching 
Routines are compiled 
Why library routines help programmers: 
Routines are error-free/have already been tested 
Already available/ready to use/saves work/saves time 
Routines may be used multiple times 
Routines may have been written in a different source language 
Allows programmer to use others’ expertise 
How routines are used: 
Linker is used… 
…to link routine with program 
Loader handles addresses… 
…when program is to be run
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Describe the effects of the fetch-execute cycle on the Program Counter (PC) and the Memory Address Register (MAR).

A

PC holds address of next instruction,
PC passes this address to MAR…
MAR holds address of instruction/data,
Instruction/data from address in MAR is loaded to MDR,
PC is incremented (in each cycle),
PC is changed when there is a jump instruction…
…by taking address from instruction in CIR.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Describe how an insertion sort is used to arrange the following set of numbers in ascending order.

17 2 3 26 5

A

Original set 17 2 3 26 5
Insert 17 17 2 3 26 5
insert 2 2 17 3 26 5
insert 3 2 3 17 26 5
insert 26/no change 2 3 17 26 5
insert 5 2 3 5 17 26

21
Q

Describe two differences between assembly code and machine code.

A

Machine code:
written in binary/hexadecimal, no translation needed,very difficult to write.
Assembly language: includes mnemonics, includes names for data stores, translated by an assembler, easier to write than
machine code, but more difficult than high
level language.

22
Q

Describe direct addressing and indirect addressing, making clear the difference between them.

A

direct:
The simplest/most common method of addressing,
Uses the (data in) the address field…
…without modification
Eg In ADD 23, use the number stored in address 23 for the instruction (accept any valid example)
Limits the memory locations that can be addressed *
indirect:
Uses the address field as a vector/pointer…
…to the address to be used
Used to access library routines
Eg In ADD 23, if address 23 stores 45, address 45 holds
the number to be used (accept any valid example)
Increases the memory locations that can be addressed

23
Q

Describe the use of a data structure while interrupts are being serviced.

A
Stack, 
LIFO, 
To store the contents of registers, 
To return values to registers… 
…in order to resume processing.
24
Q

Describe machine code.

A

Binary notation/executable form,
Set of all instructions available,
(instructions operate on) bytes of data,
Dependent on architecture/processor design.

25
Q

Describe the steps an assembler performs when producing machine code.

A

Reserves storage for instructions & data,
Replaces mnemonic opcodes by machine codes,
Replaces symbolic addresses by numeric addresses,
Creates symbol table…
…to match labels & addresses
Checks syntax/gives error diagnostics.

26
Q

Describe Von Neumann architecture.

A

Single control unit,
One instruction at a time/in linear sequence,
Uses fetch (decode) execute cycle,
Program stored with data/program & data in same format.

27
Q

Describe the use of a Memory Data Register (MDR).

A

Instruction/data from address in MAR is copied to MDR,
Instruction in MDR is copied to CIR,
MDR acts as a buffer/temporary store,
MDR contains data/instruction…
…when being transferred between memory &
processor.

28
Q

Describe a queue data structure.

A

First in, first out/FIFO/data items are added at one end & removed from the other,
Two pointers are required.

29
Q

Describe stepwise refinement.

A

Problem broken into sections…
Which become progressively smaller,
Until each section can be written as a single,
Procedure/represents one step in the algorithm.

30
Q

Describe the purpose and use of the program counter.

A

Contains address of next (machine code) instruction to be executed,
During fetch execute cycle..
…contents of PC are copied to MAR
…PC is incremented,
For a jump instruction, address from CIR is put into PC

31
Q

Describe a Database Management System (DBMS).

A

Software that…
Handles the complexities of managing a database,
May provide a user interface,
May use SQL to communicate with other programs,
Provides different views of the data for different users.

32
Q

Describe round-robin scheduling.

A

Each user allocated a time slice,
Time slices are very small time/fractions of seconds,
At end of time slice, system moves to next user/job moves to back of queue,
Repeat this for all users in turn,
Order may depend on users’ priorities,
Users unaware of any delays,
Pre-emptive scheduler.

33
Q

Describe the features of interpreters and compilers and the differences between them.

A
Interpreter: 
Translates one line/statement… 
…then runs it before translation of next line, 
Reports one error… 
…then stops, 
Indicates position of error, 
Interpreter must be present each time 
program is run, 
Program runs more slowly due to 
translation, 
Virtual machine, 
Used during program development. 
Compiler: 
Translates whole program as a unit… 
…and creates an executable program…
…when program is completed, 
Protects program from malicious use, 
Architecture specific, 
May report a number of errors at once, 
Some reported errors may be spurious, 
Optimisation improves program speed/size, 
Compiler is no longer needed once 
executable code is produced.
34
Q

Describe the purpose of intermediate code.

A

Can run on a variety of computers/devices…
…using an interpreter,
Improves portability,
To allow sections of program to be written in different languages,
Used in a virtual machine.

35
Q

Describe a parellel processor system.

A

More than one processor…
Working together/synchronised…
To perform a single job…
Which is split into tasks,
Each task may be processed by any processor,
Processors are controlled by a complex operating system.

36
Q

Describe a array processor system.

A

A processor that allows the same instruction to operate simultaneously …
…on multiple data locations,
Using multiple ALUs,
Single Instruction Multiple Data (SIMD),
The same calculation on multiple data is very fast.

37
Q

Describe the ‘utility program’ feature of an operating system.

A

Maintenance program/carries out housekeeping,

Eg, virus checker.

38
Q

Describe the ‘data security’ feature of an operating system.

A

Use of passwords,
Access rights
Encryption.

39
Q

Describe the ‘memory management’ feature of an operating system.

A

Partitioning,
Protect processes from each other/allocates memory,
Virtual memory/paging/segmentation.

40
Q

Describe tokens and state at what stage they are created.

A

Created during lexical analysis,
Used for reserved words/keywords
Each token is a string of binary digits…
… of fixed length.

41
Q

Describe the contents and use of the current instruction register (CIR).

A

Contains the instruction to be executed,
Splits instruction into component parts,
Holds opcode while it is decoded,
Sends the address to the MAR for accessing data/value to accumulator,
Sends address to PC for jump instruction,
Determines the type of addressing to be used.

42
Q

Describe the effects of the values that can be represented with an 8-bit mantissa and 4-bit exponent compared with a 4-bit mantissa and 8-bit exponent.

A

8-bit mantissa values are more accurate than 4-bit mantissa,
4-bit exponent gives smaller range of values than 8-bit exponent.

43
Q

Describe the features of a declarative language.

A

Program consists of declarations/statements or facts/rules,
States what is required…
…but not how to do it,
Statements do not have to be in a specific order.

44
Q

Describe the features of a procedural language.

A
Imperative language, 
Statements in blocks… 
…called procedures & functions, 
Program states what to do & how to do it, 
Statements are in a specific order.
45
Q

Describe indirect addressing and explain why it is used.

A

Uses address field as a vector/pointer…
…to address to be used,
Increases the size of the address that can be used…
….allowing a wider range of memory locations to be accessed.

46
Q

Describe relative addressing and state one purpose for which it is used.

A

Allows real address to be calculated by adding a base address…
…to the operand,
Relative address is an offset,
Can be used for arrays/branching.

47
Q

Describe the code generation of phase of translation. Your answer should include reference to optimisation.

A

Code generation:
Occurs after syntax analysis/is last phase of
compilation,
Produces machine code program/executable
code/intermediate code…
…which is equivalent to the source program,
Variables/constants are given addresses
Relative addresses are calculated.
Optimisation:
Makes code as efficient as possible,
Increases processing speed,
Number of instructions is reduced,
Programmer can choose between speed & size.

48
Q

Describe segmentation.

A

A way of partitioning memory,
Segments are not fixed size,
Segments are logical divisions…
…which hold complete sections of programs.