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

Unit 2 Systems Software 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)
762 views5 pages

Unit 2 Systems Software 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
  • Question 1: Operating Systems
  • Question 2: Multi-Tasking Systems
  • Question 3: Embedded Systems
  • Question 4: Bytecode and Virtual Machines

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]

Common questions

Powered by AI

A teacher might opt for proprietary software for teaching graphic design because it has been extensively tested by numerous users, resulting in a more stable and reliable product. It also typically comes with technical support and documentation, making it easier for students to learn and troubleshoot. Additionally, the possibility to acquire a multi-user site license makes it economically viable for schools, and the necessity to modify the source code is generally not needed for educational purposes, making proprietary software a practical choice .

Assembly code offers advantages over machine code because it uses mnemonics, such as INP and ADD, which are easier to remember and understand than binary codes used in machine code. Each assembly instruction correlates directly with a machine operation, bridging the gap between human understanding and machine execution. This makes it more accessible for programmers to write and debug code since they can employ meaningful text instead of abstract binary instructions .

The compilation process includes several stages: lexical analysis, parsing (syntax analysis), and semantic analysis. Lexical analysis involves tokenizing the code and removing unnecessary whitespace and comments. During parsing, the tokenized code is checked against language rules, and syntax errors are identified in this stage. Semantic analysis follows, ensuring that symbol and type declarations are meaningful within the program's context. Syntax errors, such as typographical mistakes, are most likely detected during the parsing stage, as demonstrated by the misspelling of "PRINT" as "PRNIT" .

An operating system manages interactions between the user, the application software, and hardware through several functions. It provides a user interface, which acts as a bridge between the user and the hardware, enabling communication and command input. Memory management is another crucial function, allocating RAM to different programs to ensure each process gets a share, and managing paging when RAM is insufficient. Additionally, it handles interrupts to change CPU processing priorities and uses processor scheduling to allow multitasking and ensure fair CPU time allocation among users and processes .

Creating a CGI advertisement requires significant processing power due to the complexity of graphics rendering. A distributed operating system is recommended because it can combine the processing power of multiple networked computers, handling intensive computations and rendering tasks more efficiently than a standalone system. This setup enhances the ability to manage large datasets and complex calculations necessary for high-quality CGI production .

Disk defragmentation is beneficial for magnetic hard drives because it optimizes file storage by reorganizing scattered pieces of data, reducing the physical movement of read/write heads needed during access, which is relatively slow compared to CPU speed. In contrast, solid-state drives have no moving parts, allowing access to memory without delay due to physical movement, hence defragmentation offers no performance benefit and is generally unnecessary for SSDs .

A virtual machine enhances security by acting as a layer between executable code and actual hardware. Users run the virtual machine, which is a trusted application, rather than executing the downloaded code directly, which may be malicious. If potentially harmful code is detected, the virtual machine alerts the user without allowing the code to harm the system. This trust model ensures that only safe, confirmed operations are executed on the host system, effectively isolating and neutralizing malicious threats .

Bytecode is an intermediate code between high-level and machine code, making it possible for programs to be portable across multiple platforms. A virtual machine plays a crucial role by interpreting bytecode for specific hardware, allowing the same code to run on different systems with compatible interpreters. This setup enables software to maintain functionality across varied environments without needing recompilation, thus enhancing portability .

Using virtual memory is less effective than adding more RAM because it relies on disk space to simulate additional RAM, which involves swapping pages in and out of virtual memory. This swapping process consumes resources, slowing down processing because accessing data from the hard drive is slower than accessing data from RAM. Additionally, more RAM allows more processes to be directly loaded into main memory, avoiding disk thrashing, which occurs when the system spends more time swapping pages than executing tasks .

A paging table is used by an operating system to manage memory allocation by dividing memory into equal-sized blocks called pages. These pages may not be contiguous in physical memory, so the paging table keeps track of their logical and physical locations. This allows the system to keep track of where each block of a program is held in memory, facilitating efficient memory allocation and retrieval. It is necessary to ensure that memory can be dynamically allocated and optimized, especially in systems where demands for memory exceed available RAM .

Assessment - Systems software and applications Answers
1. 
(a) An operating system is required to manage interactions between
(b) Explain how it is possible for a single processor to appear to be multi-tasking. 
[2]

Scheduling algorithms mean multip

Large amount of processing power necessary for this task

Can combine the processing power of lots of computers networked
(c) Cathryn is a teacher who wants her students to be able to manipulate photographs 
using a graphics package. Explain why s

Syntax analysis 
(the key word PRINT is spelt wrong, causing it to be assumed to be an identifier, 
which breaks the rules

You might also like