0% found this document useful (0 votes)
319 views5 pages

Unit 2 Assessment Answers

Uploaded by

reyyanqasim7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
319 views5 pages

Unit 2 Assessment Answers

Uploaded by

reyyanqasim7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Assessment - Systems software and applications Answers

1. (a) An operating system is required to manage interactions between the user, the
application software and the hardware. Describe three functions the operating
system provides. [6]

 User interface
 …act as a bridge between the user and the hardware
 Memory management
 …allocate RAM to different programs and ensure each process gets a share
 Interrupt handling
 …change what is being processed by the CPU on a priority basis
 Processor scheduling
 …allow multi-tasking / maximise CPU usage / ensure users/processes gain a fair
share of CPU time

(b) The operating system may use a paging table. Explain what is meant by a
paging table is and why it is necessary. [3]

 Memory is allocated to a program in equal sized blocks called pages


 These blocks might not be contiguous
 Paging table keeps track of the logical and physical locations of memory/where
each block is held in memory

If the demands for memory within a system exceed the available RAM, an area of the hard
drive can be designated as virtual memory to cope with the demand.

(c) Explain why using virtual memory is not as effective as adding more RAM. [2]

 Pages must be swapped in and out of the virtual memory


 …the swapping itself uses resources thus slowing down the processing
 Reading from disk is slower than reading from RAM
 More RAM would mean more processes directly loaded into main memory
 Disk thrashing is avoided if virtual memory is not used

2. (a) The CPU must be able to process interrupts. State how a CPU determines if an
interrupt has been raised. [2]

 After each fetch execute cycle


 …the CPU checks to see if an interrupt flag has been set

1
(b) Explain how it is possible for a single processor to appear to be multi-tasking. [2]

 Scheduling algorithms mean multiple processes can share one CPU


 Multiple processes are not really using the CPU at once / CPU can only execute
instructions for one process at a time
 …but processing is swapped between processes so quickly that a human cannot
tell

(c) What are the aims of a scheduling algorithm in a multi-tasking system? [2]
 To provide an acceptable response time to all users / To ensure fairness on a
multi-user system
 To maximise the time the CPU is usefully engaged

(d) Describe the round robin scheduling algorithm used by a multi-tasking


operating system. [2]
 Each job in rotation is allocated a time slice during which it can use the CPU’s
resources
 If the job has not completed by the end of its time slice, or if an interrupt occurs,
e.g. user input is required, the next job is allocated a time slice/the CPU is
allocated to the next job

3. Embedded systems are used in a car to monitor the car’s performance and improve the
driving experience, using sensors as input.

(a) Identify two features of embedded systems which make them suitable
for this task. [2]

The hardware needs to run a specific



application reliably
The hardware needs to run a variety of
applications
The OS and applications can be

optimised for the hardware

Applications are held in RAM

A sophisticated user interface is possible

The car company wants to create a video advertisement for the car involving computer
generated imagery (CGI) of the car travelling in space.

(b) Explain and justify which type of operating system would be the most suitable
for the creation of a CGI advertisement. [3]

 Distributed OS
2
 Large amount of processing power necessary for this task
 Can combine the processing power of lots of computers networked together and
controlled by a distributed operating system.

4. (a) Explain the term bytecode [2]

 Bytecode is intermediate code between high level and machine code, produced by
some compilers instead of object code
 A bytecode interpreter translates the bytecode to machine code
 It allows code to be portable to multiple platforms

(b) Explain how bytecode improves portability [2]

 User downloads the bytecode interpreter for their platform


 Bytecode can be converted to machine code and run on any platform with a
compatible interpreter

(c) Explain what is meant by a virtual machine. [2]

 Software implementation emulating the behaviour of particular hardware


 e.g. Java is compiled to bytecode and executed on a Java Virtual Machine (JVM)
which can convert the bytecode into machine code for that particular computer.

(d) Explain how the use of the virtual machine protects the user from potential
effects of a virus. [2]

 User executes the virtual machine (which is a trusted program) not the code
directly, which could contain a virus
 If suspicious code found, the user is informed without damage to their system

5. (a) Explain the difference between systems software and applications software. [2]

 Systems software needed so the system can operate / performs tasks necessary
to keep the system running smoothly
 Applications software performs tasks that benefit the user

(b) Compare the benefit of disk defragmentation for files stored on a magnetic
hard drive and files stored on a solid state drive. [3]

 Accessing different areas of a magnetic disk requires physical movement


 This is very slow if different areas of the disk need to be accessed (compared to
the CPU speed)
 Solid state storage does not require physical movement to access memory
 So there is no benefit to defragmentation

3
(c) Cathryn is a teacher who wants her students to be able to manipulate photographs
using a graphics package. Explain why she might choose proprietary software
for this task. [2]

 Tested by lots of users already so it is likely to be error-free


 May be able to get a multi-user site licence for the school
 No need to be able to modify the source code

6. Jacob is writing some assembly code as follows:

INP
STA x
INP
ADD x
OUT
HLT
x DAT

(a) What type of translator converts assembly code into machine code? [1]
Assembler

(b) Explain why it is easier for Jacob to write in assembly code than to write
machine code. [2]

 Assembly code contains mnemonics to aid memory / e.g. INP, ADD


 Each instruction corresponds to a machine code operation
 Machine code looks like 001010101 / is intended for computers to execute
 It is too hard for humans to remember/understand the binary codes /instructions

7. (a) When high level code is compiled it goes through several stages.
Describe the role of the following in the compilation process:

(i) Lexical analysis (lexing) [2]

 Removing unnecessary whitespace and comments


 Tokenizing the code
(ii) Parsing / syntax analysis [2]

 Checking the token stream against the rules of the language


 Records errors to be reported if rules are broken

(iii) Symbol table [2]

 Stores key words/identifier names/data types


 Keeps track of the run-time memory address for each identifier

(b) State the stage in the compilation process when the compiler is most likely to detect an
error in the following programs. Assume the whole program is shown in the example.
(i) animal = “cat”
PRNIT animal [1]

4
 Syntax analysis
(the key word PRINT is spelt wrong, causing it to be assumed to be an identifier,
which breaks the rules of the language)

(ii) cost_per_mile = 3
journey_cost = cost_per_mile * miles [1]
ss
 Semantic analysis
(the variable miles is not defined before it is used)
[Total 50 marks]

You might also like