Page 1

A2 Computing F453 Advanced Computing Theory

Revision of key definitions

Operating Systems: OPERATING SYSTEM Provide and manage hardware resources. o Memory management and the jobs passing through it. Provide an interface between the user and the machine. Provide an environment for applications software to operate. Provide utility software to allow maintenance to be done. VIRTUAL MEMORY Use of backing store as if it were main memory. Small amounts of fast access storage between the drive and memory. Swaps pages between memory and backing store to make space for pages needed. Allows programs to run that need more memory than is available. DISK THRESHING Occurs when moving pages between memory and disk. Disk is relatively slow, high rate of disk access. More time spent transferring pages than on processing. MEMORY MANAGEMENT Allocate memory to allow separate processes to run at the same time. Deal with allocation when paging, re-allocate memory when necessary. Protect processes or data from each other. (Stop data or processes writing over each other). Enables memory to be shared. SCHEDULING Efficient use of processor time/resources. Maximise number of users without any apparent delay for users. Ensures all tasks are processed by changing priorities where necessary. Processes as many jobs as possible in the least possible time. Prevent the system from failing if it becomes overloaded. o HLS  When entering the system, a job is placed in the ready to process queue by the HLS. It makes sure the system is not overloaded.  Order of processing is based on a scheduling algorithm. o MLS  If the process is in the RUNNING STATE and it suddenly needs peripheral usage, it is moved into the BLOCKED queue to make sure the process is efficient.  Move processes from the IAS to the backing store and back. o LLS  Responsible for selecting and running a process. ROUND ROBIN SCHEDULING Each user is allocated a time slice, when the time slice is up, the system moves on to the next user. If the next user needs processor time, the user is given a time slice. This is repeated until all the users are serviced. The time slice is very small so the user feels no apparent delay. SEGEMENTATION & PAGING Both allow programs to run despite insufficient memory. Both are stored on disk and assigned to memory when needed. o Segments are of different sizes (variable) where as pages are of fixed sizes.

Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory o

Revision of key definitions

Segments are complete sections of programs while pages are made to fit sections of memory.  Paging  Memory is divided up into pages of equal size.  Jobs are allocated pages according to how much memory they require.  Requires a MMU.

TRANSLATORS Convert from source code into object code while detecting any errors in the source code. Compiler o Takes a program written in a high level language and translates it into equivalent program in machine code. o Once this is done, the machine code version can be loaded into the machine and run without any further help. o –Requires a lot of memory as the compiler, source code and object code has to be stored. STAGES OF COMPILATION Lexical Analysis o Source program is used as input. o Tokens (a string of binary digits of fixed length) are created for the reserved words. o Variable names are put into a look up table. o Redundant characters such as spaces as well as comments are removed. o Error diagnostics are given. o Prepares code for syntax analysis. Syntax Analysis o Statements are checked against the rules of the language. o Uses a symbol table. o If statements are not valid, error messages are reported to alert the user/programmer. Code Generation o Code Optimisation o Makes code as efficient as possible. o Improves processing speed and reduces number of instructions. INTERMEDIATE CODE +May be used on a variety of machines. It has been compiled and is therefore error free. EXECUTABLE CODE A complete program that the computer can run without further translation. Machine code/Low Level Language. LIBRARY ROUTINE Piece of software. Routines often perform common tasks; they are compiled and are therefore error free. Available to programmer to use with a new program. o +May allow programmer to use code which was written in a different language. o Linker is used to link the routine to the program. o Standard routines for sorting/searching are available. o Allows programmer to use others’ expertise. o May be used multiple times. Loader will handle addresses when loaded. INTERPRETER Software that translates and executes the program one instruction at a time. Stops at first error found.

Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory

Revision of key definitions

INTERRUPT A signal that causes a break in the execution of the current routine. Asking for processor time. The current routine can be resumed after the interrupt. o Input/Output Interrupt  Generated by an I/O device to signal a job is complete or an error has occurred.  E.g. Printer has run out of paper or is not connected. o Timer Interrupt  Generated by an internal disk indicating that the processor must attend to time critical activities. o Hardware Error  For example, power failure which indicates that the OS must shut down as safely as possible. o Program Interrupt  Generated due to an error in a program such as violation of memory use. o WHY PRIORITIES ARE NEEDED o More than one interrupt can occur at a time. o Necessary to deal with the more urgent interrupt first as a more urgent interrupt has a higher priority to avoid loss of data. o HOW TO ENSURE THAT IT IS POSSIBLE TO RESUME A JOB o Values taken from registers. o They are then stored in a stack, so that they can be replaced in the registers once the interrupt has been serviced. . Interrupt handling by the processor. At the end of an instruction, the processor will check to see if there are any outstanding interrupts. If there are, the priority of the current task is compared with the highest priority interrupt. If there is a higher priority interrupt, the current task is suspended and the contents of the special registers are stored in stacks so that the program can be resumed once the interrupt has been serviced. Interrupts are then serviced and control is returned to the original job. SPOOLING Output data to fast access storage device such as a disk drive. o For printing when the processor is not busy. o To avoid speed mismatch. LINKERS/LOADERS Combines modules/library routines that have already been compiled. Copies modules into memory from backing store, ready for execution. Completes address links to program. FILE ALLOCATION TABLES The disk surface must be divided up into small areas. Files are stored on these small areas; each file will normally use more than one area. The table of files has an entry pointing to the first area on the disk surface used by that file and a pointer to the next area. A null to signify the end of the file.

