Software and Software development 1.2 Flashcards
What is an operating system?
A collection of programs that provide an interface between the user and computer
Operating systems enable the user to communicate with the computer and perform tasks involving the management of computer memory and resources.
Give three functions of an operating system
- Memory management
- Security
- Resource management
- User interface
- Utility software
What are the similarities and differences between paging and segmentation
Both are used when RAM space is insufficient
Paging uses equal-sized sections called pages
Segmentation uses variable-sized logical sections called segments
What are the stages of compilation?
- Lexical analysis
- Syntax analysis
- Code generation
- Optimisation
What happens during lexical analysis?
- Whitespaces and comments are removed from the code
- The code is scanned for keywords, these are replaced with tokens and information about the token
Each keyword is stored in a symbol table
What happens during synax analysis
Tokens are analysed against the rules of the language, and if they break the rules they are flagged as a syntax error
What happens during code optimistaion?
The abstract syntax tree produced in the syntax analysis stage is used to produce
machine code
What happens during code optimisation?
Insigificant, redundant parts of the code are removed. the aim of it is to make the code faster to exceute, however this can increase compilation time.
Describe how virtual memory is used when there is not enough RAM
A section of the hard drive is used to act as RAM
Sections of programs not currently being used are temporarily moved into virtual memory through paging
This frees up memory for other programs in RAM
What is an Interrupt?
An interrupt is a signal that is sent to the processor to request attention
Explain the stages of the interrupt service routine ISR
- Interrupt register checked at the end of each F-D-E cycle
- If there is an interrupt with a higher priority the current contents of the register in the CPU are transferred into a stack.
- The relevant ISR is loaded into RAM
- A flag is set to signal the ISR has begun
- Flag is reset when ISR has finished
- The F-D-E cycle renews as before
Give three advantages of using libraries
- Error-free
- Saves time
- Reusable
- Designed by experts
What is a dynamic linker?
This is when the addresses of the libraries are added to the file
What is a static linker?
This is when the library code is copied directly into the file
What is the function of the loader?
The loader is responsible for loading the machine code into memory
What is round-robin scheduling?
Each task is given a small time slice of the processor’s time
-once the time is finished it stops running and goes to the next task
what is a multi-level feedback Queue?
A multi-level feedback queue deal with the most important job first
State a disadvantage of a multi-level feedback queue
Hard to implement
Define a real-time operating system (RTOS) and when it may be used
A RTOS performs a task within a given time frame.
They are used where a response within a given time frame is critical.
e.g self-driving cars, life support systems
Describe 2 functions of the BIOS
- POST (Power-on self-test) which ensures that all the hardware is functioning
- Checking the CPU clock, memory and processor
What is the role of a device driver?
Enable the operating system to interact with the hardware devices
Describe when virtual memory may be used
- Testing programs
- Protection from malware
Describe when virtual memory may be used
- Testing programs
- Protection from malware
What is intermidate code?
Code that is halfway between machine code and object code
Give three examples of utilities
- Compression
- Antivirus
- Automatic backup
- Automatic updating
- Disk Defragmentation
Give two advantages of using closed-source code
- Well-supported and well tested
- Creators receive an income for their product
Give two advantages of using open source
- Software is free
- Gets the creators’ software publicity
What are the stages of software development life cycles (SDLC)
Analaysis, design, development, Implementation, evaluation
What are agile methodologies?
A collection of methodolgies which aim to improve the flexibility of software development
What is the spiral model?
The spiral model is built on four key stages
with the focus of effectively
managing risk-heavy projects:
1. Analysing system requirements
2. Pinpointing and mitigating risks
3. Development, testing and
implementation
4. Evaluating to inform the next iteration
What is rapid application development?
add to this later
Identify the advantages of waterfall programming methodologies
- Simple to manage
- Clear structure
- Clearly documented
Give three disadvantages of extreme programming methodologies
- Expensive since two people are working on one project
- Teamwork and good communication are essential
- End user must be present throughout the duration of the project
What type of projects are spiral methodologies suited to?
Large, risk-intensive projects with high budgets
What type of projects are rapid application development programming methodologies suited to
Small to medium budget projects with a short time frame
Define an algorithm
A set of instructions used to solve a problem
What are programming paradigms?
Different approaches to using a programming language to solve a problem - change this definition
Which two categories are programming paradigms split into?
- Imperative
- Declarative
Describe imperative programming
Imperative programming paradigms use code that clearly specifies the actions to be
performed
State the advantages of procedural programming
- Can be applied to a wide range of problems
- Easier to write and interpret
State a use of declarative programming
Artificial intelligence
State the four main programming structures used in structured programming
- Sequence
- Selection
- Iteration
- Recursion
How does assembly language differ from machine code
Assembly language uses mnemonics instead of binary. One line in assembly language is the same as one line in machine code
What does the STA do?
Stores the value in the Accumulator
What does BRP do?
goes to a different place in the loop if the value in the accumulator is positive (or zero).
State the four addressing modes
- Immediate addressing
- direct addressing
- Indirect addressing
- Index addressing
What is Immediate addressing?
The operand is the actual value upon which the instruction is to be performed
What is direct addressing?
The operand gives the address which holds the value upon which the instruction is to be performed.
What is Indirect addressing?
The operand gives the address of a register which holds another address,
where the data is located.
What is Index addressing?
An index register is used, which stores a certain value. The address of the operand is determined by adding the operand to the index register.
What is a class?
A blueprint for an object which contains its methods and attributes. An object is an instance of a class
Give a disadvantage of OOP
- Generally unstable for smaller programs
- OOP may not be suited to all types of problems
- Requires a different style of thinking