1.2 Software and Software Development Flashcards
How is the operating system loaded to RAM
The boot loader in ROM loads the Operating System into RAM
What does the operating system do?
communicates between the hardware and (the user and the software)
Provides an interface for the users
What are the functions of the operating system
User interface
Memory management
Interrupt handling
Processor scheduling
What is the purpose of the user interface
Gives user an intuitive way of interacting with computer that more people can understand
What is the purpose of memory management
Allows for the managing of the space in RAM so that all desired programs can be loaded to RAM at once
How does paging work?
Available memory is divided into fixed chunks called pages, each with an address. When a process is loaded into RAM is allocated sufficient pages that are necessarily contiguous
How does segmentation work?
Available memory is divided into chunks of variable length called segments. Segments often relate to part of a program, e.g. a function is stored in one segment
What is virtual memory?
The process of allocating space on the hard drive to hold some of the pages of a current process until they are needed to free up space in memory
What is disk thrashing?
Slow down of a computer caused by very frequent transfers of pages between RAM and virtual memory.
What are interrupts
Temporary halts in the fetch - execute cycle to deal with a problem that has appeared to do with the running of the computer.
What is the need for interrupts
To deal with problems or things that need attention that have arisen in the computer
What are some examples of interrupts
An I/O device sends an interrupt signal
The printer runs out of paper
An error occurs in a program
A scheduled interrupt from the internal clock
Power failure
When does the CPU acknowledge an interrupt?
At the end of each fetch-execute cycle
What happens when an interrupt is acknowledged
Control is handed over to the ISR (Interrupt Service Routine)
What happens when control is handed to the ISR
Current process is pushed to stack.
What is interrupt priority
The ability of one interrupt to interrupt another if it is more important
What happens when a higher order interrupt is received by the ISR
Current interrupt is pushed to stack
What is processor scheduling?
The process of the CPU scheduling how much processor time is dedicated to different task
What is the purpose of processor scheduling
To provide an acceptable response time to all users
To maximise the time the CPU is usefully engaged
To ensure fairness on a multi-user system
How does Round Robin scheduling work
Run each process for its time slice, After each time slice, move the running process to the back of the queue
How does first come first served scheduling work
The first job to arrive is executed until it completes
How does shortest remaining time scheduling work
The time to completion is estimated as each new
job arrives
The job with the shortest remaining time to completion is executed, meaning that a shorter new job can take over from the current process
How does shortest job first scheduling work
As with shortest remaining time, the total execution time of each job is estimated by the user
The waiting job with the smallest total execution time is executed when the current job completes
How does multi level feedback queues scheduling work
Multiple queues are created with different
priority levels
If a job uses too much CPU time it is moved to a lower priority queue
Processes can also be moved to a higher priority queue if they have waited a long time
What is a distributed OS
One that can coordinate the processing of a single task across multiple computers. A program can use data or resources from any of the computers
What are the advantages and disadvantages of distributed OSs
As: The user can access more computational power with the illusion of working with a single processor
No need for training or writing programs differently
Ds: The programmer has no control over the task distribution
What is a multi-tasking operating system
One that can appear to do more than one task simultaneously on a single processor
What is a multi-user operating system?
One that uses a very powerful computer called a mainframe which lots of users with their own terminals access the mainframe’s CPU and each gets a time slice
What is embedded operating systems
One that’s user interface is simple and minimal with minimal features with limited RAM. Application programs are held in ROM.
Usually found in specific devices like washing machines
What is a real time operating system
One that must respond extremely quickly to inputs and cope with many inputs simultaneously.
When are real time operating systems used
Safety critical environments
If a hardware component fails, the OS must have a failsafe to detect this and respond appropriately
There is hardware redundancy - crucial components are duplicated in case one fails
What does BIOS stand for
Basic Input Output System
Where is BIOS stored
ROM
What does BIOS do
Boots computer at start-up
-initializes and tests hardware
-Loads operating system into RAM
What is a device driver
A program that allows the OS to control a certain hardware device. They are hardware dependent and OS specific
Why are device drivers useful
Os does not need to know the specifics of the hardware to be able to interact with it
What is a virtual machine
Software that is used to emulate the function of a machine
What may a virtual machine be used for
Executing intermediate code (e.g. java bytecode)
Running an OS within another
What is application software?
Software that allows a user to preform a specific task
What are some examples of application software
Word Processor
Spreadsheet
Database
Presentation
Web Browser
Image Editing
What are the different types of application software
General purpose
Special purpose software
Bespoke software
What is general purpose application software
Software designed for many purposes e.g. a word processor
What is special purpose application software
Software designed for a specific task or set of tasks
What is utility software
Software which focuses on the maintenance or administration of a part of the system
List some utility software
Encryption
Defragmentation
Data compression
File Managed
Backup software
Anti-virus
Firewall
What does encryption software do
Software that makes data un-accessible to anyone but specific users or systems. Aids in security
What does antivirus software do?
Scans through the computer system looking for files that are infected. Destroys or isolates the virus infected files to stop damage being caused
What does a firewall do?
Uses ports to deny or allow access of a computer to outside sources
What does disk fragmentation do
Reorganizes where pieces of data are on a hard disk so the pieces of data are next to ones of the same program
What does compression software do
Reduces file size by storing data in a less data consuming format, freeing up space on the hard drive
What does a file manager do
Allows files and directories to be moved, copied, deleted and renamed. Also enables the user to view directory contents
What does backup software do
Archives files onto removable media if the original copy is lost the data is still available
What is a full backup
All files are backed up - usually done on the first backup only.
What is a incremental backup
Only new files or ones that have changed since the last backup are saved in order to save time
What is open source software?
Software that can be freely used, modified, and shared.
What is closed source software
Software whose source code is not available to the user and can not be modified. Often costs money
What are the advantages and disadvantages of Open-Source Software
As: Free, modifiable, if has a large community bugs will often be fixed quickly
Ds: Often no official support, bugs slow to fix with small community
What are the advantages and disadvantages of Closed Source Software
As: Full support and documentation from creators, code often higher quality and bugs fixed quickly
Ds: Often costs money, unmodifiable
Difference between proprietary software and Freeware
Both Closed source but proprietary costs money while freeware is free
What is a translator
Coverts code from one form to another, e.g. a high level language to a low level language
What is assembly language?
It is an alternative to machine language. Instead of using binary numbers for instructions, assembly language uses short words that are known as mnemonics. Assembly language is hardware specific
What is an assembler
Translates assembly code instructions into machine code
What is a compiler?
Translates source code in a high level language to executable machine code all at once as a whole program
What is an interpreter
Translates source code into machine code line by line
Benefits of a compiler
Program can be run many times without the need to recompile
Faster to execute
Executable code does not need an interpreter to run
Compiled code cannot be read by others
Produces standalone executable file
Benefits of an interpreter
Source code can be run on any machine with interpreter
If a small error if found whole program doesn’t need to be recompiled
Source code only needs writing once
Useful during debugging
Disadvantages of a compiler
Hard to fix bugs
Writing programs is more complex
Hardware specific
Compile times may be slow
Disadvantages of an interpreter
Programs run slowly
The user has to wait for the line translation as well as the execution
In a loop the same lines may need translating repeatedly
An interpreter needs to be installed
Developers can view the source
What are the stages of compilation
Lexical analysis
Syntax analysis
Code generation
Optimisation
Compilation
Linker
What is done during lexical analysis
All white space removed
Keywords, constants and identifiers are replaced with tokens (assigned using a symbol table)
What is a symbol table
A data structure built up by a lexer that assigns certain variable, procedure or constant names to an token
What is syntax analysis
The process of splitting the stream of tokens into phrases, parsing them and recording the error if they are invalid
What is parsing
The checking of phrases against the rules of the languages
What is semantic analysis
Checks if syntactically correct statements are logically correct and can actually work in the program
What is code optimization
The removal of redundant instructions and replacement of inefficient code
What are some programming paradigms
Procedural - e.g. python
Object-oriented - e.g. java
Declarative - e.g. SQL
Functional - e.g. Haskall
What kind of paradigms are procedural and object oriented
Imperitive
What is a programming paradigm
The main design philosophy of a programming language that influences the features they have in them. Used to classify languages
What is the purpose of having different programming paradigms
Some paradigms are more suited to certain kinds of problem and thus help to make the solution easier to find
What is imperative programming
Languages which consist of a series of instructions that tell the computer how to solve the problem
What is declarative programming
Statements describe the problem that is to be solved but not how to solve it. The language implementation then finds the best way to solve it. Can solve fewer problems than imperitive
What is procedural programming
Programming where instructions are given in a sequence with selection used to control program flow as well as iteration. Programs are broken into blocks
What is object oriented programming
A style of programming that r represents a program as a system of objects. Each object has its own methods and attributes. Objects interact with each other and all processing is done by objects.
What is a class
A template from which objects are created
What is an object
An instance of a class
What is a method
A subroutine only accessible by an object of the class which that method belongs too
What is an attribute
A variable of an object that is only accessible
through the use of the methods of that class
What is encapsulation?
Wrapping attributes and methods into a single entity called a class that are only accessible by an instance of that class using certain methods.
What is inheritance?
The process of having a class inherit the objects and attributes of another while being able to add things while not affecting the original class
What is polymorphism?
The redefinition of the methods of a parent class in a child class to suit the child class better
What is immediate addressing
The operand holds an actual value
What is Direct addressing
The operand holds the address of the value
What is indirect addressing
The operand holds the location holding the address of the value
How is an assembly language statement composed
Opcode + Operand
In LMC, What is the mnemonic for Load and what does it do
LDA, loads value at specified location into ACC
In LMC, What is the mnemonic for Store and what does it do
STA, Stores value in ACC into specified location
In LMC, What is the mnemonic for Add and what does it do
ADD, Adds number at specified location to number in ACC
In LMC, What is the mnemonic for Subtract and what does it do
SUB - Subtracts value of specified location from value in ACC
In LMC, What is the mnemonic for Input and what does it do
INP - gets user input and stores it in ACC
In LMC, What is the mnemonic for Output and what does it do
OUT, outputs value in ACC
In LMC, What is the mnemonic for END and what does it do
HLT - ends program flow
In LMC, What is the mnemonic for Branch if 0 and what does it do
BRZ - changes to specified line of code if value in ACC is 0
In LMC, What is the mnemonic for Branch if positive and what does it do
BRP - changes to specified line of code if value in ACC is positive
In LMC, What is the mnemonic for Branch always and what does it do
BRA - changes to specified line of code
In LMC, What is the mnemonic for Data storage and what does it do
DAT - assigns specific location in memory for storage of calculations
What are the stages of software design (5)
Analysis
Design
Implementation
Evaluation
Maintenance
What is done in the analysis stage
A systems analyst gathers information about:
What the current system does
What the new system needs to do
How might a systems analyst gather information
Interview
Questionnaires
Observation of how the current system works
Looking at existing documentation
What is the output from the analysis stage
A document that defines what the system will do, but not how to do it
What is involved in the design stage
The problem is decomposed
A model of what needs to be developed is made
What is included in the software design (6)
A description of the data(data type, format, validations)
Data base design
Input screens
Output screens and reports
How the data will be processed
How the software will be tested
What is involved in implementation (3)
Programming
Testing
Documentation
Installation
What are the different types of testing and what do they involve (3)
Unit testing(black/white box) - individual modules
Integration testing - ensures modules work together
Destructive testing - causes a program to fail
What is black box testing?
Testing carried out independently of the code
Fed input and outputs compared to desired outcome with no regard to how the code gets those outcomes
What is white box testing?
Tests are devised which test each path through the code at least once.
What is alpha testing?
Testing carried out once the program is free from obvious bugs by the software developer’s in house and by the user. Can reveal errors or things that don’t line up with what the user wants
What is beta testing?
Testing carried out by a number of potential users who agrees to use the software and report any faults
What are the different kinds of test data (5)
Valid normal data
Valid boundary data
Standard incorrect data
Standard invalid data
Extreme invalid data
What are the different parts of a test plan (6)
Test number
Test title
Explanation of test
Test data
Expected result
Actual result
What are the two types of documentation
Technical documentation
User documentation
What is included in technical documentation (3)
Code descriptions
Modules
Functionality
What is user documentation?
A manual explaining how to use the system
What is involved in evaluation?
Finding if it all work by:
Evaluating it against the original specification documentation
User testing every aspect to see if it works like they want it to
What are the types of maintenance (3)
Corrective maintenance
Adaptive maintenance
Perfective maintenance
What is corrective maintenance
Fixing any bugs that were missed before release
What is adaptive maintenance
Involves making alterations to respond to changes in the demands
What is perfective maintenance
Improving the software to enhance its performance that was not thought of in the original Design
What are the different software development lifecycles
Waterfall
Agile
Extreme
Spiral
Rapid application development
Describe the waterfall model
Linear approach where each stage of development is done consecutively where the customer does not see the product until it is completed
What are the advantages of the waterfall model (4)
Simple
Each stage is separate and self contained with well defined outcomes and written documentation
Easy to manage
Responsibilities clear at each step
What are the disadvantages of the waterfall model (4)
Not much user involvement after analysis
Carries a lot of risk
No working software produced until late on
If software is not what user wants it is usually to late to make changes
When to use Waterfall Model
Requirements are clear and fixed
No ambiguous requirements
Technology is well understood
Project is short
Describe the spiral model
Four basic steps of analysis, design, implementation and evaluation are repeatedly done.
Advantages of the spiral model (5)
Easy to manage
Software produced at early stage so problems and issues identified early
User gives feedback on each prototype so required changes can be made early
Functionality can be added during the process
End result is more likely to be what the user wants
Disadvantages of the spiral model (3)
Time consuming
More costly to develop
Not suitable for smaller projects
When to use the spiral model
For medium to high risk projects
When users are unsure of their needs
When the requirements are complex
For very large projects over many years
Describe the agile model.
Software is developed in rapid incremental cycles
Each version builds on previous functionality
Each version is tested before release
Advantages of the agile model (4)
Rapid continuous delivery of useful software leads to customer satisfaction
Customer feedback is constantly gotten
Software is easily adapted at any stage
Working software delivered frequently
What are the disadvantages of the agile model
Lack of emphasis on necessary design and documentation
Project can fail if customer not clear about desired outcome
Not suitable for novice programmers
When to use the agile model
When new changes need to be implemented
In an expanding or developing business where needs are constantly changing
What is Extreme Programing?
A type of agile development that advocates frequent releases in short development cycles to improve productivity
What is Rapid Application Development?
A software development method where workshops and focus groups used to gather requirements and prototyping is continually used to refine the system. Each part of the system is produced within a strict time limit.
When to use rapid application development
When requirements are not entirely clear
When end project needs to have excellent usability
When the user needs to be highly involved in development