PROGRAMMING TECHNIQUES Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory

Revision of key definitions

PARAMETER A value that can be passed to a subroutine, either a procedure or a function. Can be passed by value which means that the actual value is passed across and the old value remains when the subroutine is finished. It can be passed by reference which means it is passed as the contents of an address, so if the subroutine changes it, the old value is essentially rubbed out. LOCAL VARIABLE Only exists in the subroutine in which it is declared. GLOBAL VARIABLE A single variable that is available throughout the program. USING FUNCTIONS AND PROCEDURES TO DEVELOP A PROGRAM Each module can be written as a functional procedure, which can be tested individually. The use of library routines, as code is reusable. Main program consists of calls to functions/procedures which may be nested. USING GLOBAL VARIABLES, LOCAL VARIABLES AND PARAMETERS Local Variables o A variable defined within one part of the program and is only accessible in that part. o Data contained is lost when execution of that part of the program is completed. o The same variable names can be used in different modules. Global Variables o A variable that is defined at the start of a program and exists throughout the program including functions and procedures. o Allows data to be shared between modules. o Overridden by local variables with the same name. Parameters o Information about an item of data supplied to a function or procedure. o Can be passed by reference or value. o Used as a local variable. BINARY SEARCHING VS SERIAL SEARCHING Usually faster because half of the data set is discarded at each step. Therefore fewer items have to be checked. BACKUS NAUR FORM To unambiguously define the syntax of a computer language.

From High Level Languages (object oriented programming): ALGORITHM A set of instructions used to complete a particular task. UNIFIED MODELLING LANGUAGE A descriptive diagrammatic representation to describe the stages required to produce effective Object Orientated programs. Standard form of presenting information. Allows systems analysts, programmers and clients to communicate. Makes system maintenance easier when modifying a system.

Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory

Revision of key definitions

CLASS DIAGRAM A class is an entity of a given system that provides an encapsulation of the functionality of a given entity. Block split up into three, containing class name, attributes and methods/operations. OBJECT DIAGRAM An object diagram consists of the first 2 rows of a Class diagram The first row would contain the objects name. The second row would contain the values for the objects attributes. USE CASE DIAGRAM Actors. Interactions between processes. SEQUENCE DIAGRAM How the objects in the class interact with each other. Dotted line = lifeline which shows the passage of time vertically from top to bottom. When the lines become thick, the methods have been activated. COMMUNICATION DIAGRAM How different objects combine to pursue a common purpose. CLASS Contains the attributes and methods. A template for objects, each object of that class will contain its attributes and methods. Object Orientated. Allows for Data Encapsulation. OBJECT An instance of a class. A real-world entity. Holds methods and attributes. METHOD A way of interacting with objects. ATTRIBUTE Characteristics of the items within a class. INHERITANCE The process of passing on methods and attributes from a super class to a sub class while allowing the sub class to have its own attributes and methods. This can help to reduce errors as the attributes and methods do not have to be written each time they are needed in the diagram. CONSTRUCTOR A method with the same name as the class which is executed when an instance of a class is created. POLYMORPHISM This is when multiple methods have the same name but have different parameter lists. Eg. Constructor. ENCAPSULATION The attributes and methods are hidden from anything outside the class. Objects can only access the data by using the methods provided. An object cannot manipulate the date directly. PROCEDURAL LANGUAGE rd 3 Generation. Step by step instructions to solve a problem.

Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory

Revision of key definitions

DECLARATIVE LANGUAGE th 4 Generation. States what to achieve without giving detailed steps by declaring facts and rules. Fact o Predicate which may have arguments. o Something that is always (unconditionally) true. Goal o A query to be solved. Backtracking o After finding a solution for a goal, or if a goal fails, o Going back to an earlier point to take an alternative route. Instantiation o Giving a variable a in a statement a value.

From Databases: ENTITY Table RELATIONAL DATABASE Data is stored in tables which are related to each other. Each table has a key field, by which all the values on that table are identified. RELATIONAL DATABASE vs FLAT FILE Avoid data duplication / inconsistent data. Data Integrity. Easier to change data as you only have to change it once as well as changing data format. Data can be added easily. Data security/easier to control access to data. PRIMARY KEY Unique identifier in a table.

