1.2 Software and Software Development.280155520

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Operating Systems (OS) Memory Management Interrupts Virtual Machines

• Provide an interface between the • Computers often need more memory • A signal generated by hardware or software • A software implementation of a virtual computer
user and computer than is available and so must efficiently to tell the processor it needs attention. • Intermediate code is halfway between machine code
• Features include Memory manage the available memory and share • Have different priorities. and object code.
management, Resource it between programs. • Stored with a priority queue in an interrupt • It is independent of process architecture allowing it to
management, File management, Paging register. run across different systems.
Input Output Management, Interrupt • Memory is broken down into equal sized Interrupt Service Routine (ISR) • It takes longer to execute
management, Utility software, parts called pages. • At the end of the fetch, decode, execute • Virtual machines can be used to help protect from
Security, User interface • Pages are swapped between main and cycle the interrupt register is checked. malware, test software, or run software with different
virtual memory. • If there is an interrupt with a higher priority versions or OS requirements.
Algorithms Segmentation than the current task:
• A set of instructions used to solve a • Memory is split up into segments.
Applications Software
o The contents of the registers are
• Segments can vary in size. • Used by an end user to perform a specific task.
set problem. transferred into a stack .
• These segments represent the logical • e.g. word processor or web browser
• Inputs must be clearly defined. o The appropriate (ISR) is loaded into
• Must always produce a valid output. flow and structure of a program. RAM. Systems software
• Must be able to handle invalid inputs. Virtual Memory o A flag is set, noting that the ISR has • Manages computer resources to maintain
• Must always reach a stopping • Part of the hard drive can be used as begun. performance
condition. RAM. o The flag is reset when the ISR has • e.g. operating system or device driver.
• Must be well-documented for • Access is slower than RAM. finished. Utility Software
reference. • Paging is used to move sections which o This process repeats until no more • Has a specific function to maintain OS performance
• Must be well-commented. are not in active use into virtual memory. interrupts exist. • e.g. backup or compression software

Unit 1.2 Software and Software Development (Page 1)


