Definitions Flashcards
Real-time system
- Must meet a timing deadline
- Must be able to validate that their timing is corrrect
When is a system safety critical
If a failure can cause loss of goods, money or life
Give 2 benefits of smaller sampling period
- Better approximation of analogue signal
- Reduces oscillation
Disadvantage of smaller sampling period
Demanding of processor time
Multi-rate control systems
Have aspects (sensors, actuators etc.) that depend on different timing rates
Give 3 difficulties associated with RT systems
- Requires concurrent control of separate system components
- Reactive behaviour is unpredictable
- If the system guarantees a certain response time, the worst case response times must be predicted
- Haha here’s a 4th fuck you James
Fast RT system
System must act in a short amount of time in response to an input
Slow RT system
The system doesn’t need to act quickly in response to an input
Hard RT system
Must meet a hard deadline
Soft RT system
The moment in time that an action must occur isn’t that important
Embedded system
Performs one type of job
What converts assembly to machine code
Assembler
Give 4 benefits of C over assembly language
- Easier and quicker
- Easier to modify and update
- Can use function libraries
- Code is portable
Register
Storage location that can read/write to ALL bits at the same time
Which is quicker, a register or RAM?
Register
Do values from RAM go straight into processing?
No, they are stored in a register first
Accumulator
Accumulates the RESULT of arithmetic. Is the most versatile
R Registers
General purpose
B Registers
Like an accumulator but only for * and /
Data pointer
Points to data
Program Counter (PC)
Points to next instruction in memory
Stack pointer
Points to the next value to be removed from the stack
Signed integer data type
16 bit signed integer
Bit data type
1 bit, used for RAM
S bit data type
1 Bit, used for SFRs
Special Function Registers
Registers that deal with things such as I/O, power management. Can be bit or byte addressable
Sfr data type
8 bit, for byte-addressable SFRs
Give 2 benefits of software delays
- Don’t require hardware timers
- Work (imprecisely) on any micro-processor
Give 2 drawbacks of software delays
- It is difficult to make them accurate (use oscilloscope)
- Must be readjusted to use on different micro-processor, clock frequency or even compiler
What is the Machine Cycle?
Fetch, Decode, Execute, Store
What determines the clock period?
Crystal frequency
Give each stage of the Waterfall model for system development
- Requirements analysis and specification
- High level design
- Detailed design
- Coding
- Unit testing
- Integration testing
- System and acceptance testing
Interrupt
Signal sent to the CPU that pauses the current program execution to instead execute some code associated with the event
External interrupts
Interrupts that come from outside the chip, via interrupt pins
Unit testing
Test individual components for functionality. Should be able to write the tests before the code
Test driven development (TDD)
Write the tests first, implement the code, test code and adjust until it passes the tests. Then repeat for the next part of the program
Give 4 benefits of running unit tests
- Reduces number of bugs when integrating
- Bugs are found earlier
- Helps with documentation
- Encourages good design (you have testability in mind when writing the code)
Splint
Tool that checks C code for errors and vunerabilities
Coverage checking
Making sure there are no missing test cases - was each line of code run?
Give 4 benefits of test-driven development (TDD)
- There is a focus on the function of the code before implementation
- Encourages best practices
- Improved code coverage
- Feedback to programmer is fast
“Big-bang” (integration testing strategy)
Integrate all components at once
Give 1 benefit and 2 drawbacks of big-bang testing
If it works, then time is saved. But if it doesn’t then it is difficult to find the bugs, and coverage is difficult to achieve
“Bottom up” (integration testing strategy)
Integrate low level functions first, work upwards
Give 1 drawback and 1 benefit of bottom up testing
You have to write test code for each integration, but you can use drivers from unit testing to help
“Top-down” (integration testing strategy)
Integrate from the top, using ‘stubs’ to simulate code from lower down levels
Give 1 benefit and 1 drawback of top down testing
You can easily link test cases to the design criteria as you are working with the top levels, but you have to take the time to write stubs
“Sandwich” (integration testing strategy)
Combination of bottom up and top down. Test from the top down using stubs, test the middle levels with stubs and drivers, and the bottom with just drivers (all at the same time). You can then retest with actual system parts instead of stubs and drivers
Give 1 benefit and 1 drawback of sandwich testing
Code can be tested as you add components, but it’s bare effort to write all the stubs and drivers
System testing
Overall testing of system to make sure the specification is met, under normal and abnormal usage.
Alpha testing
The customer is given a limited functionality prototype of the system, and uses it under supervision of the development team
Beta testing
The customer is given a prototype that is very close to the finished product, and gives feedback over time
Regression testing
After fixing a bug, test other parts of the system to make sure that the fix did not break anything else
Give 3 benefits of the waterfall model
- The outputs of each phase can be used to measure progress
- Uses a top-down structure
- Allows for intuitive implementation
Give 2 drawbacks of the waterfall model
- The specification is set early on, and the model doesn’t leave much room for changes in the spec
- Testing isn’t done until after implementation
Describe the evolutionary model
Uses exploratory development. From the initial requirements, a prototype is built. This is tested and evaluated. Another iteration is done and the process repeats
Give 3 benefits of the evolutionary model
- Heavy customer involvement, therefore requirements are likely to be satisfied
- Early and regular testing limits chance of failure
- Works well for smaller projects
Give 4 drawbacks of the evolutionary model
- Difficult to manage
- Deliverables are not well defined
- Continued changes may lead to a bad program structure
- The number of iterations must be limited due to time and cost
Incremental model
Like waterfall, but the design stage is split into increments
Give 5 benefits of the incremental model
- The requirements can be prioritised
- Prototypes meet the basic requirements early on
- Prototypes provide a testing platform
- Requirements can evolve
- Increments are planned, which allows for risk management
Give the 4 stages of the spiral model
- Determine objectives
- Identify and solve risks
- Develop and test
- Plan next iteration
Describe Scrum methodology
A ‘product backlog’ is made, which is a wishlist from all of the stakeholders. This is cut down to produce the release backlog, and tasks on it are grouped into ‘sprints’. Timings to complete each sprint are estimated, and as the project goes on a ‘burndown chart’ shows the estimated completion date of each sprint etc.
Give 2 benefits of Scrum
- The burndown charts make it clear whether or not the project is running according to schedule, and where exactly it is behind
- It is always clear who should be doing what
Give 3 drawbacks of scrum
- Integration is done after increments are built
- Assumes communication is always good enough
- Informal
Describe extreme programming (XP)
The customer is in the room as development happens. Pair programming, TDD and creative ownership are used. A whole version of the system is built every day
Pair programming
2 people per workstation. The pairs and tasks they work on switch periodically. There is no impact on efficiency but the error rate goes down
Creative ownership
Nobody is responsible for any certain bits of code, anyone can edit anything. The first people to finish their bit win - the others have to make sure their code works with it
Give 3 drawbacks of XP
- Coordination is difficult
- Sometimes the process can go on far too long
- Documentation is often neglected
What kind of projects is ‘heavyweight’ better suited to?
Projects where requirements can be well predicted. This allows a detailed plan to be made early on
When is ‘agile’ development used?
For projects that must react to rapid changes. For high priority projects that must produce results quickly
What is the key difference between object oriented programming (OOP) and procedure oriented programming (POP)?
With POP the program is split into processes, and with OOP it is split into objects
Properties (of a class)
A collection of attributes
Class
Object construct, made up of properties
Instantation
Method of using a class
Base class
The highest level of a set of classes
Member function
Function inside a class
Encapsulation
How class properties can be inaccessible from the rest of the program
Public (properties of a class)
Visible to all
Protected (properties of a class)
Visible to a class and its subclasses
Private (properties of a class)
Only visible to their own class
Constructor
Public method with the same name as its class
Destructor
Method called when an object is deleted
Polymorphism
How functions can behave differently in different contexts (like inside or outside of a class)
Describe exploratory development
- starting point established from requirements
- first generation system created
- version evaluated and second generation produced
- system repeats until all specs met
- customer provides feedback
Give 3 agile methodolgies
- scrum
- extreme programming
- crystal
- Feature-driven development
- lean development
- Adaptive software development
heavyweight methodologies
- Predictive approach
- Comprehensive documentation
- Process oriented
- Tools oriented
Give 3 principles of agile development
- Deliver Early and Often to Satisfy Customer
- Welcome Changing Requirements
- Simplicity is Essential
- Face to Face Communication is Best
Give 3 factors for determining methodology
- Size of Team
- Requirement Changes Over Time
- Is a Comprehensive Communication Plan Required
- Is Contract Integral to Defining Relation with Customer
List the Scrum development framework
- Scrum Roles
- Product Backlog
- Sprint Planning
- Sprints
- Daily Scrum
- End of Sprints
- Repeat
Function Overloading
program defines two or more functions with the same name and in the same scope. Each function has a unique signature.
Agile methodologies
- Individuals and interactions
- working software
- Customer collaboration
- Responding to change