COMPOSITE KEY FOREIGN KEY Used to link tables or create relationships between tables. Primary key from one table used as an attribute in another DDL Data Definition Language. This is used by the designer to define the tables of the database. Creates tables/attributes. Define data types/primary & secondary keys/validation rules/ access rights. DML High level language. Allows user to access / change data. DBMS Database Management System DATA DICTIONARY A file containing descriptions of data in database. Used by database managers when altering database structure. Uses metadata to define the tables.

Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory

Revision of key definitions

o EXAMPLES OF INFORMATION STORED. o Names of tables/columns o Characteristics of data (eg length, data type) o Restrictions on values in columns o Meaning of data columns o Relationships between data o Which programs can access data o Identifies primary keys o Identifies foreign keys o Identifies indexes o Defines access rights NORMALISATION To ensure many to many relationships do not occur. Avoid duplication of data.

From Low Level Languages: LOW LEVEL LANGUAGE Close to design of computer. 1:1 relationship with machine code. Assembly language uses mnemonics for instructions. Uses variable names for addresses and uses labels. 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. 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. MNEMONICS A code that is easily remembered. Used to give the opcode. Eg. ADD ASSEMBLER Translates a program from assembly language into machine code. One assembly language instruction is changed into one machine code instruction. Mnemonic opcodes are replaced by machine codes. Replaces symbolic addresses by numeric addresses. A symbol table to match labels to addresses. Offers diagnostics for errors. OPCODE Operation Code. The part of the instruction which tells it what to do. (Mnemonic) OPERAND The address/data part of the instruction.

Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory

Revision of key definitions

MNEMONIC A way of representing the Opcode in a form easily understood by the programmer as opposed to using Binary. A code that is easily remembered. INDEXED ADDRESSING Uses an index register in order to modify the address by the adding the number in the index register to the provided address. o +Easy to alter the index register. o +Easy to access a range of memory locations. DIRECT ADDRESSING Where the value given points to the address where the instruction is stored. o –Limited address range, if we want to use the same instructions on a number of items of data, the instruction has to be written out a lot of times. o – Uses fixed memory location. Only possible to access addresses which are small enough to be stored in the address part of the instruction. IMMEDIATE ADDRESSING Where the value in the address part of the instruction is actually the value to be used. It means that memory does not need to be searched to find the value. o –It cannot easily be used by other instructions. o – It can be difficult to change the value. SYMBOLIC ADDRESSING The use of characters to represent the address of a store location. 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 or branching. FLOW CONTROL The order in which instructions are executed. The order may be changed by a jump instruction.

From Data Representation MANTISSA Usually the first five bits in the floating point representation. Controls the accuracy of the number. More bits for the Mantissa means that the accuracy will increase. EXPONTENT Usually the last three bits in the floating point representation. Controls the range of the number. OCTAL A form of representing numbers using a base 8 system. This allows 8⁸ numbers to be stored in an 8 bit byte. OVERFLOW Occurs when you try and store a number in floating point that is too large to store in the allocated amount of bits. UNDERFLOW If you try and store a number that may be too small to store in the allocated bits. NORMALISING To give a single representation of any value. In order to give more precision.

Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory

Revision of key definitions

To allow multiplication to be performed more accurately.

From Data Structures: STATIC DATA STRUCTURE Structures that do not change in size while the program is running. o Array +Compiler can allocate space during compilation. +Allows random accessing to take place. -Programmer has to estimate the max amount of space that is going to be needed. -Can waste a lot of space. DYNAMIC DATA STRUCTURE Can increase and decrease in size while a program is running. o Linked List. +Only uses the amount of memory needed at any time. +Makes efficient use of memory. +Storage no longer required can be returned to the system for other uses. -More difficult to program. -Can be slow to implement searches. -A linked list only allows serial access. STACK LIFO data structure. Items are placed on top of the stock and they are also removed from the top of the stack. Has 1 pointer. INSERTION 1. Check to see if the stack is full. 2. If the stack is full, report an error and stop. 3. Increment stack pointer. 4. Insert new data item into cell pointed to by the stack pointer and stop. DELETION/READING 1. Check to see if the stack is empty. 2. If stack is empty, report error and stop. 3. Copy data item in cell pointed to by stack pointer. 4. Decrement the stack pointer and stop. QUEUE FIFO data structure. Items are placed in the front of the queue and are removed from the end. Has 2 pointers. INSERTION 1. Check to see if queue is full. 2. If the queue is full, report error and stop. 3. Insert new data item into cell pointed to by head pointer. 4. Increment the head pointer and stop. DELETION/READING 1. Check to see if the queue is empty. 2. If the queue is empty, report error and stop. 3. Copy data item in cell pointed to by the tail pointer. 4. Increment tail pointer and stop.

Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory

