Chapter 20: System Software Flashcards
1
Q
List strategies to manage the main program.
A
- Partitioning
- Paging / Virtual Memory
- Segmentation
2
Q
Describe the process of Partitioning.
A
- The memory is divided into partitions, and one or more programs are loaded in each partition.
- These partitions can either be of a fixed size or dynamic.
- Each partition can be used for different types of jobs.
- These programs are scheduled when the partition has the space for the whole program.
3
Q
Describe the process of Paging/ Virtual Memory.
A
- The program is divided into a number of pages of the same size.
- Not all of the pages needs to be initially loaded, and they are swapped in or out of the memory as needed.
- A paging table is used to schedule.
4
Q
Describe the process of Segmentation.
A
- The programmer divides the programs into segments.
- These segments can be of varying size.
- Segments are loaded as and when required during execution.
5
Q
Explain what happens during the lexical analysis. (5 Points)
A
- Whitespace and comment statements are removed.
- Obvious errors are checked.
- All langugae keyboards are replaced with their tokens, using the keyword table.
4.Identifier names are placed in the symbol table. - The identiifer is searhced for in the symbol table, and the name is replaced by a pointer value in the source code.
6
Q
Explain the need for intermediate code and its purpose in a virtual machine. (8 marks)
A
- Intermediate code is a simplified version of code, produced by a compiler, and considered to be between high level and machine code.
- Intermediate code is needed because it allows portability between machines and can be allow different sections of the code to be in different languages and by different programmers. This is suitable for specific tasks and is considered to be essentially error free.
- This is exactly why it can be used in a virtual machine, which is an emulation of software used to implement a hardware set up, it can be consideres to be a theoretical computer.
- This provides an environment for the intermediate code, where a translator is available that can convert code from one language to another and can convert source code to object code.