1.2 Software extra Flashcards
flooExplain why a real-time operating system would be suitable for intensive care units
If something happens to patient, response must be immediate and other systems may have delays which could result in patient not receiving treatment in time
Why may fcfs be inefficient
Once a job starts it prevents others from being processed so a job using a slow resource like a printer will waste processor time
Why is scheduling necessary
Process as many jobs as possible…
…in least possible time
Ensure all jobs are processed (fairly)
Efficient use of resources / processor time
Why is memory management necessary
Allows programs to share memory /
allocate memory…
…& protect programs / data from each
other
Allows programs larger than main memory
to run
How does memory management do it
Converting logical addresses to physical addresses
What are pages used for
Virtual memory
Important statement for paging
PHYSICAL DIVISIONS
Important statement for segmentation
LOGICAL DIVISIONS
Similarities between paging and segmentation
Use virtual memory / backing store to
swap parts of programs
Allow programs larger than memory to
run / insufficient memory
What do both paging and segmentation allow
Allows programs to be stored in
memory non contiguously
Why do linkers need to be used after compilation
The user running the program will not
necessarily have the library installed on
their machine (1) therefore the relevant
code needs to be included within the
final executable (1) – it is the job of the
linker to combine this code (1)
Other benefits of using library routines
Ready to use, and programmer expertise
What are statements checked against in syntax analysis
The rules/grammar of the language
Extra things for syntax analysis
Errors reported as a list, error diagnostics given and receives output from lexical analysis and passed code to code generation
Can libraries be written in different language
Yes so this is advantage
Why is waterfall better for project with static requirements
Requirements clearly layer out from start so can be focused on
Waterfall for big or small projects?
Big
How could black box testing be used on a piece of code
Tests the expected output… [1]
…based on input [1]
Does not look at the code // looks only
at program specification [1]
What is alpha testing
Testing done by the programmer
How will white box testing be done on a peice of code
Using the source code
Check every possible path / condition
statements
Dry Runs / Trace Tables
Describe RAD
Prototype is created (1)
– (Evaluated and) feedback used to
inform next iteration (1)
– Any changes are made (1)
– Process repeated until…(1)
…prototype becomes final
product. (1)
What is instantiation
Classes provide blueprints for creating objects, a process known as instantiation.
What is a subclass
A class that inherits from another class is called a subclass (also a derived class, extended
class, or child class)
What is a super class
The class from which the subclass inherits from is called a superclass (or parent class)
What is encapsulation
(information hiding) - Encapsulation is the bundling together of attributes and methods into a class. Attributes are given the private access modifier and publicly accessible methods are provided in the class (getters and setters) to access these attributes. Benefits are that data cannot be changed accidently so reducing the chance of errors, ensures changes to attributes are only made in the way that is intended.
Advantages of inheritence
reusability and readability. When child class inherits the properties and functionality of parent class, we do not need to write the same code again in child class. This makes it easier to reuse the code, makes us write the less code and the code becomes much more readable
Disadvantages of inheritance
When you choose to inherit from another class, you have coupled the two classes. What will happen if someone extends the base class? What will happen if someone changes the base class to inherit from another class? Your class may now have acquired attributes and methods that you are not aware of.
Data redundancy
Unecessary repition of a field in multiple tables
Example of general purpose software
Word-processor, spreadsheet or graphics package
Example of special purpose software
Payroll software and hotel booking systems
Off the shelf
Ready to use
Bespoke
Get a company to make software to satisfy particular requirements
Off the shelf and cost
Less expensive since the cost is shared among other people buying the package
Off the shelf and documentation/reliability
Well documented, well tested and error-free
Off the shelf is ready to be
Installed immediately
Off the shelf and the problem with features
May contain a lot of unwanted features and some essential features may be missing
Bespoke software and cost
More costly and requires expertise to analyse document requirements
Bespoke software and features
Features customised to user requirements and other features can be added as needs arise
Bespoke software and development time
May take a long time to develop
Bespoke software and errors
My contain errors which do not surface immediately
What is a virtual machine
Software used to take on the function of a machine including executing intermediate code or running an operating system within another
Virtualisation
Creating a virtual version of something including virtual machines for running other operating systems
Platform-independent code
The code will run on all operating systems
Pros of virtual machines
Provides access to programs no longer supported by new OS, allows another computer to be run without having to purchase another one, can test apps built for different platforms
Cons of virtual machines
May require substantial processing power and memory, sharing resources so can degrade performance of the virtual and real machine. May not provide the full functionality of using on its own
Use of intermediate code
Independent of the processor architecture so can be used across different machines and OS
What can virtual machines make
development environments for programmers to test
Virtual machines and malware
Malware will affect virtual machine not device being used
Pros of static linkers?
You guarantee the library is combined with the executable code.
More reliable code
You can control exactly which version.
Pros of dynamic linkers?
The executable program itself as it does not have the libraries merged into it so saving disk space. Multiple programs can share a single copy of the library.
The operating system can maintain the latest versions of all the libraries as part of its regular updates.
Cons of static linkers?
Bigger file size
Copies of redundant libraries are found and libraries can be out of date
Cons of dynamic linkers?
If you’ve not got the dynamic library, the program can’t run! You might need to ship copies of the libraries with your code just in case.
What do loaders do?
validation, initialising registers and copying the program from hard disk/SSD to main memory.
What is validation of loaders?
Checking permission required to run the program, check memory requirements to ensure
What is initialising registers of loaders?
Set program counter to entry point