Scheduling Types of Operating System Open Source Closed Source Linkers
• The operating system schedule processor time between Distributed Provided along with the source Needs a license to use. • Link external modules and libraries used in the code.
running programs. • Runs across several devices code. Source code is not available. • Static linkers copy the library code directly into the
• These are known as jobs and held in a queue. • Spreads task load across multiple No license required to use. Protected by Copyright file, increasing its size.
• Pre-emptive scheduling routines actively start and stop jobs computers The company provides • Dynamic linkers just add the addresses of the module
• Non pre-emptive routines start jobs then leave them to Embedded Online, free, community support. or library.
support and documentation.
complete • Built to perform a specific small task Many individuals will work on the Loaders
Advantages Professionally developed.
Round Robin Routine • Built for a specific device and code meaning it is of high quality.
More secure. • Provided by the OS to fetch the library or module from
• Each job is given a time slice of processor time to run in. hardware Free.
Regular updates the given location in memory
• When a job has used up it’s time slice it is returns to the start • Limited functionality Not always well supported or Code cannot be customised
of the queue and receives another. • Less resource intensive documented. to meet user needs.
• This repeats until the job is complete. Multi Tasking Disadvantages Libraries
Variable quality code. License may restrict use. • Libraries include pre compiled, error free, code which
First come first served routine • Allows multiple tasks to be completed Less secure. More expensive.
• Jobs are processed in the order they entered the queue simultaneously can be used within other programs
Multilevel feedback queue routine • Uses time slicing to switch between Translators Stages of Compilation • Common functions can quickly and easily be reused
• Uses multiple queues, each with a different priority applications • Covert source code into object code. Lexical Analysis across multiple programs
Shortest job first routine Multi User Compiler • Comments and whitespace • Saves the time and effort associated with developing
• The queue is ordered by the amount of processor time • Several users can use a single • Translates code all in one go. removed and testing code to perform the same task over and
needed. computer • Compilation process is longer. • Identifiers and keywords over again.
• The shortest jobs are completed first. • A scheduling algorithm allocates • Produces platform specific code. replaced with tokens
Shortest time remaining routine processor time between jobs • Complied code can be run without a • Token info stored in a Ways to Address Memory
• The queue is ordered based on the time left to completion. Real Time translator. symbol table • Machine code comprises an operand and opcode.
• Jobs with the least time needed to complete are finished first • Performs tasks within a guaranteed Interpreter Syntax Analysis • Operand is the value relating to the data on which the
Advantages Disadvantages time frame • Translates and executes code line by line. • Tokens checked against instruction should be performed.
Round All jobs are Longer jobs take much • Used in time critical systems. • Will error if a line contains an error. language rules • Opcode holds the instruction and the addressing
Robin eventually longer. • Slower to run than compiled code. • Flags syntax errors mode.
attended to. Takes no account of priority. • Code is platform independent. • Abstract Syntax Tree • The addressing mode is how the operand should be
BIOS • Useful for testing. Produced
First Come Easy to Takes no account of priority. interpreted.
• Basic Input Output System. Assembler Code Abstraction
First implement. Addressing Modes
• Runs when a computer first turns on. • Assembly code is platform specific, low • Machine code produced
Served • Immediate Addressing – The operand is the value
• Runs tests then loads the main OS level code. using Abstract Syntax Tree
Multilevel Considers job Tricky to implement itself and the instruction is performed on it.
into memory. • Translates assembly code to machine Optimisation
Feedback priority. • Direct Addressing – The operand provides the
• Power On Self Test (POST) makes code. • Reduces execution time
Shortest Works well for Requires additional address of the value the instruction should be
sure all hardware is connected and • 1 line of assembly code = 1 line of • Most time consuming part
Job First batch systems processor time to order the performed on.
functional machine code. • Removes redundant code.
queue • Indirect Addressing – The operand holds the address
• Tests the CPU, Memory and external
Takes no account of priority. Device Drivers of a register. The register holds the address of the
devices.
Shortest Increased Requires additional • Code which allows the OS to interact with hardware data.
Time throughput processor time to order the • Indexed Addressing – An index register stores a
• Specific to the OS and architecture type
remaining queue certain value. The address of the operand is found by
Takes no account of priority. adding the index register and the operand.
Merits Drawbacks Uses Assembly Language Development Methodologies
• Straightforward to • Lack of flexibility • One level up from machine code.
Static, low-risk Extreme Programming
• Low level language.
manage • No risk analysis • An agile model.
Waterfall projects with • Uses abbreviations for machine code called mnemonics.
• Clearly • Limited user • Processor specific. • Development team includes developers and user representatives.
little user input.
documented involvement • One line in assembly language equals one line in machine code. • The system requirements are based on “user stories”.
• High quality code Small to • Produces highly usable software and high quality code.
• Flexible to medium Mnemonic Instruction Function
• Programmers work no longer than 40 hours per week.
• Poor Add the value at the memory address to the
Agile changing projects with • Hard to produce high quality documentation.
documentation ADD Add value in the Accumulator
requirements unclear initial
Rapid Application Development Spiral Programming
• Regular user input requirements. Subtract the value at the memory address from
SUB Subtract the value in the Accumulator • An iterative methodology. • Used for high risk
Small to • Uses partially functioning prototypes. projects.
• High cost as two Store the value in the Accumulator at the
medium • Users trial a prototype. • Has four stages:
• High quality code people are STA Store memory address
projects with • Focus groups gather user
• Constant user needed • Analyse requirements.
Extreme unclear initial Load the value at the memory address to the
requirements.
involvement • Teamwork is LDA Load Accumulator • Locate and mitigate
Programming requirements
means high essential • This informs the next prototype. risks.
requiring Allows the user to input a value to be held in
usability • User needs to be • This cycle repeats. • Develop, test and
excellent INP Input the Accumulator
present • Used where user requirements are implement.
usability. OUT Output Prints the value in the Accumulator unclear. • Evaluate to inform the
• Thorough risk- • Code may be inefficient. next iteration.
• Expensive to hire HLT Halt Stops the program at that line
analysis • The project may be
risk assessors Creates a flag with a label at which data is
• Caters to Large, risk- terminated if it is
• Lack of focus on DAT Data stored. Agile Methodologies
changing user intensive deemed too risky.
Spiral code efficiency Branch if Branches to an address if the value in the • A collection of mythologies.
needs projects with a • Specialist risk assessors
• High costs due
• Prototypes high budget. BRZ zero Accumulator is zero. A conditional branch. • Aimed to improve flexibility.
to constant are needed.
produced Branch if Branches to a given address if the value in the • Adapt quickly to changing user
prototyping Waterfall
throughout BRP positive Accumulator is positive. A conditional branch. requirements.
• Caters to Branch Branches to a given address no matter the value • Sections of the program are • The stages are
changing • Poorer quality BRA always in the Accumulator. An unconditional branch. developed in parallel. completed in order.
Small to • Different stages of development can • The clear structure
requirements documentation
medium, low- be carried out simultaneously. makes this model easy
Rapid Application • Highly usable • Fast pace and
budget projects • A prototype is provided early and to follow.
Development finished product late changes
with short time- improved in an iterative manner. • Changes mean that all
• Focus on core may reduce
frames. • Low focus on documentation. stages must be revisited.
features, reducing code quality
development time • High focus on user satisfaction. • User involvement is low.

Unit 1.2 Software and Software Development (Page 2)


Procedural Programming Attributes, Methods, Classes and Objects.
• Simple to implement. • Class – a template for an object. Defines the behaviour and state of Programming Paradgims
• Applicable to many problems. the object.
• Is not suited to every problem. • State – defined by attributes giving the object’s properties.
• Uses traditional data types and structures. • Behaviour – defined by the methods. Describes the action an object Declarative
Structured Programming can perform. Imperative States the desired result with the
• A subsection of procedural programming • Instantiation – using a class to create an object. Code specifies clearly the actions to be language deciding how to acchieve it.
• The flow is given four structures: sequence, selection, • Object - an instance of a class. Classes can create multiple objects. performed Users are unaware how the result is
iteration and recursion. • Setter – a method which sets the value of an attribute. obtained
• Getter – a method which retrieves the value of an attribute.
• Constructor method – Allows a new object to be created from a Procedural Object Orientated Functional Logic
Object Orientated Programming class. Every class must have one. Widely used Useful for problems which Based around functions Rules and facts of the
Advantages • Inheritance - process where a subclass will inherit all methods and can be broken down into Function calls can be problem are defined
Can be applied to a wide distinct components
• Reusable attributes of a superclass. range of problems combined Queries are used to find
• Code is more reliable • Polymorphism – allows objects to behave differently depending on Based around objects Linked to mathematics answers to these problems
their class. Written as a set of which have attributes and
• Code is easy to maintain and update instructions which are
• Classes can be reused, saving time and effort • Overloading – avoiding a method by passing different parameters methods
carried out one by one
Disadvantages to a method. Focus on reusability,
• Overriding – redefining a method to allow it to produce a different Easy to write maintainability and ease of
• Requires an alternative style of thinking
• Not suited to every problem output or function differently. updating
• Not best suited for small problems

You might also like