Applications Generation Flashcards

1
Q

What is system software?

A

Software neede to run the computers application and hardware programs.

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

What is a utility program?

A

A utility performs a specific task related to the upkeep of the system, examples include a firewall or a disk defragmenter.

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

How does a disk defragmenter work?

A

Files that have been split up and stored all over a magnetic disk are recombined into sequential blocks in order to speed up file reading.

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

What is open source software?

A

Software licenced for use but free and distributed with the source code with the ability to amend.

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

What is closed source software?

A

Also known as proprietary software, the software is not free and there are restrictions on its usage.

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

What are the benefits of software being open source?

A

Free of cost and the ability to tailor the program to specific needs.

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

What are the benefits of software being closed source?

A

Regular updates and technical support lines are often available.

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

What is assembly code?

A

Low-level language almost equivalent to machine code.

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

What must happen before assembly code is executed?

A

It must be translated into the equivalent machine code or an intermediate code (bytecode) by the assembler.

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

What is the input to an assembler called?

A

Source code.

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

What is the output of an assembler called?

A

Object code.

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

What is a compiler?

A

A program that translates high-level language into machine code.

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

How does a compiler work?

A

The source code is scanned several times each time performing checks and building up tables of information needed to produce the object code.

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

Why might different compilers be needed for different machines?

A

Machine code instructions a processor can execute is completely dependant on hardware as the instruction sets will be different in different processors, therefore object code is hardware specific so different compilers will be needed dependant on processor architecture.

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

What is an interpreter?

A

A programming language translator that looks at the source code line by line checking for syntax errors.

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

What is the purpose of an intermediate code?

A

Intermediate code such as byte code allows for platform independence since the bytecode can be run by a virtual machine, for example, Java Virtual Machine.

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

What are the advantages of using a compiler over an interpreter?

A

Object code from a compiler executes faster than interpreted code and object code produced by a compiler can be run without the compiler present

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

What are the advantages an interpreter has an over a compiler?

A

Platform independence and useful for program development

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

What is a disadvantage of the interpreter?

A

An interpreted program might run slower than a compiled one since a statement has to be converted into machine code every time its encountered so if a loop has a single statement repeated 10 times, rather than convert it into machine code once its interpreted 10 times.

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

What are the three stages of compilation?

A

Lexical analysis, syntax analysis and code generation and optimisation.

21
Q

What happens during lexical analysis?

A

White space is removed
All comments are removed
Simple error checking (Illegal identifiers and illegal values)
All keywords (variable names) are replaced by tokens.

22
Q

What happens during syntax analysis?

A

The code is tested to see if it forms a valid sentence in the language, it does this by expressing the language as a set of rules.
Parsing systematically applies the rules of the language to each statement to determine if it’s valid or not.
The semantics of the program will also be checked to make sure statements make sense.

23
Q

What happens during code generation?

A

Most high-level language statements are translated into machine code statements.

24
Q

What happens during code optimisation?

A

In order to reduce the programs execution time, redundant instructions are removed as well as other things to achieve the same net effect as the original program but by different means

25
Q

What are the disadvantages of code optimisation

A

Increases compilation time and might produce unexpected results

26
Q

What does a linker do?

A

a linker can incorporate the code from the library with the main program into a single executable file

27
Q

What does a loader do?

A

A loader is a small program held in ROM when the computer is turned on the loader sends instructions to load the OS by copying it from storage into RAM.

28
Q

What are the advantages of using a library?

A

Saves time and money

Pre-tested functions (so likely to work.)

29
Q

What is the advantage of using assembly code?

A

Direct control of hardware and the ability to write the exact instructions needed for a task.

30
Q

What is the advantage of high-level languages?

A

High-level languages are much easier to follow and high-level code can be recompiled to meet different architectures meaning it’s not platform dependent.

31
Q

What is machine code?

A

-Processors only understand machine code
-Machine code is binary sequences that represent instructions and data
-Originally no choice but to code in machine code

32
Q

What are Opcodes and Operands?

A

-Opcodes are the sequences contain instructions
-Operands are the sequences containing data

33
Q

What is an instruction set?

A
  • Each processor has its own instruction set
  • They are the instructions that are available for a certain processor to process
  • Code has to be written for each processor
34
Q

What is an assembler?

A
  • Assembler converts assembly into object code
35
Q

Why were HLL’s introduced?

A
  • in the 1950’s due to limitations on assembly code, more money was spent on developing software than purchasing hardware. Even with the relatively higher cost of hardware compared to today
  • Fortran the first HLL made code more-readable
  • HLL needs interpreters and compilers in order to convert it into something the CPU can utilise
36
Q

What is an interpreter? +/-

A

Reads code line by line
Each line is converted into machine code
Then Machine code is executed

+Useful when debugging as the execution will terminate at the line where the error occurs
-Runs slower
-May involve the translation of the same code multiple times
-User needs to have access to an interpreter to execute the code which takes up more memory

37
Q

What is lexical analysis?

A

All comments and whitespace stripped from code
HHL converted into tokens
tries to ID the reserved words (IF, THEN etc), operators, variables and constants
all separate entities become their own tokens

38
Q

What is a symbol table used for?

A

Throughout compilation the complier must track the variables and subroutines within the code
the names of these are added to the symbol table
later on, info such as data type and scope (global/local) are added

39
Q

What is syntax analysis?

A

compiler checks the code has been written in line with syntactic rules of the language

if code doesn’t, a list of syntax errors will be generated

generates an abstract syntax tree (AST) that will represent program

if tokens generated in lexical analysis do not fit into this tree than we have a syntax error

40
Q

What are libraries?

A

Ready-compiled and tested programs that can be run when needed.

41
Q

What is static linking? with a -

A

all library code is inserted directly into the program when it is complies
- final exe very large
- can have multiple exe’s with all the same library embedded

42
Q

What is dynamic linking? with a +, -

A

attempt to bypass the size of static linking by the use of…
compiled versions of the library that are stored on the host computer….
OS links a program to the library when it is run
loaders are core parts of the OS and are tasked with loading a program into memory

+ reduces duplication of library packages
- If dynamic libraries change, or don’t exist on the host computer the program would stop working.

43
Q

Explain how linkers are used during the compilation process

A

The linkers, “link” the main program to the libraries, Which can either include them in the final executable code or get the executable code to point to the external libraries.

44
Q

Explain how linkers are used during the compilation process

A

The linkers, “link” the main program to the libraries, Which can either include them in the final executable code or get the executable code to point to the external libraries.

45
Q

Name an advantage of the use of library files for programmers

A

+ Quick and easy to use and hook into your own code. (saves time)
+ Pre-tested, so you can be relatively sure they are already free from errors. (saves time)
+ Pre-compiled, so they are typically optimized to run quickly.

+ Makes debugging easier, saving time
+ Saves time because there is no need to rewrite code
+ Has already been tested, which saves time.
+ Uses the expertise of others to complete that that require specialists.

46
Q

Name a disadvantage of the use of library files for programmers

A
  • The whole library is compiled into the file which would increase the size of the compiled file
  • You have to trust that the developer will continue to maintain the library.
47
Q

Explain how linkers are used during the compilation process

A

Links the main program to libraries can either include them in the final executable code,m or get the executable code to point to the external libraries.

48
Q

Give me an example of a library.

A
  • Program files
  • GUI Routines written by other authors.