Software and software development Flashcards

1
Q

What is meant by the term ‘operating system’?

A

A collection of programs that work together to provide an interface between the computer and the user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Give examples of mobile phone operating systems

A

Android
iOS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give examples of desktop operating systems

A

Windows
MacOS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Name the features that an operating system can provide for a computer system

A
  1. File management (moving, editing, deleting files and folders, sorting files into directories)
  2. Memory management (segmentation, virtual memory)
  3. Resource management (schedulling)
  4. User Interface
  5. Security (firewalls)
  6. Interrupt management
  7. Utility software (disk defragmentation, antivirus, backup…)
  8. Input/Output management (using device drivers)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is meant by paging?

A

MEMORY MANAGEMENT OS
Memory is split into equally sized sections known as pages
-Programs are made up of a certain number of pages
-These pages can be swapped between main memory and the hard disk as they are needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain memory management by the OS

A

Computer memory has to be shared fairly between the multiple programs and applications being used

-Often MM is not large enough

-So one of the roles of the OS is to make sure that main memory is shared efficiently through paging, segmentation and virtual memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is meant by segmentation?

A

MEMORY MANAGEMENT OS

Splitting up of memory into logical sized divisions known as segments (which vary in size)
-Segments are representative of structure and logical flow of program as each is allocated to blocks of code (eg. conditional statements or loops)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Segmentation is the process of splitting up memory into equally sized divisions called segments?
TRUE OR FALSE

A

FALSE

They dont necessarily have to be equal they are ‘logically sized’, which means that they are split depending on the logical structure of the program as each segment is allocated to a section of code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is meant by virtual memory?

A

VM uses a section of the hard drive to act as RAM when there isnt enough space in MM.

So:

Sections of programs not being used currently are temporarily moved to VM through paging which frees up memory in RAM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Give a disadvantage of paging

A

Disk thrashing

When the disk freezes as a result of pages being swapped too frequently between main memory and the hard disk

-So more time is spent swapping rather than actually running the program

-This gets worst as virtual memory is filled up as:
In general the system has to swap pages in and out more frequently
VM must continually decide which pages to swap out to make space for others, this adds to overhead
Disk operations are slower than RAM operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is meant by RAM?

A

RANDOM ACCESS MEMORY
Type of computer memory that is used to temporarily store data that is being actively used or processed by the computer

-Its volatile memory = it loses its contents when power is turned off

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

MAIN MEMORY

A

Split into 2 parts:
RAM= Random Access Memory
ROM = Read only Memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is meant by volatile memory?

A

Requires power in order to retain its contents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is meant by the term ‘Random Access’ in RAM?

A

Data in RAM can be accessed in any order without the need to go through other data sequentially.
MEANS THAT it doesn’t need to start from the beginning and go through all previous data to reach a particular point
-Allows for quick and efficient information retrieval

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is meant by the term interrupts?

A

Signals generated by software or hardware indicating to the processor that a process needs attention

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is taken into account before servicing interrupts?

A

Their priority / how urgent they are

Interrupts are ordered in a priority queue in a special register known as an interrupt register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Explain the role of the OS in Interrupts

A

The job of the OS is to ensure that interrupts are serviced fairly (taking into account their priority) by the processor through the Interrupt service routine (ISR)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Explain the Interrupt service routine

A

1.Processor checks contents of interrupt register at the end of each FDE cycle

  1. If interrupt exists of higher priority than the process being executed, current contents of the Special purpose registers in the CPU are temporarily transfered into a stack

3.Processor responds to interrupt by loading appropriate Interrupt Service Routine (ISR) into RAM

  1. A flag is set to signal the ISR has begun
  2. One ISR is serviced flag is reset, interrupt queue is checked again for interrupts of higher priority than one being executed.
  3. No more/ lower priority interrupts then contents of stack are placed back into Special PRs and the FDE cycle is resumed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is disk thrashing?

A

The excessive swapping of pages between RAM (main memory) and virtual memory (hard disk)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Schedulling algorithms can be:

A

Preempt = interrupt

Pre-emptive: If a new job arrives with a shorter remaining time than the currently running job, the CPU will preempt (interrupt) the current process and switch to the new, shorter task.

Non pre-emptive: Once a job starts executing, it cannot be interrupted by other processes. The CPU remains committed to that process until it completes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is meant by schedulling?

A

One of the roles of the OS is to ensure that all sections of program being run (jobs) receive a fair amount of processing time

-This is done by implementing schedulling algorithms (which can be preemtive or non preemptive)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Give examples of pre-emptive schedulling algorithms

A

-Round Robin
-Shortest Remaining Time
-Multilevel Feedback Queues

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Give examples of non pre-emptive schedulling algorithms

A

-First come first served
-Shortest Job first

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Give disadvantages of Round Robin

A

-Doesnt take into account job priority
-Longer jobs will take much longer to complete as their execution is inefficiently split into multiple cycles

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Give an advantage of Round Robin

A

-Each job is seen to/ carried out

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Explain the Round Robin schedulling algorithm

A

ITS PRE-EMPTIVE

-Uses time slicing: Each job is given a section of processor time (TIME SLICE) which it is allowed to execute within
-Once each job has used up its time slice and hasnt finished, the OS will give another time slice to each of the jobs
-Once a job is completed it is removed from the queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Explain the First Come first serve schedulling algorithm