Revision of key definitions

ARRAY Static data structure. Number of similar data items stored under one identifier. A static data structure which stores a number of similar data items under one identifier. TREE A data structure which contains nodes and branches. o IN ORDER TRAVERSING  Traverse left sub-tree.  Visit root.  Traverse right sub-tree. DELETION o Leave the item of data there but label it as deleted. o Store the contents of the tree with the root being the item to be deleted. o Insert items back in. UNDERFLOW (e.g. stack) When you try and delete an item from a stack when the stack is empty. OVERFLOW (e.g. stack) When you try and add a data item into a stack when it is already full. CIRCULAR QUEUE A queue which is usually stored as an array and stops the entry of data items into the queue being limited.

From Computer Architecture: VON NEUMANN ARCHITECTURE Single processor control unit. Program and data stored in the same format. o Separated by the area in memory that they are stored. Follows the process of the Fetch, Decode, Execute cycle. CISC Complex Instruction Set Computer. Allows the instructions to be complex allowing for a greater variety of instructions of greater degrees of complexity to be executed. May use more than one clock cycle to complete. RISC Reduced Instruction Set Computer. Uses only simple instructions. The number of operations recognised by the computer is limited. o In order to reduce the number of bits needed to represent an instruction code. o Processing is slower than in a CISC. o Uses one clock cycle to complete. COPROCESSOR An additional processor such as the Math Coprocessor which is used for a specific task. Math Coprocessors use special registers which can hold the large strings of floating point data speeding up the processor. ARRAY PROCESSOR A processor that allows an instructions to operate on multiple data locations simultaneously.

Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory

Revision of key definitions

Some calculations on different data is very fast. PARALLEL PROCESSING VS SINGLE PROCESSOR +Increased speed as multiple instructions processed at once. +Complex tasks performed efficiently. -Not suitable for some programs. -As programs are written specifically for parallel processing, they may need to be re-written. SIMD Single Instruction Multiple Data. An array processor which allows one instruction to be applied to many separate items of data. MIMD Multiple Instruction Multiple Data. Allows more than one instruction to be applied to more than one item of data. ARRAY PROCESSOR A computer architecture which allows one instruction to be performed on many data items “at the same time�. SIMD architecture. Faster when processing a large amount of data, as items are processed at the same time. Can be used in weather forecasting. ACCUMULATOR A form of temporary storage within the ALU. A register which is used to store the results of arithmetic and logic statements. Deals with the input and output in the processor. PIPELINING Processor is split into parts. Each part handles one of the FDE cycle. PROGRAM COUNTER Stores the address of the next instructions that is to be executed. o CIRCUMSTANCES THAT WILL CAUSE VALUE TO CHANGE o Increment to address of next instruction, every time an instruction is fetched. o When the instruction is a jump instruction. CURRENT INSTRUCTION REGISTER Holds the instruction that is to be executed. FETCH The PC stores the address of the next instruction to be executed. The address is copied from the Pc and placed in the MAR. The address is found in memory and its contents are placed in the MDR. The contents of the MDR are then copied into the CIR. The CIR holds the instruction that is to be executed. DECODE The instruction in the CIR is split into individual parts. o The opcode and the address in memory of the data to be used with the operation. o The address part is placed in the MAR; data is fetched and placed in the MDR. o Operation is decoded. EXECUTE The contents of the MDR are sent to the required place together with the instructions about what to do with it. FED CYCLE

Definitions | Tiju Thomas


A2 Computing F453 Advanced Computing Theory

Revision of key definitions

1. Load the address that is in the program counter into the MAR. 2. Increment the PC by 1. 3. Load the instruction that is in the MAR into the MDR. 4. Load the instruction from the MDR into the CIR. 5. Decode the instruction in the CIR. 6. If the instruction is a jump instruction, then. a) Load the address part of the instruction into the PC. b) Reset to step 1. 7. Execute the instruction. 8. Reset to step 1. JUMP INSTRUCTION Works by changing contents of PC to address part of the instruction. By copying the address part of the instruction in the CIR into the PC. ARCHITECTURES Von Neumann Architecture o Involves the use of data and instructions being held together in memory. o Sequential processing, the use of a series of instructions carried out in a specific order to solve a problem. o Suits any example where the outcome is dependent on steps being taken in a defined order.  -As it only uses a single processor, it can be time hungry. Parallel Processors o Uses multiple processors to carry out many instructions at the same time. o Speeds up arithmetic processes. Array Processor o Used in time dependant operations which require a large amount of processor time.  Eg. Weather forecasting.

Definitions | Tiju Thomas

Testing  

Operating System

Read more
Read more
Similar to
Popular now
Just for you