F453 Describe Flashcards
Describe two reasons why scheduling is used.
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
Describe the term assembly language.
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
Describe the term machine code.
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.
Describe one feature of an interpreter.
Translates one line/statement…
…then allows it to be run before translation of next line, reports one error at a time…
…and stops.
Describe what happens during lexical analysis.
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.
Describe indexed addressing.
Uses an index register/IR
… and an absolute address…
… to calculate addresses to be used.
Describe how virtual memory is used.
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
Describe the problem of disk threshing.
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.
Describe one method of scheduling.
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
Describe what optimisation does.
Makes code as efficient as possible, increases processing speed, reduces number of instructions.
Describe the fetch-execute-cycle.
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.
Describe how a jump instruction is executed.
By changing contents of PC (to address part of instruction),
Copy address part of instruction…
… in CIR to PC
Describe relative addressing.
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.
In printing, describe spooling and why it is used.
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.
Describe what happens during syntax analysis.
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
Describe the features of a procedural high level language.
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.
Describe immediate addressing.
Used in assembly language,
Uses data in address field…
… as a constant.
When producing programs, library routines may be used. Describe how library routines are used.
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
Describe the effects of the fetch-execute cycle on the Program Counter (PC) and the Memory Address Register (MAR).
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.