A

NON PRE-EMPTIVE
-Jobs are carried out in chonological order by which they entered the queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Give a disadvantage of the First Come first serve schedulling algorithm

A

Doesnt allocate processor time based on the priority of each job (as the jobs are carried out in chronological order)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Explain the multilevel feedback queues schedulling algorithm

A

PRE-EMPTIVE

Makes use of multiple queues, each is ordered based of different priorities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Give an advantage of multilevel feedback queues schedulling algorithms

A

Takes into account the priorities of the jobs to be completed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Give an disadvantage of multilevel feedback queues schedulling algorithms

A

Difficult to implement due to the deciding of which job to prioritise based on the combination of priorities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What is meant by processor starvation?

A

When a process is delayed or unable to access the CPU, preventing it from executing.

*This situation arises when higher-priority tasks continually take precedence over lower-priority ones, resulting in certain tasks being “starved” of processing time.
-Disadvantage which can occur in Shortest Job first schedulling algorithms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Explain the Shortest Job First Schedulling algorithm

A

NON PRE-EMPTIVE
-Queue storing the jobs which need to be processed is ordered according the time they will take to be completed
-(Longest jobs at the end and shorter jobs are given preference)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Give disadvantages of using the Shortest Job First Schedulling algorithm

A

-Processor starvation (lower priority jobs dont end up getting done as higher priority/ shorter jobs keep getting added to queue)

-Requires processor to know how long each job takes which is not always possible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Explain the Shortest Remaining time schedulling algorithm

A

ITS PRE-EMPTIVE
The queue storing jobs to be processed is ordered based on the time each of them have remaining to be completed
(Jobs with less time remaining are prioritised and therefore at the start of queue)

If a new process arrives with a shorter remaining time than the currently running process, the CPU will preempt (interrupt) the current process and switch to the new, shorter task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Shortest job first is a type of schedulling algorithm most suited for…

A

batch systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Explain the difference between Shortest Job first and Shortest remaining time algorithms

A

Shortest Job First
Non preepmtive: Once a process starts executing, it cannot be interrupted by other processes. The CPU remains committed to that process until it completes.

Shortest Remaining Time
Preemptive: If a new process arrives with a shorter remaining time than the currently running process, the CPU will preempt (interrupt) the current process and switch to the new, shorter task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Give a disadvantage of Shortest remaining time schedulling algorithm

A

Risk of processor starvation for longer jobs if shorter jobs keep being added to the job queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

What are the different types of Operating Systems?

A

-Distributed
-Embedded
-Multi-Tasking
-Multi-User
-Real Time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

There are various types of Operating Systems. Distributed is one of them.

What is meant by a distributed Operating System?

A

Its run accross multiple devices

Allows the load to spread accross multiple computer processors when running a task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

There are various types of Operating Systems. Embedded is one of them.

What is meant by a embedded Operating System?

A

Designed to perform a small range of specific tasks
-Its catered towards a specific device
-Has limited functionality and they are hard to update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

There are various types of Operating Systems. Multi-tasking is one of them.

What is meant by a Multi-tasking Operating System?

A

Allows user to carry out tasks seemingly simultaneously by using time slicing ( so it uses a pre-emptive schedulling method)

-To switch quickly between programs and applications in memory (so it creates the illusion that they are all ruining at once)

Each application or process is given a time slice/ gets a turn to use the CPU for a brief period before the OS switches to another task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

There are various types of Operating Systems. Multi-User is one of them.

What is meant by a Multi-User Operating System?

A

Multiple users make use of one computer, typically a supercomputer.

A schedulling algorithm needs to be used so that processor time is shared fairly between jobs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

There are various types of Operating Systems. Real Time is one of them.

What is meant by a Real Time Operating System?

A

Used in time critical computer systems

-As its designed to perform a task within a guranteed time frame

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

Which type of operating system consumes the least amount of power out of all the types?

A

Embedded

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

When would a Real Time OS be suitable?

A

For systems which manage situations where a response within a certain time period is crucial to safety (eg self driving cars)

*As they perform a task within a guaranteed time frame

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

What the BIOS? Explain it

A

BASIC INPUT OUTPUT SYSTEM

-This is the first program which is run when a computer system is switched on

-Program counter register points to the location of the BIOS when the computer is started up as the BIOS is responsable for doing checks before the OS is loaded into memory (RAM) from the hard disk

*IT IS ONLY AFTER THESE CHECKS THAT THE OS CAN BE LOADED INTO RAM FROM THE HARD DISK)

CHECKS:
-Poweron self test (POST) = ensures all hardware (disk drives, keyboard) are connected correctly and functional

-Checks CPU clock, memory and processor
-Checking for any external memory devices connected to the computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

What is meant by the term ‘bootstrap’?

A

The name of the program which loads the operating system from the hard disk into main memory (RAM)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

The name of the program which loads the operating system from the hard disk into main memory (RAM) is?

A

Bootstrap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

What are device drivers?

A

Computer programs provided by the OS which allow the OS to interact with hardware

E.g When a piece of hardware such as a keyboard is used, the device driver communicates this request to the OS
-The OS then produces a relevant output such as displaying a character on the screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

Device drivers interact with the OS. What does this say about the relationship between device drivers and the OS it interacts with?

A

Device drivers are specific to the operating system installed on the hardware device

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

Device driver’s are specific to a computer’s architecture

