1.2 Software Flashcards
What is Basic Input Output System (BIOS)?
Program that loads the OS from hard drive/ secondary storage memory to RAM when computer is turned on after checking to see if system hardware works
What are device drivers?
A program that allows the OS to control and communicate with the device
What is a distributed operating system?
The OS is spread over multiple computer servers on a network, acting as a single system to parallel process a job
What is a embedded operating system?
A specialised operating system built in to control a single machine
First come first served?
A scheduling algorithm where processes are dealt with in the order they arrive (a queue)
What is intermediate code?
Partially compiled code designed for a virtual machine
What are interrupts?
A signal to alert the CPU. Higher priority than the current task, the current is paused and finished after the interrupt
What is the Interrupt Service Routines (ISR)?
If interrupt is of higher priority, register contents are temporarily transferred onto the system stack at the end of the current FDE cycle and the interrupt is handled
What is Memory Management?
The efficient organisation and allocation of main memory to the programs in use
What is the Multi-level Feedback Queues?
A scheduling algorithm that uses multiple queues, each with a different priority
Jobs can be moved between queues
What is the Multi-tasking Operating Systems?
An OS capable of running multiple tasks simultaneously
What is the Multi-User Operating Systems?
An OS consisting of one mainframe computer with multiple terminals that allow multiple users to access the computer’s resources
What happens with the mainframe processor in a Multi-User OS?
Each user is given a time slice of the mainframe processor
What is an Operating System (OS)?
A set of programs managing the operation of the computer, it bridges the user to the hardware
What is Paging?
Partitioning memory into fixed sized physical divisions called pages
What is a Real time OS?
An OS where data is processed as it comes, with responses generated with a guaranteed timeframe
What is the Round-Robin algorithm?
Each process is given an equal time slice and is dealt with on a FIFO basis, if not done in time slice, added to the end of the queue
What is scheduling?
Allocating processor time to each application to ensure processor time is used as efficiently as possible when multitasking
What is Segmentation?
Splits memory into variable sized logical divisions called segments
What is the shortest job first algorithm?
It picks the process with the shortest estimated running time and runs it until it is finishes
What is the shortest remaining time scheduling algorithm?
It picks the process with the shortest estimated time remaining to finish, switches to one if added is shorter
What are virtual machines?
Any instance where software is used to take on the function of a machine, including intermediate code or running an operating system within another
What is virtual memory?
An allocated area of secondary storage where pages/segments of inactive jobs are swapped into to free up enough RAM for the current job
What are applications?
A program that can be run on a computer, allowing the user to carry out specific tasks
What is an Assembler?
A translator in low level language, which converts assembly language into machine code
What is a closed source software?
Source code is not available to users, software has a licence and how to use it
What is code generation?
Final stage of compilation, equivalent machine code program is produced
what is compilation?
Taking high level language source code and converting it into machine code
What are compilers?
A translator that converts high level language to machine code all at once
What are Interpreters?
Translator that checks the source code line for line for syntax errors, translates to machine and executes the line
What is Lexical Analysis?
The first stage of compilation, where extra spaces and comments are removed from the source code and it is searched for simple errors
What happens to keywords, constants and variables in lexical analysis?
Replaced by tokens, variable names are loaded into a symbol table which correspond to the tokens
What are libraries?
A collection of pre-compiled programs that can be loaded into a program and run whenever
What is a linker program?
Takes object code, combines with libraries and modules to create an executable file
What is an Open Source software?
Source code is freely available to view, redistribute or modify
What is Optimisation?
During code generation, object code is made efficient as possible by removing redundancies
What is Syntax Analysis?
The 2nd stage of compilation, where statements, expressions and tokens are checked for syntax errors using syntax diagrams
What is a loader program?
Program that loads the executable object program and its associated libraries into the memory before it is run
What is a translator?
A program which converts code from one computer language to another
What are Utilities (System Software)?
Maintenance such as optimising the performance of the computer, diagnosing issues, backing up files, setting up firewalls, etc.
What are the Agile Methologies?
An iterative process that produces a prototype after each sprint, each prototype is user tested and feedback is accounted for in later sprints
What are the 5 software development cycles?
Agile methodology
Extreme Programming (EXP)
Rapid Application Development (RAD)
Spiral Modell
Waterfall Lifecycle
What is Extreme Programming?
An agile methodology with short development cycles and very frequent software releases, checkpoints allow new user requirements
What is Rapid Application Development (RAD)?
A method that has repeated prototyping, evaluations and strict time limits
The user will quickly receive a reduced-functionality mock up of the program
What is the Spiral model?
An iterative version of the waterfall lifecycle where stages are refined and repeated until the final product is complete, each cycle produces a prototype
What is the Waterfall Lifecycle?
Each stage of development is completed one at a time in a linear order, if an earlier stage is to go back to, ones in between need to be redone
What is Assembly Language?
A low level language that uses mnemonics for instructions
What are Attributes?
Data recorded as a variable associated with an object
What are classes?
A template defining the attributes and methods that can be used to create a type of data known as an object
What is Direct addressing?
The simplest addressing mode in assembly language where the operand stores the memory address of the value to be operated on by the operator
What is Encapsulation?
Encapsulation in object-oriented programming is the practice of bundling attributes (data) and methods (functions) together within a class
What does encapsulation ensure
Using encapsulation ensures that data remains secure and is not accidentally modified or misused by controlling access to them using access modifiers (e.g., public, private)
What is Immediate addressing?
Where the data in the address the field is constant and the operand is the value to be operated on by the operator
Where are all of the types of addressing found?
They are all modes in assembly language
What is Indirect addressing?
Where the operand stores the address of the location holding the memory address of the required data
What is Inheritance?
The concept of subclasses inheriting the methods and attributes of its parent class (a.k.a its super class)
What are Methods?
Subroutines that represents an action an object can perform
What are Object-Oriented Languages?
Where the code is made of objects, which are instances of a class, objects have their own attributes and methods
What are Objects?
An instance of a class
What is Polymorphism?
Polymorphism allows objects to take on different forms or behaviours under the same name
What are Procedural Languages?
A high level language where code is grouped into subroutines and have built in data types and structures
What are Programming Paradigms?
A style of computation and programming, chosen according to the problem at hand
What are the 4 types of addressing used in assermbley language?
Indexed addressing
Indirect addressing
Immediate addressing
Direct addressing
What are the 8 essential features an Operating System provides?
Memory management
Resource management
File management
Input/Output management
Interrupt management
Utility software
Security
User Interface (UI)
In paging, Why is each program separated into equally sized pages?
These can then be swapped between main memory and the hard disk as needed
Segmentation, virtual memory and Paging, what is a key issue that all of are the 3 techniques?
Disk Thrashing
What is Disk Thrashing?
When the computer ‘freezes’ and occurs as a result of pages being swapped too frequently between the hard disk and main memory
How does the ISR work?
A flag is set when ISR starts, flag is reset when interrupt has been finished, checked for priority, then carries on with the FDE cycle
What are the 2 scheduling algorithms?
Pre-emptive
Non pre-emptive
What is a Non pre-emptive scheduling algorithm?
Once a job is started, it is left alone until it is completed
Examples of a pre-emptive scheduling algorithm?
Multilevel Feedback Queues
Shortest Remaining Time
Round Robin
Examples of a Non pre-emptive scheduling algorithm?
First Come First Served
Shortest Job First
What is a pre-emptive scheduling algorithm?
Jobs are actively made to start and stop by the OS
What is Processor starvation?
When a particular process does not receive enough processor time in order to execute and be completed
What is the name given to the program that loads the operating system from the hard disk into main memory?
Bootstrap/bootloader
What are the positives and negatives of using Multilevel feedback Queues for scheduling?
+ve - Service most urgent interrupts first
-ve - Hard to implement
What are the 3 functions of the CPU?
Power-on self test
Checking the CPU clock, memory and processor
Testing for external memory devices
What is POST in terms of the BIOS?
Power-on self test which ensures that all hardware is correctly connected and functional
When may Virtual machine be used?
Testing programs
Protection from malware
Running software compatible with different OS
Why is the BIOS critical to the computer system?
Only after these checks are completed that the operating system can be loaded into RAM from the hard disk
After the computer is switched on, How does the Program Counter register help next?
The Program Counter register points to the location of the BIOS
When are virtual machines commonly used?
To create a development environment for programmers to test programs on different operating systems
What are the positives of using intermediate code in virtual machines?
Saves both the time and money of having to purchase multiple devices solely for testing
What are the negatives of using intermediate code in virtual machines?
It is considerably slower compared to running low-level code on the device it was designed for
What other software does applications software depend on?
System Software
What are system software?
Low-level software that is responsible for running the computer system, interacting with hardware and generally providing a platform for applications software to run
What are the 5 examples of Utilities?
Compression
Disk defragmentation
Antivirus
Automatic updating
Backup
What is compression?
An OS that provides utilities that enable files to compressed and decompressed, used for larger files that need to be transmitted across the internet
What is Disk defragmentation?
Rearranges the contents of the hard drive so they can be accessed faster, thus improving performance.
What is Antivirus?
Antivirus is responsible for detecting potential threats to the computer, alerting the user and removing these threats.
What is Automatic updating?
Ensures the OS is kept up to date, with any updates being automatically installed when the computer is restarted, making them less vulnerable to hacking
What is Backup?
The backup utility automatically creates routine copies of specific files selected by the user
What are the advantages of open source?
Can be modified and improved by anyone, technical support from online community, can be modified and sold on
What are the disadvantages of open source?
Bad online support
No user manuals
Lower security
What are the advantages of closed source?
High levels of security
Expert support and user manuals
Well-tested updates
What are the disadvantages of closed source?
Restricted numbers on software
Users cannot modify and improve software themselves
What elements should a user consider when choosing either open or closed software?
- Costs - implementation, maintenance, training of staff, license
- Functionality - features available, ease of use
- The suitability of the software to the task they will be using it for
What are the 4 stages of compilation?
Lexical Analysis
Syntax Analysis
Code Generation
Optimisation
What is the difference between high and low level language code?
High level code is understood by programmer, not computer
Low level code can be executed by a computer but cannot be directly understood
What is machine code also known as, and vice versa?
Object code
What are the 3 types of translators?
Compiler
Interpreter
Assembler
Which translator initially takes the shortest amount of time?
Intepreter but once code is compilhave to be doesnt to be compiled every time but intepreter does??????
The compiler is the fastest translator but why the slowest if changes to the code are made?
The whole program must be recompiled
What do Compilers produce?
Intermediate code or machine code
What are the advantages of using compiled code over interpreted code?
Faster to execute
Does not require compiler to run
What are the advantagesos using interpreted code over compiled code?
Is platform independent - more portable
Runs instantly without time waiting for compilation
Useful for debugging
What are the similarities between static and dynamic linkers?
Similarities: Both link external modules and libraries to main program
What are the differences between static and dynamic linkers?
Static: Library code copied into the file. File size increased
Dynamic: Addresses of libraries included within file. External updates automatically feed through to main program
What are some advatages of using libraries?
Error-free
Save time
Reusable
No need to ‘reinvent the wheel’
Designed by experts
What are the advantages of the waterfall lifecycle?
- Straightforward to manage
- Clearly documented
-Doesn’t need much customer involvement allowing programmers to crack on
What are the disadvantages of the waterfall lifecycle?
-Lack of flexibility (new ideas cannot be included)
- No risk analysis
- Limited user involvement
-Efficient code not prioritised and software not produced till late
When is the Waterfall Lifecycle used?
Simple projects when requirements do not change
First stage of waterfall model
System and Software requirements. Documenting requirements gathered from questionnaires, etc
Second stage of waterfall model
Feasibility – is it technically viable, economical, legal? How effective the project will be in solving the problem? Can it be done in time?
Third stage of waterfall model
White/black box, alpha/beta, performance etc
Fourth stage of waterfall model
Installation, migration, support, and maintenance e.g. corrective, perfective, adaptive maintenance (to keep a software product usable in a changed or changing environment)
What are the advantages of Agile?
- Produces high quality code
- Flexible to changing requirements
- Regular user input
What are the disadvantages of Agile?
- Poor documentation
- Requires consistent interaction between user and programmer
When is Agile used?
Small to medium projects with unclear initial requirements
What are the advantages of Spiral?
- Thorough risk-analysis and mitigation
- Caters to changing user needs
- Produces prototypes throughout
What are the disadvantages of Spiral?
- Expensive to hire risk assessors
- Lack of focus on code efficiency
- High costs due to constant prototyping
When is Spiral used?
Large, risk-intensive projects with a high budget
What are the advantages of RAD?
- Caters to changing user requirements
- Highly usable finished product
- Focus on core features, reducing development time
What are the disadvantages of RAD?
- Poorer quality documentation
- Fast pace may reduce code quality
When is RAD used?
Small to medium, low-budget projects with short time-frames
What are the advantages of the Extreme programming?
- Produces high quality code
- Constant user involvement means high usability
-Sustainable pace which means less chance of tired programmers
What are the disadvantages of the Extreme Programming?
- High cost of two people working on one project (paired programming)
- Teamwork is essential
- End-user may not be able to be present
- Needs to be in the same geographical area
When is Extreme programming used?
Small to medium projects with unclear initial requirements requiring excellent usability. Critical systems in health care needing high quality code
What are the 7 common stages in software development life cycles (SDLCs)?
Analysis
Design
Development
Testing
Implementation
Evaluation
Maintenance
What is white box testing?
The test plan is based on the internal structure of the program, all of the possible routes through the program are tested
What is black box testing?
A form of testing where the software is tested without the testers being aware of the internal structure of the software
Who carry out black box testing
The company or contractors
What is TELOS?
It considers Technical, Economic, Legal and Operational aSpects of the project, as well as Scheduling, when testing the feasibility of the project
What are the advantages of First come first served (FCFS)?
Easy to implement with a FIFO queue
No swapping in and out so no overhead
What are the disadvantages of First come first served (FCFS)?
More important and quicker processes are neglected
Quick jobs may have to wait for a long job to complete
Average wait time FCFS (disadvantage)
Average waiting time may be long. The average waiting time under a FCFS policy is generally not minimal, and may vary substantially if the process burst times vary greatly
What are the advantages of Round Robin?
Avoids process starvation
What are the disadvantages of Round Robin?
-Can be inefficient if the processor is allocated to a process that is waiting for input or output eg printer to print.
-Overhead in swapping
Disadvantage of round robin in relation to what the performance depends on
the size of the time quantum selected. If the quantum is very large (infinite), RR is the same as FCFS.
What are the advantages of Shortest job first (SJF)?
SJF is optimal in that it gives the minimum average waiting time for a given set of processes and reduces number of small jobs waiting behing big jobs
What are the disadvantages of Shortest job first?
Problem is there is no way of knowing in advance exactly how long a job will take (guestimates are used).
Possible that longer jobs never get executed if shorter jobs keep coming in.
What happens if 2 jobs take the same time in shortest job first
If two jobs take the same time, FCFS is used to determine what goes next.
What are the advantages of Multi-level feedback queues?
A process that waits too long in a lower priority queue may be moved to a higher priority queue.
No prior knowledge of the job is needed.
How does multi level feedback queues make progress running long, cpu intensive workloads (advantage)
Fair and makes progress for long-running CPU-intensive workloads. For this reason, many systems including Windows operating systems use a form of MLFQ as their base schedule
What are the disadvantages of Multi-level feedback queues?
Moving the process around queue produces more CPU overhead.
How many queues should there be? How big should the time slice be per queue? How often should priority be boosted in order to avoid starvation?
What are programming paradigms?
Different approaches to sing programming language to solve a problem
What are the advantages of procedural programming?
Can be applied to a wide range of problems
Relatively easy to write and interpret
Which 2 broad categories are programming paradigms split into?
Imperative
Declarative
State a use of declarative programming.
Expert systems/knowledge-based systems
Artificial intelligence
What are the 4 main structures used in structured programming?
Sequence
Selection
Iteration
Recursion
How does assembly language differ from machine code?
Assembly language uses mnemonics rather than binary
One line in assembly language is equal to one line in machine code
What is the function of the opcode?
The opcode specifies the instruction performed and the addressing mode
What is the function of the operand?
The operand holds a value which is related to the data on which the instruction is to be performed
What are the disadvantages of Object oriented Languages?
Difficult different way of thinking
Not suited for all type of problems
Bad for smaller problems
What are the advantages of Object oriented Languages?
High level of reusability - inheritance and polymorphism
Easy to maintain and update
Higher-quality piece of software
What is Overriding in OOP?
Overriding is redefining a method within a subclass and altering the code so that it functions differently and produces a different output. takes priority over one with the same name in the superclass
What is Overloading in OOP?
Overloading is when mwthods behave differently depending on paremeters passed in
What does a class look like in pseudocode?
class Book:
private reserved
private onLoan
private author
private title
public procedure new(title,author,reserved,onLoan)
title = givenTitle
author= givenAuthor
reserved = givenReserved
onLoan = givenOnLoan
end procedure
public function set_reserved()
reserved=True
end function
end class
How to create a class?
myBook = new Book(‘Great Expectations’, ‘Charles
Dickens’,’False’,False’)
How to use a method from a class?
myBook.set_reserved()
What is a Setter to do with classes?
A setter is a method that sets the value of a particular attribute
What is a Getter to do with classes?
A getter is another special method used in OOP which retrieves the value of a given attribute
In LMC, what does ADD do?
Add the value at the given memory address to the value in the Accumulator
In LMC, what does SUB do?
Subtract the value at the given memory address from the value in the Accumulator
In LMC, what does STA do?
Store the value in the Accumulator at the given memory address
In LMC, what does LDA do?
Load the value at the given memory address into the Accumulator
In LMC, what does INP do?
Allows the user to input a value which will be held in the Accumulator
In LMC, what does OUT do?
Prints the value currently held in the Accumulator
In LMC, what does HLT do?
Stops the program at that line, preventing the rest of the code from executing
In LMC, what does DAT do?
Creates a flag with a label at which data is stored
In LMC, what does BRZ do?
Branches if value in ACC is zero only
In LMC, what does BRP do?
If value in ACC is zero or positive, branches
In LMC, what does BRA do?
Always branches
What is declarative programming?
Stating the desired result with the user abstracts the details about how to get there
When is declaritive programming used?
Common in expert systems and artificial intelligence
Functional and logical programs
What is a function?
A named block of code that performs a specific task and returns a value
What is procedural programming?
Type of imperative programming which uses a sequence of instructions carried out in a step-by-step manner, which are easy to write and interpret
When is declaritive programming used?
Procedural and Object-Oriented
What is a procedure?
A named block of code that performs a specific task that doesn’t return a value.
Stages of waterfall model in order.
Analysis, design, implementation, evaluation, maintenance
How many can you go back in waterfall model
1
Diagram for agile methodologies
How does XP use paired programming?
Work in pairs as one person will be programming and one will be testing to ensure efficient and working code
Diagram for spiral model
What is an interrupt
A sugbak truggered by a clock, peripheral device, or software program requesting services from the CPU
First stage of interrupt
CPU checks the interrupt line (on control bus) after each instruction is executed
Second stage of interrupt
If an interrupt is raised, the CPU suspends execution of the running program or process and disables all interrupts of a lower priority (hardware interrupts are usually higher priority than software interrupts)
Third stage of interrupt
It then puts the values of the program counter onto the system stack (LIFO data structure in memory) while an Interrupt Service Routine is called to deal with the interrupt.
Last stage of interrupt
Once the interrupt has been serviced, the original values of the registers are retrieved from the stack and the process resumes from the point that it left off.
Indexed adressing
Operand plus contents of the index register are used to form the address of the location to be used
What is an overhead
excess or indirect computation time, memory, bandwidth, or other resources that are required to perform a specific task.
When are real time processors used
Self driving cars or critical systems software for example in a hospital
dusadvantage of agile
Difficult to estimate resources as keep changing requirements
What is a lexeme
a sequence of alphanumeric characters.
What happens if a lexeme is valid
It becomes a token
What is semantic analysis
A stage of compilation (included in Syntax Analysis from OCR’s point of view) where the code is checked for logical errors e.g. attempting to assign a string literal to an integer (type mismatch), undeclared variables, multiple declaration, accessing an out of scope variable or out of bounds with an integer literal.
What is object code
The product of a compiler, usually machine code or intermediate code (e.g. Java Bytecode)
Where is a symbol table contructed and what does it do
A symbol table is constructed during lexical analysis of all the identifiers that are found (variable names, class names, subroutine names, etc.). See next slide.
Result of lexical analysis
The end result is a list/stream of tokens.
Advantage of intermediate code?
Programmers do not have to rewrite and recompile every program they code for different operating systems