1.2 Software and software development Flashcards
What is an operating system?
a collection of programs that provide an interface between the user and the computer
What are some features of OS/operating systems? (5)
-memory management
-file management
-security/authentication
-utility software
-user management/interface
What are the forms of memory management used by the OS? (3) Why are these used instead of RAM?
-paging
-segmentation
-virtual memory
when RAM isn’t large enough to store all the programs being used, these are techniques to ensure that requests/programs are still handled
What is paging?
-form of memory management used by the OS
-memory split into equal sizes
-physical divisions of memory
-pages are swapped between main memory and the hard disk as needed
What is segmentation?
-form of memory management used by the OS
-memory split into logical sized divisions (segments)
-unequal sizes
-segments represent the structure and logical flow of the program
What is virtual memory?
-form of memory management used by the OS
-section of the hard drive acts as RAM when space to store programs is low
-sections of programs not currently being used are temporarily moved into virtual memory through paging
What is an issue when using the memory management techniques?
disk thrashing
-the computer ‘freezes’ due to pages being swapped too frequently between the hard disk and main memory
What are interrupts?
signals generated by software or hardware to indicate to the processor that a process needs attention
What is needed to be considered when allocating processor time to interrupts?
the level of priority it has
How are interrupts stored?
stored within a priority queue in an interrupt register
How can we check for interrupts and service them?
through the interrupt service routine (ISR)
What does the ISR do to check for interrupts?
checks the interrupt register at the end of each FDE cycle
What does the ISR do if an interrupt exists?
if there is an interrupt which exists with a higher priority to the current process:
-current contents of the registers in the CPU are transferred to a stack
-a relevant ISR is loaded into RAM
-a flag is sent to signal the ISR has begun
-the flag is reset once the ISR has finished
-process is repeated
What happens after the ISR has serviced an interrupt?
-f there are no interrupts with a higher priority to the current process:
-contents of the stack are popped back into the registers
-FDE cycle resumes
What is scheduling?
allocating processing time to sections of programs being run (jobs)
What do we mean if something is pre-emptive?
jobs are actively made to start and stop by the OS
What do we mean if something is non pre-emptive?
once a job has been started, it is left alone until completed
What are the types of scheduling algorithms? (5) List if they are pre-emptive or not
Pre-emptive:
round robin
shortest remaining time (SRT)
multilevel feedback queues (MLFQ)
Non pre-emptive
first come first serve (FCFS)
shortest job first (SJF)
What is round robin?
scheduling algorithm
-each job given a section of processor time (time slice) where it runs
-once the job has used its first time slice, they are given another slice of processor time until the job is completed
-once completed, the job is removed from the queue
What are +/- of round robin?
+all jobs will eventually be attended to
-longer jobs will take a much longer time for completion
-doesn’t take into account priorities/urgencies of jobs
What is FCFS?
scheduling algorithm (first come first served)
-jobs are processed in chronological order by which they entered the queue
What are some +/- of FCFS?
+straightforward to implement
-doesn’t take into account priorities/urgencies of jobs
What is MLFQ?
scheduling algorithm (multilevel feedback queues)
-makes use of multiple queues, ordered based on priorities
What are +/- of MLFQ?
+takes into consideration of different job priorities
-difficult to implement
What is SJF?
scheduling algorithm (shortest job first)
-queue for jobs to be processed is ordered according to time required for completion (longest job serviced at the end)
What do we mean by processor starvation?
when a process cannot complete its execution as its constantly denied processor time
What are some +/- of SJF?
+suited to batch systems as waiting time is reduced
-requires processor to calculate how long each job will take
-processor starvation if jobs are continuously added to the queue
-doesn’t take into account priorities/urgencies for jobs
What is SRT?
scheduling algorithm (shortest remaining time)
-queue for jobs to be processed is ordered according to the time left for completion (jobs which are fastest to complete serviced first)
What are some +/- of SRT?
+throughput is increased as shorter processes can be quickly completed
-doesn’t take into account priorities/urgencies for jobs
-processor starvation if short jobs are continuously added to the queue
What are the different types of OS? (5)
-distributed
-embedded
-multi-tasking
-multi-user
-real time
How does a distributed OS work?
-run across multiple devices
-load of a task is spread across multiple computer processors
How does an embedded OS work? Provide its characteristics
-built to perform a small range of specific tasks
-catered towards a specific task e.g. household appliance
-limited functionality
-hard to update
-consumes less power than other types of OS
How does multi-tasking OS work?
-enables user to carry out tasks simultaneously
-time slicing used to quickly switch between programs and applications in memory
How does multi-user OS work?
-multiple users make use of one computer
-a scheduling algorithm is used to allocate processor time fairly between jobs and prevent processor starvation
How does real time OS work?
-used in time-critical computer systems
-designed to perform a task within a guaranteed time frame
What is a BIOS?
basic input output system
-a program responsible for loading the OS when it first turns on
-performs tests before loading OS system
How does the BIOS test the computer system before loading the OS?
-performs a POST (power-on self test)
-ensures all hardware is correctly connected and functional
Where is the BIOS stored?
in the ROM
What is a device driver?
computer programs that allow the OS to interact with hardware
-specific to the computer’s architecture
-specific to the OS
What are virtual machines?
a theoretical computer and software implementation of a computer system
-provides an environment with a translator for intermediate code to run
What is intermediate code?
code halfway between machine code and object code
-independent of processor architecture (can run across different machines and OS)
-takes longer to execute than low-level code
What are some uses of virtual machines?
-testing programs
-protection from malware
-running software which may be incompatible with variations of OS
What is application software?
software used by the end-user
-performs one specific task
Give some examples of application software (5)
-word processor
-database
-web browser
-communication software
-video editing software
What is systems software?
software which manages computer resources
-ensures consistently high performances
What are some examples of systems software? (4)
-utility software
-OS
-device drivers
-library programs
What is the purpose of utility software?
maintains the OS
-each has a specific function
Give some examples of utility software (5)
-antivirus
-disk defragmentation
-data compression
-system clean up
-automatic backup
How is data compression a utility software?
maintains the OS
-compresses large files to be transmitted across the internet
-reduces the sizes of files, makes it faster to download and increases space
How is an antivirus a utility software?
maintains the OS
-responsible for detecting potential threats to the computer
-it alerts the user and removes these threats
How is disk defragmentation a utility software?
maintains the OS
-rearranges the contents of the hard drive so data can be accessed faster, improving performance
How is automatic backup a utility software?
maintains the OS
-creates copies of specific files which can be determined by the user
-if there is power failure/a malicious attack/accident, files can be recovered
How is a system clean up a utility software?
maintains the OS
-allows you to get rid of old cache/data which may have built up over time
What do we mean when software is open source?
the software can be used by anyone without a license and is distributed with the source code
What do we mean when software is closed source?
the software requires the user to have a license to use it
-users cannot access the source code as the company owns the copyright license
What are some advantages of open source software?
-can be modified and improved by anyone
-technical support from online community
-can be modified and sold on
What are some disadvantages to open source software?
-support available may be inadequate (no user manuals)
-lower security
What are some advantages of closed source software?
-regular, well-tested updates
-company provides expert support and user manuals.
-high levels of security as the software is developed professionally
What are some disadvantages of closed source software?
-license has restrictions about use
-users cannot modify and improve software
What factors are needed to be considered when choosing open/closed source software?
-suitability to the task
-cost
-functionality
What are translators?
programs which convert source code into machine code
What are the different types of translators? (3)
-compiler
-interpreter
-assembler
How does a compiler work? List some of its characteristics (3)
translates high level code into machine code all at once
-initial compilation process is longer than using other translators
-compiled code is platform specific
-compiled code can be run without a translator present
How does a translator work? List some of its characteristics (5)
translates and executes code line-by-line
-produces an error if a line contains an error
-slower than running compiled code
-correct interpreter required to run on different platforms
-code is platform-independent
-useful for testing code
How does an assembler work?
translates assembly code into machine code
- each line of assembly code is equivalent to one line of machine code (1:1)
(assembly code- low level language, platform specific)
What are the different stages of compilation? (4)
-lexical analysis
-syntax analysis
-code generation
-optimisation
What occurs during lexical analysis? (3)
-whitespace and comments are removed
-keywords and identifiers are replaced with tokens
-info about tokens is stored in a symbol table
What occurs during syntax analysis? (3)
-tokens analysed against rules of the programming language
-syntax errors are flagged up
-abstract syntax tree is produced
What occurs during code generation? (1)
abstract syntax tree is used to produce machine code
What occurs during optimisation? (3)
-aims reduce execution time
-redundant parts of code are removed
What are some +/- of using an assembler? (3 each)
+memory efficient
+speed of execution is faster
+requires fewer instructions to complete the same result
-takes a lot of time to code/write programs as its complex
-difficult to remember the syntax
-lack of portability between computers of different makes
What are some +/- of using a compiler? (4 each)
+no need for translation at run-time
+speed of execution is faster
+code is usually optimised
+original source code kept secret
-program wont run with syntax errors
-difficult to write code
-code needs to be recompiled when changed
-designed for a specific type of processor
What are some +/- of using an interpreter? (3, 4)
+easy to write source code as program runs line by line, stopping when there is a syntax error
+when code is changed, it doesn’t need to be recompiled
+easier to debug
-translation software required at run-time
-speed of execution is slower
-code not optimised
-source code required
What is a linker?
software that links external modules and libraries included within the code
What are some types of linkers? (2)
-static
-dynamic
How does a static linker work?
-module/library code is copied directly into the file
-increases the size of the file
How does a dynamic linker work?
-address of modules/libraries are added to the file
-external module/library updates automatically feed through to the main file
What are loaders?
programs provided by the OS
- fetches the library/module from the given memory location
What are the advantages/uses of libraries? (5)
-pre-compiled programs can be incorporated within other programs
-error-free
-save time and effort of developing and testing modules
-can be reused across multiple programs
-increases efficiency of the development process
What are software development life cycles (SDLCs)?
using different approaches/methods to develop software
What stages do the SDLCs consist of? (7)
-analysis
-design
-development
-testing
-implementation
-evaluation
-maintenance
Give some examples of SDLCs (5)
-waterfall lifecycle
-rapid application development (RAD)
-extreme programming
-agile methodologies
-spiral model
Describe the waterfall lifecycle (3)
-stages completed in sequence from start to finish
-clear structure= easy to follow
-to make changes, need to revisit all stages in between
What is the waterfall cycle mainly used for?
for static, low risk projects which need little user input e.g. general purpose software
What are some +/- of using the waterfall lifecycle? (2, 3)
+straightforward to manage
+clearly documented
-lack of flexibility
-no risk analysis
-limited user involvement
Describe agile methodologies (5)
-collection of methodologies which aim to improve the flexibility of SDLCs
-different sections of the program are developed in parallel so can be at different stages of development simultaneously
-working prototype delivered early on and can be improved in an
iterative manner
-less of a focus on documentation
-user satisfaction is prioritised
What are the uses of agile methodologies?
for small to medium projects with unclear initial requirements
What are some +/- of agile methodologies? (3, 2)
+produces high quality code
+flexible to changing requirements
+regular user input
-poor documentation
-requires consistent interaction between user and programmer
Describe extreme programming (6)
-example of an agile model
-development team is a pair of programmers and a representative end-user
-‘user stories’ determine system requirements
-produces high quality code and highly usable software
-programmers work no longer than 40 hours per week
-hard to produce high quality documentation
What are the uses for extreme programming?
for small to medium projects with unclear initial requirements requiring excellent usability
What are some +/- of extreme programming? (2, 3)
+produces high quality code
+constant user involvement= high usability
-high cost of two people working on one project
-teamwork is essential
-end user may not be able to be present
Describe the spiral model (5)
-has four key stages
- analysing system requirements
- pinpointing and mitigating tasks
- development, testing and implementation
- evaluating to inform the next iteration
-project terminated if too risky
What are the uses of the spiral model?
for large, risk-extensive projects with a high budget
What are some +/- of spiral model? (3 each)
+thorough risk analysis and mitigation
+caters to changing users needs
+produces prototypes throughout
-expensive to hire risk assessors
-lack of focus on code efficiency
-high costs due to constant prototyping
Describe RAD (5)
-iterative methodology which uses partially functioning prototypes
-user requirements are gathered using focus group
-‘incomplete’ version of the solution is given to user to trial
user feedback used to generate next improved prototype
-final prototype matches user requirements fully
-code may be inefficient
What are the uses of RAD?
for small to medium, low-budget projects with short time-frames
What are some +/- of RAD? (3, 2)
+caters to changing user requirements
+highly usable finished product
+focus on core features, reducing development time
-poorer quality documentation
-fast pace and late changes may reduce code quality
What is an algorithm?
a set of instructions used to solve a problem
What are all the symbols used in flowcharts? What do they do? (6)
https://bam.files.bbci.co.uk/bam/live/content/zvf3d6f/large
What are programming paradigms?
different approaches to using a programming language to solve a problem
What are the two categories of programming paradigms?
-imperative
-declarative
What is an imperative programming paradigm?
code that clearly specifies the actions to be performed
What are the two types of paradigms from imperative programming?
-procedural
-object-orientated
Describe procedural paradigms
widely used paradigms as it can be applied to a range of problems
-easy to write and interpret
-written as a series of instructions
-instructions are carried out step-by-step
What is object-orientated programming (OOP)?
programming suited to problems which can be broken into reusable components with similar characteristics
-based on objects formed from classes which have attributes and methods
-focuses on making programs that are reusable and easy to update and maintain
What is a class?
a template for an object- defines the properties and actions
What are attributes?
properties an object has
What are methods?
actions that an object can perform
What is instantiation?
a process where classes are used to create objects
What is a setter?
a method that sets the value of a specific attribute
What is a getter?
a method which retrieves the value of a given attribute
What is encapsulation?
when getters and setters ensure that attributes cannot be directly accessed and edited but only be altered by public methods
What is a constructor method?
allows a new object to be created by the class
What is inheritance?
a process where a subclass inherits all of the methods and attributes of the superclass (base class)
-subclasses can also have additional properties
What is polymorphism?
enables objects to behave differently depending on their class
What are the two categories of polymorphism?
-overriding
-overloading
What is overloading?
when we pass different parameters into a method
What is overriding?
when we redefine a method so it functions differently and produces a different output
What are some advantages of OOP? (4)
-high level of reusability
-code made more reliable through encapsulation
-makes code easy to maintain and update
-classes can be reused as a black box which saves time and effort
What are some disadvantages of OOP? (3)
-requires an alternative style of thinking
-not suited to all types of problems
-generally unsuitable for smaller problems
What is assembly language?
low level language, next level up from machine code
-uses mnemonics, abbreviations for machine code instructions
-1:1 ratio of assembly and machine
-processor specific
What are all the mnemonics/little man computer (LMCs) needed to know? Give its functions (11)
https://o.quizlet.com/q0VmI4ZVFpVY6N.olvOEqA.png
What is an addressing mode?
specifies how the operand should be interpreted
What are the four addressing modes?
-immediate addressing
-direct addressing
-indirect addressing
-indexed addressing
What does immediate addressing do?
makes the operand the actual value where the instruction is to be carried out
What does direct addressing do?
makes the operand give the address which holds the value where the instruction will be carried out
What does indirect addressing do?
makes the operand give the address of a register which holds another address, where the data is located
What does indexed addressing do?
uses an index register, storing a certain value
-address of the operand is determined by adding the operand to the index register