TRUE OR FALSE?

A

TRUE
Diff device drivers must be used for different device types (e.g smartphones, game consoles, desktop PCs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

What is a virtual machine?

A

A theoretical computer as it is a software implementation of a computer system

It also provides an environment with a translator for intermediate code to run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

Using the example of the user typing in a character into their keyboard. How would the use of device drivers be relevant in dispkaying this on the screen?

A

A device driver is a program provided by the OS which allows the OS to communicate with hardware

When a piece of hardware such as a keyboard is used, the device driver communicates this request to the OS
-The OS then produces a relevant output such as displaying a character on the screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

What is meant by intermediate code?

A

Code that is halfway between machine code and object code

Its independent of processor architecture so it can be used across all different machines and operating systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

Give me an advantage of intermediate code

A

Its independent of processor architecture so it can be used across all different machines and operating systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

Give uses of Virtual machines

A

-Protection from malware
(as malware will affect the Virtual machine rather than the device being used as VMs operate in isolated environments)

-Running incompatible software
(Programs specific to diff OSs or diff versions of an OS can be run within a VM)

-Development environment for programmers to test programs on diff OSs (as it saves money having to purchase different devices for testing)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

Can you explain why Virtual machines can provide a device protection from malware?

A

Virtual machines operate in ISOLATED environments. Each VM runs its own operating system and applications independently from the host machine/device and other VMs.

This isolation helps contain malware, preventing them from spreading to the host system or affecting other VMs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

How does a virtual machine help when running incompatible software?

A

Programs specific to diff OSs or diff versions of an OS can be run within a VM which saves money in having to purchase the required hardware

(e.g games console being implemented on a PC via a virtual machine)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

Software can be categorised as…

A

-Application software
-Systems software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

What is meant by application software?

A

Software designed to be used by the end user to perform one specific task

It requires systems software to run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

Give examples of application softwares

A

-Word processing
-Spreadsheets
-Web browsers
-Desktop publishing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

What is systems software?

A

Software designed to manage and control the hardware components of a computer, as well as provide a platform for running application software.

(So it serves as a bridge between the hardware and user applications)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

Give examples of Systems software

A

-Operating systems
-Library programs
-Utility programs
-Device drivers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

What is meant by ‘utilities’?

A

A type of system software which is responsable for the consistent, high performance of the operating system

-Linked to the maintenance of the OS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

Disk defragmentation is a type of utility software

Explain it

A

Disk defragmenter utility rearranges contents of hard disk so that files can be stored in contigous spaces so they can be accessed faster

-As hard disk becomes full R/W slow down
This is because files become fragmented as they are stored in diff parts of memory’

(fragmented = scattered)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

Give examples of utilities

A

-Compression
-Disk defragmentation
-Antivirus
-Backup
-Automatic updating

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

Why does fragmentation occur?

A

When files are divided into multiple parts (fragments) and stored in different areas of the disk.
Occurs over time as files are created, deleted, and modified.
As files are deleted, small gaps are left on the disk. When new files are saved, they may be broken up and placed into these gaps if there isn’t enough contiguous space available, leading to fragmentation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

Antivirus is a type of utility software

Explain it

A

Responsible for detecting potential threats to the computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

Automatic updating is a type of utility software

Explain it

A

Ensures system is up to date ==> tackles security flaws, less vunreable to malware
Updates are automatically installed when the computer is restarted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

Backup is a type of utility software

Explain it

A

Automatically creates routine copies (regularly scheduled backups) of specific files selected by user.

User also specifies how often these are backedup

Good for power failure, malicious attack so files can be recovered

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

What is meant by a ‘translator’?

A

A program which converts high level source code into low level object code which is then ready to be executed by a computer

3 types: assembler, compiler, interpreter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
72
Q

What is the main role of a compiler?

A

Translates high level code into machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q

How does a compiler work?

A

Translates HL code into MC all at once

-First checks for errors and reports back if found any
-Then translates whole code at once
-Produces machine code which can only be executed on certain devices
*Compiled code is specfic to a particular processor type and OS
-Code can be run without need for source code or translator to be present

*If you need to make changes, after that the whole code needs to be recompiled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q

Assembly code is platform specific

What does this mean?

A

Instructions used are dependent on the instruction set of the processor as each processor may have a diff instruction set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q

Give info on assemblers

A

-They translate assembly code into machine code
-Each line of assembly code is equivalent to almost one line of machine code (one to one relationship)

-Platform specific as they convert assembly code into machine code, assembly code is tailored to a specific processor as diff processors have diff instruction sets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
76
Q

Which translator has the longest initial compilation process and why?

A

Compilers as they carry out multiple checks to see if there are any errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
77
Q

Interpreters

A

Translate HL code into MC line by line

-They stop and alerts there is an error if it detects one ==> Good for debugging as it stops when it gets to an error

-Slower than running compiled code as code must be translated each time its run/executed

-Both interpreter and source code must be present when code is run on different devices, however code can be executed on a range of diff platforms as long as right interpreter is available

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

Generally which runs faster a compiler or interpreter?

A

A compiler is generally faster

-A compiler translates the entire source code into machine code (or an intermediate language like bytecode) before the program is run.
This produces an executable file, which can then be executed directly by the hardware without needing the source code or the compiler.

-An interpreter translates the source code line by line while the program is running, and executes each line immediately after translating it.
This means that each line has to be translated every time the program is run, which slows down execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
79
Q

Interpreted code is generally more portable

TRUE OR FALSE?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

When a compiler is used, high level code goes through…. before…

A

STAGES OF COMPILATION

When a compiler is used, high level code goes through 4 STAGES before IT IS TURNED INTO OBJECT CODE READY TO BE EXECUTED

Stages:

Lexical Analysis
Syntax Analysis
Code Generation
Optimisation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
81
Q

STAGES OF COMPILATION

Lexical Analysis

A
  1. Lexical Analysis:
    -Whitespace and comments are removed
    -Remaining code is analysised for keywords and names of constants and variables
    -which are replaced with tokens. Info about each token associated with each keyword or identifier is stored in a symbol table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
82
Q

STAGES OF COMPILATION

Syntax Analysis

A
  1. Syntax Analysis
    -Tokens are analysed against rules of programming language, if they break these they are flagged up as syntax errors (incomplete brackets, undeclared variable type)
    -An abstract syntax tree is produced
    -Further details about identifiers is added to symbols table
    -Semantic analysis is carried out (logic mistakes are detected)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
83
Q

Representation of source code in the form of a tree

What is this called?

A

Abstract syntax tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
84
Q

What is meant by an ‘abstract syntax tree’?

A

A representation of source code in the form of a tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
85
Q

What is meant by semantic analysis?

A

Analysing the code for logic errors such as undeclared identifiers, multiple declaration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
86
Q

Give examples of syntax errors

A

-Undeclared variable type
-Incomplete set of brackets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
87
Q

Give examples of semantic errors

A

-Undeclared identifier
-Multiple declaration

88
Q

STAGES OF COMPILATION

Code generation

A
  1. Code Generation

The abstract syntaxt tree produced in the syntax analysis stage is used to produce machine code

89
Q

STAGES OF COMPILATION

Optimisation

A

-Looks for sections of code that can be made more efficient
-Aim is to minimise the time taken for the code to execute by:

Redundant parts of code are removed and replaced by with more efficient ones or grouped together which produces the same result

90
Q

STAGES OF COMPILATION

Optimisation

Give disadvantages of this

A

X Excessive optimisation may change the way the code behaves

X Adds to the overall time taken for compilation

91
Q

What is meant by a linker?

A

Piece of software responsible for linking external modules and libraries included within the code

There are 2 types: Static and Dynamic

92
Q

What is meant by a static linker?

A

A linker is a piece of software which links external modules and libraries included within the code

Static:

Modules and libraries are added directly to the program file (this increases size of file as the L and M are part of file).
Any updates made to libraries or modules externally will not affect the program meaning that you can use a specific version of a library

93
Q

What is meant by a dynamic linker?

A

A linker is a piece of software which links external modules and libraries included within the code

Dynamic:

Addresses of libraries and modules are included in the program file where they are referenced at points where they are needed at runtime

-When program is run, the loader retrieves these using the specified addresses so program can be executed.

94
Q

Give advantages of dynamic linkers

A

-External updates affect the main file so you dont need to rewrite the code (compared to static where any updates to the libraries or modules won’t affect the code)

-File size remains small as addresses to libraries and modules are included in the file rather than the modules and libraries themselves. (so M and L can be retrived when code is run by a loader at the specific addresses when program is run)

95
Q

What is meant by a loader?

A

Programs provided by the OS

-When a file is executed the loader is responsable for retrieving the library or module/subroutine from the specified memory location

(used in dynamic linking)

96
Q

What is a library?

A

Pre compiled, pretested programs which can be incorporated within other programs using either static or dynamic linking

97
Q

Give advantages of using libraries

A

-They are ready to use and error free as they are precompiled and pretested ==> so saves time developing and testing

-Can be reused within multiple programs

-Often provide a specialised range of functions which would otherwise require a lot of time and effort to develop

98
Q

Give the common stages of a software development life cycle (SDLCs)

A

-Analysis
-Design
-Development
-Testing
-Implementation
-Evaluation
-Maintenance

99
Q

SOFTWARE DEVELOPMENT LIFE CYCLE

Explain what happens in the analysis stage

A

Stakeholders state what they require from finished product

-Info is used to refine problem to be solved and system requirements
-Analysing advanatages and disadvantages of ways the problem is currently being solved

100
Q

SOFTWARE DEVELOPMENT LIFE CYCLE

Explain what happens in the design stage

A

-Inputs, outputs
-User interface (eg menu, navigation)
-Hardware setup (eg. compatibility)
-Security features (eg. access levels)
-Test plan may also be developed at this stage

101
Q

SOFTWARE DEVELOPMENT LIFE CYCLE

Explain what happens in the development stage

A

Design from ‘design’ stage is used to split the project up into individual, selfcontained modules which are allocated to teams for programming

102
Q

SOFTWARE DEVELOPMENT LIFE CYCLE

Explain what happens in the testing stage

A

Program is tested against the test plan made in the design stage

By using:

-Alpha
-Beta
-White box
-Black box testing

103
Q

SOFTWARE DEVELOPMENT LIFE CYCLE

Explain what happens in the implementation stage

A

Once changes have been made using the feedback from testing, software is installed onto users’ systems

104
Q

SOFTWARE DEVELOPMENT LIFE CYCLE

Explain what happens in the evaluation stage

A

Evaluates the effectiveness of the software compared to the system requierements outlined in the analysis stage

Other criteria outlined: robustness, reliability, portability

105
Q

SOFTWARE DEVELOPMENT LIFE CYCLE

Explain what happens in the maintenance stage

A

Any errors or improvements are flagged up by end users

Developers carry out frequent software updates to fix any bugs/security issues

106
Q

Explain alpha testing

A

SOFTWARE DEVELOPMENT LIFE CYCLE
(IN TESTING STAGE)

Carried out by the software development teams within the company which pinpoint bugs and fix them

107
Q

Explain beta testing

A

SOFTWARE DEVELOPMENT LIFE CYCLE
(IN TESTING STAGE)

Carried out by endusers after alpha testing has been done
-This feedback from users is used to inform the next stage of development

108
Q

Explain white box testing in the SDLC

A

SOFTWARE DEVELOPMENT LIFE CYCLE
(IN TESTING STAGE)

*Focused more on the internal workings (code paths) compared to black box

-Carried out by software development teams
-Using the test plan (which is based on the internal structure of the program) all possible routes through the program are tested

109
Q

Explain black box testing in the SDLC

A

SOFTWARE DEVELOPMENT LIFE CYCLE
(IN TESTING STAGE)

*Focused more on external workings (inputs and outputs) compared to white box

-Software is tested without the people testing it being aware of the internal structure of the software (unlike white box testing)
-Carried out by BOTH company and end users (unlike white testing as its only the company’s development teams)
-The test plan traces through the inputs and outputs within the software without refering to internal structure

110
Q

WATERFALL LIFECYCLE

The analysis stage includes a feasibility study which designers evaluate the feasibility of the project using…

A

TELOS

-Technical: is project possible considering the tech available?

-Economic: can problem be financed in the short term and long term?

-Legal: can the project be solved within the law?

-Operational: can the problem be successflly be implemented and mantained?

-Schedulling: can it be completed given the time available?

111
Q

Give examples of programming methodologies

A

-Waterfall
-Agile
-Extreme programming
-Spiral
-Rapid application development

112
Q

If a change needs to be made within the project being developed using the waterfall model….

A

Programmers must revisit all levels between the current stage and at the stage at which a change is to be made

X Makes model inflexible and not suitable for projects with changing requirements

X Users have very little input as they are only involved at the analysis and evaluation stages (start and end)

113
Q

Name the stages in the waterfall lifecycle

A

Its being replaced with better models

  1. Analysis
  2. Design
  3. Implementation
  4. Evaluation
  5. Maintenance

Stages are completed in sequence from start to finish

114
Q

A disadvantage for the waterfall lifecycle software methodology is that:

It makes model inflexible and not suitable for projects with changing requirements

Why is that?

A

If a change is being made:
Programmers must revisit all levels between the current stage and at the stage at which a change is to be made

115
Q

Agile methodologies

A

A collection of methodologies which aim to improve the flexibility of software development and adapt to changes in user requirements faster
-So its easier to make changes and improvements

Less focus on documentation more focus on user satisfaction

-Problem is broken down into sections which are DEVELOPED IN PARALLEL
(deisgn and analysis phases often occur together)

Start: Analysis

Design prototype, build prototype, user feedback, refine prototype (repeat)

Finish: Final product

116
Q

With agile methodologies less focus is given to.. and more focus is given to…

A

Less focus on documentation more focus on user satisfaction

This is because of the iterative nature of development so its also harder to produce high quality documentation

117
Q

Agile methodologies prototype

A

-Prototype is delivered early and is built and improved in an iterative manner (built, reviewed, and improved upon repeatedly through cycles) so that new prototypes can be delivered throughout the development cycle

118
Q

Extreme programming

A

This is an agile model in which the development team consists of a pair of programmers and their end user

-So must have good communication
-One may code the other will critique

Each iteration generates a ‘working version’ which means that it could function as the final product

119
Q

Extreme programming is an agile model in which the development team consists of a pair of programmers and their end user.

The model is built on ‘user stories’. What does this mean?

A

System requirements are specified by the end user and used when designing the program

120
Q

SOFTWARE METHODOLOGIES

Spiral model

A

Focus on managing risk-heavy projects
4 key stages:
-Analysis of system requirements
-Pinpointing and mitigating risks
-Development, testing, implementation
-Evaluating to inform next iteration

If project is found too risky at any point, it is terminated

121
Q

Give a disadvantage of using the spiral model

A

Hiring risk assessors to analyse the risks involved can be EXPENSIVE

-So this methodology is only a good investment for large scale projects

122
Q

SOFTWARE METHODOLOGIES

Rapid Application development

A
123
Q

In what situation would you use the Rapid Application development software methodology?

A

Used in situations where user requirements are incomplete or unclear at the start.

This is because first, an incomplete solution is developed and based on user feedback, another improved prototype is made
==> So this continues until the prototype matches the requirements of the end user (where it becomes the final product)

124
Q

THE RAPID APPLICATION DEVELOPMENT SOFTWARE METHODOLOGY

Is used in situations where user requirements are incomplete or unclear at the start.

Give a disadvantage of this

A

Inefficient to work with as requirements change over the course of the project

125
Q

What is meant by an algorithm?

A

A set of instructions to solve a problem

126
Q

Give key qualities of an algorithm

A

-Must terminate/ reach a stopping condition
-Must deal with invalid inputs
-Well-documented for reference
-Well-commented so modifications can be made easily in the future (as it could explain what each part of the code does)
-Inputs must be clearly defined (what is valid and what is invalid as an input)
-For any defined input a valid output must always be produced

127
Q

What is meant by a ‘feasibility study’?

A

Feasible= solution is practical and achievable.

A feasibility study is conducted early in the project to determine if the project is worth pursuing and if it can be completed successfully.

128
Q

Give an advantage of using waterfall programming methodology

A

-Clearly documented

129
Q

Give an advantage of using agile programming methodology

A

-Produces high quality code (eg. working prototype is developed early and then constantly improved)
-Flexible to changing requirements
-Constant prototypes being produced
-Constant improvement due to iterative manner of building prototypes
-Allows for user feedback/input (thus more tailored to users’ needs/wants)

130
Q

Give an advantage of using extreme programming methodology

A

-Produces high quality code (as one partner can code the other can critique)
-Constant improvement due to iterative manner of building prototypes/working version ==>-Constant prototypes being produced

131
Q

Give an advantage of using spiral programming methodology

A

-Thorough risk analysis and mitigation
-Constant prototypes being produced

132
Q

Give an disadvantage of using waterfall programming methodology

A

-Lack of flexibility to make changes as if a change wants to be made them programmers must also revisit all the other levels between the current stage and the one that needs to be changed
==> so harder to make improvement based on user feedback

-No risk analysis (eg. such as in the spiral model)

133
Q

Extreme programming, Spiral model and Rapid Application development are examples of…..

A

Agile methodologies

Because of the iterative aspect where is creates a prototype shares it with user and based on feedback it improves it

134
Q

Give me disadvantages of agile methodologies

A

-Can led to poor documentation (as there is not much focus on it. Its also harder as there are so many prototypes to documenent and its hard to do this in depth)

-Constant interaction with user

135
Q

Give disadvantages of using extreme programming

A

-Higher cost as you have 2 people working on 1 project at a time

-Good communication/teamwork is important between the 2 programmers

-Have to have constant interaction with user

-Developing constant prototypes may be costly (but may also be worth it for improvement)

136
Q

Give disadvantages of using the spiral model

A

-Expensive to hire risk assessors
-Less focus on code efficiency
-High cost of constant prototyping

137
Q

Give advantages of rapid application development

A

-Caters to users’ changing requirements as it uses a partially functioning prototype and builds upon it

-Produces prototypes throughout

138
Q

Give disadvantages of rapid application development

A

-Poorer quality documentation (e.g loads of prototypes so its hard to document all. Also user requirements may change constantly so hard to maintain uptodate documentation)

139
Q

Uses of the Agile methodology

A

Small to medium projects with some unclear requirements

(as you can keep building on from an initial prototype)

140
Q

Uses of the Waterfall methodology

A

-Low risk projects
-Projects with little user input
-Static (doesnt change in terms of requirements)

eg. Piece of general purpose software

141
Q

Uses of the Extreme Programming (XP) methodology

A

Small to medium projects with some unclear requirements

(as you can keep building on from an initial prototype)

142
Q

Uses of the Spiral model methodology

A

-Large projects (as its expensive due to all the risk accession) -Projects with a high budget
-Risk intensive projects

(eg. self driving car)

143
Q

Uses of the Rapid Application Development methodology

A

-Small to medium project
-Low budget
-Short time frames

144
Q

What is meant by a programming paradigm?

A

Different approaches to using a programming language

They are divided into imperative and declarative

145
Q

Give examples of imperative programming paradigms

A

-Procedural
-Object oriented

146
Q

Give examples of declarative programming paradigms

A

-Functional
-Logic

147
Q

What is meant by an imperative programming paradigm?

A

Uses code that clearly specifies the actions to be performed

148
Q

Procedural programming

A

Type of imperative programming

-Relatively easy to write and interpret and can be applied to a wide range of problems

-Uses a sequence of instructions which are broken down into procedures
-Emphasizes a logical flow of instructions that tell the computer what to do in a specific order

examples: Pascal, Python

149
Q

Give examples of procedural programming languages

A

-Pascal
-Python

150
Q

Object oriented programming

A

-Useful for problems which have loads of reusable and similar characteristics

-Also focuses on making programs easy to update and maintain (as similar characteristics are grouped together in classes)

-Built on entities called objects formed from classes which have certain attributes and methods

151
Q

Give examples Object oriented programming languages

A

Python
Delphi
Java

152
Q

What is meant by a declarative programming paradigm?

A

States the desired result rather than the series of instructions to get to the result

-Its the role of the programming language to determine how its best to get the result:
- Programmer describes the goal or outcome, and the underlying system or language takes care of finding the best way to achieve that goal.

(Used in: eg. AI, expert systems)

153
Q

Give examples of functional programming languages

A

Haskell
Java
C#

154
Q

Functional programming

A

DECLARATIVE PARADIGM

The concept of reusing a set of functions which form the main parts of a program

155
Q

Logic programming languages

A

DECLARATIVE PARADIGM

-Uses code which defines a set of facts and rules based on a problem (rather than dealing with the step by step rules to solve these)
-Queries are used to find answers to these problems (so programmer defines what solution should look like and system figures out how to reach a solution)

156
Q

Give an example of a logic programming language

A

Prolog

157
Q

What is meant by ‘structured programming’?

A

A subsection of procedural programming in which the control flow (order its run) is given by:

-Sequence
-Selection
-Iteration
-Recursion

158
Q

What is meant by ‘control flow’?

A

Control flow refers to the order in which individual instructions, statements, or functions are executed in a program.

159
Q

What is meant by recursion?

A

When a subroutine calls itself until the base case is reached, which then terminates the recursion

160
Q

What is meant by the ‘base case’?

A

In recursion, its a condition that prevents the function from calling itself and doesnt require recursion to produce an output

161
Q

Define Iteration

A

A block of code is exectuted a certain number of times or while a condition is true

162
Q

Define Selection

A

A block of code is run if a specific condition is met

163
Q

Assembly language

A

-Uses mnemonics rather than binary (so its more compact)
-Each mnemonic is represented by a numeric code (which represents the machine level instruction understood by the processor)

-Its processor-specific ==> directly manipulates the processor, so good for embedded systems

-Easier for humans to understand

-Converted to MC using an assembler

One line of Assembly language is equivalent to one line of machine code

164
Q

Assembly language is good for embedded systems

Why?

A

The commands that assembly language uses are processor specific as they directly interact with the CPU’s special purpose registers. These registers are used to interact with specific hardware components.

-Therefore, this allows a direct interaction with the hardware

165
Q

Assembly language is processor specific.
What does this mean?

A

Processor-specific means that Assembly code is designed to work with a specific type of processor because the mnemonics and machine codes differ between processors as diff processors have diff instruction sets

(A program written in Assembly for one processor won’t work on a different processor without modification)

166
Q

Explain what makes up a machine code instruction

A

2 parts

-Opcode= Specifies the instruction to be performed (eg. ADD)

-Operand= Value which relates to the data on which the instruction is to be performed

167
Q

What is ‘opcode’?

A

A part of a machine code instruction which specifies the instruction to be performed

168
Q

What is ‘operand’?

A

A part of a machine code intruction

A value which relates to the data which the operation is to be performed on

169
Q

The addressing mode is part of the operand

TRUE OR FALSE?

A

FALSE

It is part of the opcode (specifies the instruction to be performed)

170
Q

Addressing modes allow for a much greater number of locations for data to be stored

Why?

A

Because otherwise the size of the operand would constraint the number of addresses

171
Q

What is meant by ‘intermediate code’?

A

Code that is halfway between machine code and object code

Makes programs portable= Its independent of the processor architecture so it can be used accross different machines and operating systems

172
Q

Give a disadvantage of running intermediate code in a virtual machine

A

Can be slower rather than running it on the device it was designed for

173
Q

Virtual machines can be used to create a development environment for programmers

Give an advantage of this

A

So that programmers can test programs on different operating systems.

Therefore, it saves time and money of having to purchase multiple devices just for testing

174
Q

Intermediate code is independent of…

A

Its independent of the processor architecture so it can be used accross different machines and operating systems

175
Q

Why would using a Virtual machine be good for SAFE testing and development?

A

A VM runs in an isolated environment separate from the host operating system.

This isolation ensures that any issues, crashes, or errors occurring within the VM do not affect the host system.

So can experiment freely with code, test risky changes without impacting their main operating system.

176
Q

Virtual Machines enable you to run various ……. on the same ……

A

Virtual Machines enable you to run various operating systems (like Windows, Linux, or macOS) on the same physical device (host machine)

177
Q

VIRTUAL MACHINES

Host machine refers to …

A

Host machine refers to the physical device

178
Q

Application software depends on the system software to function

Why is that?

A

The application software needs the operating system (provided from system software) to allocate resources, manage files and facilitate communication with hardware.

System software provides an environment that allows the applications to run.

179
Q

What is meant by source code?

A

Human-readable set of instructions and statements written by a programmer using a programming language.

(it must be translated into machine code by a compiler or interpreter to be executed by a computer)

180
Q

What is object code?

A

The machine-readable code generated by a compiler or assembler after translating the human-readable source code.

181
Q

Assembly language doesn’t count as source code

TRUE OR FALSE

A

FALSE
Source code does apply to assembly language. Assembly language code is considered source code because it is written in a human-readable form (using mnemonics) and must be translated by an assembler into machine code (object code) for the computer to execute it.

182
Q

Does an interpreter generate object code?

A

No, it directly translates and executes source code line by line at runtime, without creating a separate, intermediate machine code file.

183
Q

Can you explain why the code that is compiled doesn’t require the compiler to be run again?

A

A compiler translates the entire program into machine code or intermediate code first and creates a separate file (like an executable), which can be run without the need for the compiler to be involved again.

184
Q

Bytecode is an example of a…

A

Intermediate language

185
Q

Source code is written by a programmer and refers to object code before…

A

it has been compiled

186
Q

When software is described as ‘open source’ or ‘closed source’, it refers to…

A

whether or not the source code is accessible to the public

187
Q

What is meant by ‘open source’ code?

A

Code which can be used by anyone without a license and is distributed with the source code

188
Q

What is meant by ‘close source’ code?

A

Code which requires user to hold an appropriate license to use software

Users cant access original source code as the company owns the copyright

189
Q

What is the difference between open source and closed source code when it comes to the access rights of the code?

A

Open source= anyone can use it even if they dont have a license

Closed= user needs a license to user it, as this code’s copyright license by the company that owns it

190
Q

Give advantages of using open source for software

A

-Can be modified and improved by anyone
-Can be modified and sold on

191
Q

Give disadvantages of using open source for software

A

-Modifications made by people may be incorrect
-Lower security as code may not be developed in a controlled environment
-No user manuals, relies on support from public (eg. online forums) this may be insufficient or incorrect

192
Q

Give disadvantages of using closed source for software

A

-License restricts how many people can use the software at a time
-Users cant modifiy and improve software themselves
-Cost of paying for a license (as the company)

193
Q

Give advantages of using closed source for software

A

-High security levels as the software is developed professionally
-Company owning the software can provide expert support and user manuals
-Software can be regularly updated by the company who owns it

194
Q

What is immediate addressing?

A

Operand is the actual value upon which the instruction is to be performed on

195
Q

What is direct addressing?

A

Operand gives the address which holds the value upon which the instruction is to be performed on

196
Q

What is indirect addressing?

A

Operand gives the address of a register which holds another address where the data is located

197
Q

//What is indexed addressing?

A

An index register is used which stores a certain value.

Address of the operand is determined by adding the operand to the index register

198
Q

What is meant by instantiation?

A

The process of creating an object from a class

(e.g From class animal. cat, dog… are instances of the class animal)

199
Q

Define ‘object’ in OOP

A

A particular instance of a class

200
Q

Object Oriented Language

A

Class is a template for an object which defines the state and behaviour of the object

State= attributes = object’s properties/characteristics
Behaviour= defined by methods in class = define actions object can perform

201
Q

OOP

Setter vs Getter

A

Setter = a method that sets out the value of a particular attribute

Getter= a method that retrieves the value of a given attribute

202
Q

Why are getters and setters useful in OOP?

A

They are used to make are that attributes cant be directly accessed and edited by users (encapsulation)

203
Q

OOP

What is encapsulation?

A

The concept of bundling attributes and methods that operate on data into a single unit, known as a class.

Ensures that data remains secure and is not accidentally modified or misused by restricting access to them using access modifiers (e.g., public, private)

(so if attributes are declared as private then they can only be altered using public methods)

204
Q

Why would you set the access modifier of an attribute as private?

A

Ensures that data remains secure and is not accidentally modified or misused

As this hiddes the attribute to protect the internal state of an object

205
Q

What is meant by access modifiers?

A

Access modifiers are keywords used in object-oriented programming to define how accessible certain parts of a class (such as its attributes and methods) are from outside the class.

206
Q

Public access modifier

A

Attributes and methods marked as public are accessible from anywhere in the program, including from outside the class.

207
Q

Private access modifier

A

Attributes and methods marked as private are accessible only within the class where they are defined and are hidden from outside the class.

208
Q

Protected access modifier

A

Attributes and methods marked as protected are accessible only within the class itself and by subclasses (e.g derived classes) but not by outside code.

209
Q

Subclass=

Parent Class=

A

Subclass= Derived class

Parent class= Superclass

210
Q

Give an advantage of inheritance

A

Because the derived class will have the same properties and methods as the parent class as well as some of its own

==> This allows programmers to reuse certain methods and properties of a class whilst also making some changes

211
Q

Overriding and overloading are types of….

A

Polymorphism

212
Q

What is meant by polymorphism?

A

Objects can behave differently depending on their class which can result in the same method producing different outputs

213
Q

What is meant by ‘overriding’?

A

Its a type of polymorphism

Redefining a method within a subclass and altering the code so that it functions differently and produces a different output to the method in the superclass

(same name diff implementation)

(e.g in the class Shape. there are different shape objects such as square and circle. in the method ‘getArea’ the way that you would work out the area of a square and circle is different)

214
Q

What is meant by ‘overloading’?

A

Its a type of polymorphism

When methods in the superclass have the same name but pass in different parameters

215
Q

Give advantages of Object Oriented Programming

A

-Allows high reusability of code ==> so its useful for projects with similar properties
(inheritance and polymorphism allows this)

-Can have multiple programmers working on the code together at a time as each class can be developed independently of the other classes

-As OOP requires advanced planning to determine how the problem will be broken down into classes and how these will link eachother ==> good design plan can produce a higher quality software with less vunreabilities

-Has a modular structure so its easier to modify and update

-Has a high level of abstraction ==> so programmers dont need to know about how the code is implemented (they just know what its purpose is)
(e.g dijkstra’s algorithm: programmer doesnt need to know how to program one rather just that the method is about that)

216
Q

Give disadvantages of Object Oriented Programming

A

-Not really suitable for small problems

-Where few components are reused OOP may result in longer and inefficient program

-Requires an alternative thinking style as its a diff style of program (might be harder for those who are used to other paradigms/might be beginners/only used to procedural programming)
==> OOP concepts like inheritance, polymorphism, and encapsulation challenging for beginners to understand

-Code harder to follow and understand because as the size of the problem increases it leads to more complex program design

-Objects and classes often use more memory than procedural programming constructs, as each instance of a class requires its own memory for its attributes

-The use of abstraction, encapsulation, and polymorphism can result in more memory and processing overhead

217
Q

Objects and classes (in OOP) often use more memory than procedural programming constructs

Why is that?

A

Objects and classes often use more memory than procedural programming constructs, as each instance of a class (each object) requires its own memory for its attributes