1.2 Software and software development Flashcards
Types of software and the different methodologies used to develop software
Waterfall Cycle
Definition - Sequential software development process divided into distinct phases. Each phase must be completed before the next one begins.
Steps:
1. Analysis
2. Design
3. Implementation
4. Evaluation
5. Maintenance
Merits:
- Straightforward to manage as when each step is completed it is called a milestone, these allow progress to be easily assessed by both the team and the customer.
- Clearly documented so that it can be reviewed so future developers can see what worked and what didn’t.
Drawbacks:
- Lack of flexibility as steps cannot be reversed during development.
- No risk analysis so is therefore not suitable for high risk projects
- Limited user involvement, client does not know exactly what they want at the beginning of the project.
Uses:
Low risk projects which need little input such as a piece of general purpose software.
Agile Methodologies
Definition - Collection of methodologies which aim to improve the flexibility of software development.
Steps:
1. Analyse requirements
2. Design prototype.
3. Build prototype
4. User feedback
5. Refine prototype (Going back to designing).
6. Final product
Merits:
- Produces high quality code
- Flexible to changing requirements
- Regular user input.
Drawbacks:
- Poor documentation.
- Requires constant interaction between user and programmer.
Uses:
Small to medium projects with unclear initial requirements.
Extreme Programming (XP)
Definition - Example of an agile model where the development team consists of a pair of programmers alongside a representative end user.
The model is built on ‘user stories’
- System requirements are specified by the end user.
- Paired programming produces high-quality code and programmers work no longer than 40 hours in a week.
Merits:
- Produces high quality code.
- Constant user involvement means high usability.
Drawbacks:
- High cost of 2 people working on one project.
- Teamwork is essential.
- End user may not be able to be present.
Uses: Small to medium projects with unclear initial requirements requiring excellent usability.
Spiral model
Built on 4 key stages with the focus of effectively managing risk-heavy projects.
- Analysing system requirements.
- Pinpointing and mitigating risks.
- Development, testing and implementation.
- Evaluating to inform the next iteration.
If project is found to be too risky at any point, the project is then terminated. However hiring risk assessors to analyse the risks involved can be very expensive which therefore makes this project suitable to large-scale ones with high budgets.
Merits:
- Thorough risk analysis and mitigation.
- Caters to changing user needs.
- Produces prototypes throughout.
Drawbacks:
- Expensive to hire risk assessors.
- Lack of focus on code efficiency.
- High cost due to constant prototyping.
Suitable for large scale projects with high budgets.
Rapid Application Development (RAD)
- Iterative methodology which uses partially functioning prototypes which are continually built upon.
- User requirements are initially gathered using focus groups and used to develop and ‘incomplete’ version of the solution which is given to the user to trial.
- User feedback is then used to generate the next improved prototype and this continues until the prototype matches the requirements of the end users at which point it becomes the final product.
Merits:
- Caters to changing user requirements.
- Highly usable finished product.
- Focus on core features, reducing development time.
Drawbacks:
- Poorer quality documentation.
- Fast pace may reduce quality time.
Uses: Small to medium, low budget projects with short time frames.
Qualities of algorithms
- Inputs must be clearly identified - what is valid and what is invalid.
- Must always produce a valid output for any defined point.
- Must be able to deal with invalid points.
- Must always reach a stopping condition.
- Must be well documented for reference.
- Must be well commented so modifications can be easily made.
Problems solved by algorithms
- Internet related algorithms: Manage and manipulate the huge amount of data stored on the internet.
- Route finding algorithms: Finds best route to transmit packets from A to B over a network.
- Compression algorithms: Compress data files so that they can be transmitted quicker or placed in smaller storage place.
- Encryption algorithms: Encrypt sensitive data so that if it is intercepted, it cannot be read.
Testing Methods:
- Alpha Testing - carried out in house by software development teams within the company. Bugs are pinpointed and fixed.
- Beta testing - carried out by end users after alpha testing has been completed. Feedback from users is used to inform the next stage of development.
- White box testing - carried out by software development teams in which the test plan is based in the internal structure of the program. All the possible routes through the program are tested. Also called structural testing.
- Black box testing - software is tested without the testers being aware of the internal structure of the software and can be carried out by both within the company and by the end users The test plan traces inputs and outputs within the software. Also known as functional testing.
Functions of an Operating System
What the OS does: Provide interface between the user and the Hardware.
Functions:
Resource Management/multitasking:
- When more than one program is running at the same time, the processor allocates a small amount of time to each processor and cycles between them.
- As this happens so quickly, it appears as if multiple programs are executing simultaneously.
File Management:
- Because data is stored in files, an extension to the filename will tell the OS which application to load the file into. E.g., xlsx, pptx, docx.
- The OS may present a logical structure of files into folders and allow the user to rename, delete, copy, and move files.
User Management/Security
- User management - allows multiple users to log into the same computer.
- The OS will retain settings for each user such as icons and backgrounds.
- Each user may have different access rights to the files and the programs.
- In a client server network, it may impose a fixed or roaming profile for a user and manage login requests to network.
Paging
Memory is split up into equal sized sections known as pages with programs being made up of a certain number or equally-sized pages. These can then be swapped between main memory and the hard disk as needed.
Segmentation
Splitting up the memory into logical sized divisions, known as segments, which vary in size. These are representative of the structure and logical flow of the program, with segments being allocated blocks of code such as conditional statements (IF) or loops (WHILE)
Virtual Memory
Uses a section of the hard drive to act as RAM when the space in the main memory is insufficient to store programs being used. Sections of the program that are not currently in use are temporarily moved into the virtual memory through paging, freeing up memory for other programs in RAM.
Interrupts and Interrupt Service Routine
Interrupts - Signals generated by software or hardware to indicate to the processor that a process needs attention.
- Different types of interrupts have different priorities and how urgen they are must be taken into account by the OS when allocating processor time.
- Interrupts are stored in order of their priority within an abstract data structure called a priority queue in a special register called the interrupt register.
- It’s the job of the OS to ensure interrupts are serviced fairly by the processor through the Interrupt Service Routine.
- Examples of interrupts: printer signalling completion of printing, peripheral signalling power failure.
INTERRUPT SERVICE ROUTINE (ISR)
- Processor checks the contents of the interrupt register at the end of each FDE cycle.
- If an interrupt exists that is of higher priority the current contents of special purpose registers in the CPU are temporarily transferred into a stack.
- Processor then responds to the interrupt by loading the appropriate ISR into RAM.
- Flag is set to signal the ISR has begun.
Once interrupt has been serviced:
- The flag is reset, interrupt queue is checked again for further interrupts of high priority to the executed process.
Sheduling Algorithms
Scheduling - function of the OS which ensures all sections of programs being run receive a fair amount of processing time.
Scheduling algorithms can be:
- Pre-emptive: Jobs are actively made to start and stop by OS. E.g., Multilevel feedback queues, Shortest Time Remaining, Round Robin.
- Non pre-emptive: Once a job is started, it is left alone untl it’s completed. E.g., First Come First Serve, Shortest Job First.
Round Robin
- Each job is given a section of processor time - known as a slice - within which it is allowed to execute.
- Once each job in the queue has used its first time slice, the OS again grants each job an equal slice of processor time.
- This continues until a job has been completed, at which point it is removed from the queue.
- Although Round Robin ensures each job is seen to, longer jobs will take a much longer time for completion due to their execution being inefficiently split up into multiple cycles.
- This algorithm also doesn’t take into account job priority.
First come first served:
- Jobs are processed in chronological order by which they entered the queue. Although this is straightforward to implement, FCFS doesn’t allocate processor time based on priority.
Multilevel feedback queues:
- This makes use of multiple queues, each which is ordered based on a different priority.
- This can be difficult to implement because deciding whihc job to prioritise based on a combination of priorites.
Shortest Job First:
- Jobs will be prioritised based on how long it takes to execute them.
- Usually suited to batch systems, where shorter jobs are given preference to minimise waiting time.
- However, it requires the processor to know how to calculate how long each job will take, which sometimes isn’t possible.
- Also the risk of processor starvation (paticular process doesn’t receive enough processor time in order to be excecuted and completed.)for longer jobs if short jobs are added to the queue.
Shortest remaining time:
- Jobs with least time to completion will be serviced first.
- However could cause processor starvation for longer jobs if short jobs are added to the queue.
Types of Operating Systems
Distributed:
- Type of OS which runs across multiple devices, allowing load to ve soread across multiple computer processor when a task is run.
Embedded:
- Built to perform small range of specific tasks. - Catered towards a specific device, limited in their functionality, and hard to update. - -
- Although they consume less power than other types of OS.
Multi-tasking:
- Enables users to carry out tasks simultaneously using time slicing to switch quickly between programs and applications in memory.
Multi-user:
- Multiple users make use of one computer, typically a supercomputer within a multi-user system.
- Therefore, a scheduling algorithm must be used to ensure processor time is shared fairly between jobs.
- Without suitable scheduling algorithm, there is a risk of processor starvation.
Real Time
- Commonly used in time critical computer systems, a real time OS is designed to perform a task within a guaranteed time frame.
- E.g., nuclear power stations or self-driving cars.