OCR A-Level Computer Science Spec Notes - 1.2 Summarized
OCR A-Level Computer Science Spec Notes - 1.2 Summarized
- Are stored on a backing store disk to swap parts of - Swap pages to/from
programs used for virtual memory. RAM (paging)
- May cause disk threshing when more time spent swapping pages from memory to disk
than processing so computer may ‘hang’.
(c) Interrupts (function of ISRs)
Interrupt: A signal from a device alerting the CPU for its immediate attention
- Obtain processor time via generating a signal/message to processor stating they need to
be serviced immediately
- Breaks current execution which is occuring in the processor
- Interrupts have different priorities
- Start when current FDE cycle is complete to ensure max efficiency of processor
- Can only interrupt a low-priority task to avoid delays/loss of data
Interrupt Service Routine (ISR)
- Check IR to compare interrupt priority compared to task
- If lower/equal priority = current task continues
- If higher priority = CPU completes FDE cycle
- Contents of registers stored in LIFO stack
- Location of ISR is loaded by loading the relevant value into the PC
- When ISR is complete
● Flags sent to inactive state
● Further interrupts checked & serviced if necessary
● Contents of stack popped and loaded back onto registers to resume processing
(d) Scheduling
Scheduler: Manages the amount of time allocated to different processes in the CPU. It has
several purposes:
- Maximise # of jobs completed in set time
- Maximise # of users receiving fast response times with minimal delay
- Ensure all jobs are processed fairly so long jobs don’t monopolise the processor
- Obtain the most efficient use of processor time and utilise resources dependent upon
priorities
- Prevent process starvation from applications in deadlock failing to run
Scheduling Algorithms
Scheduling Process of Advantages Disadvantages
Algorithm Scheduling
(f) BIOS
Basic Input/Output system (BIOS) allows the computer to be ‘booted up’ when switched on
- When switched on, PC points processor to BIOS memory to start up
- Check to see if computer is functional/memory installed/processor functional
- Stored in flash memory for modification
(g) Device drivers
- Normally provided with a peripheral device which contains instructions to enable the
peripheral and OS to communicate and configure hardware.
- Enables multiple versions of OS to communicate with devices
Applications Software:
- Allows user/hardware to carry out tasks
- E.g Word processor/spreadsheet packages/photo-editing suites/web browsers
(b) Utilities
Utilities Software:
- Small piece of systems software with one purpose usually linked with maintenance
- E.g Anti-Virus/Disk defragmentation/File managers
Feasibilit - To carry out enquiries on whether the project is possible and solvable. Plans can
y Study be revised if there are problems
- Analysts consider parameters such as:
● Technical feasibility – Is there hardware/software available to implement
the solution?
● Economic feasibility/cost benefit analysis – Is the proposed solution
possible to run economically?
● Social feasibility – Is the effect on the humans involved too extreme to be
socially acceptable/environmentally sound?
● Effect on company’s practices and workforce – Is there enough
operational skill in the workforce to be capable of running the new
system?
● What is the expected effect on the customer? - If customer not
impressed then there may not be a point.
● Legal/ethical feasibility – Can the proposed system solve the problem
within the law?
● Time available – Is the time scale acceptable for the proposed system to
be possible?
Testing This process makes sure the project runs smoothly. There are 4 types of testing:
- Black-Box Testing: Tests the functionality of the program without looking into
the internal structures/working. Only input/output
- White-Box Testing: Tests the structure & workings of the application as
opposed to its functionality
- Alpha Testing: Where testers in the organisation test & identify all possible
bugs/issues before the product is released
- Beta Testing: Test the program in a ‘real environment’ with limited end-users so
they provide feedback on the functionality of the program.
Advantages Disadvantages
Advantages Disadvantages
Advantages Disadvantages
- Large amount of risk analysis - High skilled team needed for risk
significantly reduces risk as risks are analysis
fixed in early development stages
- Software prototype created early and - Development costs high due to number
updated in every iteration of prototypes created & increased
customer collaboration
Advantages Disadvantages
- End user can see a working prototype - Emphasis on speed & development
early in project affects overall system quality
- End user more involved & can change - Potential for inconsistent designs &
requirements so clear direction on lack of detail in documentation
where the program is heading
- Overall development time is quicker - Not suitable for safety critical systems
reducing costs
- Low-level languages
● Directly linked to architecture of computer
● Machine/Assembly code are low level
LMC: fictional processor designed to illustrate the principles of how processors and assembly
code work.
BRZ Branch if zero BRZ number Jump to number label if ACC contents is
zero
DAT Data Location n DAT 10 Creates data location n and stores the
number 10 in it
- Indirect addressing
● The operand is the address of the data to be used by the operator
● Useful for larger memories
● E.g. in ADD 23, if address 23 stores 45, address 45 holds the number to be used.
- Indexed addressing
● Modifies the address given by adding the number from the Index Register to the
address in the instruction.
● Allows efficient access to a range of memory locations by incrementing the value in
the IR e.g. used to access an array
● E.g Adding data value 5 to data location 20, 6 is at 21 etc
● Final address = base address + index
- Immediate addressing
● Used in assembly language
● Memory remains as constant as it doesn't change (address field = constant)
● Data in the operand is the value to be used by the operator e.g. ADD 45 adds the
data value stored in data location ‘45’ to the value in the ACC.
Features of OOP
● Encapsulation
- Process of hiding data within objects to keep attributes private
- Prevents objects being amended in unintended ways
- Private attributes can only be amended by public methods = maintains data
integrity
● Inheritance
- When a class inherits it’s parents attributes & methods
- This class might have it’s own methods/attributes which could override
methods of the parent class (unless superclass is used)
- The class can be used as a base for different objects to save time
● Polymorphism
- Meaning “Many Forms”
- Applies same method to different objects = treated in same way
- Code written is able to handle different objects in the same way to reduce
the volume produced