Professional Documents
Culture Documents
Chapter 8 System Software and OS - Full Notes
Chapter 8 System Software and OS - Full Notes
Chapter 8 System Software and OS - Full Notes
2023-2024
1.
Jennifer uses an Integrated Development Environment (IDE) to write her computer program.
(i) The IDE allows Jennifer to use both an interpreter and a compiler while creating her
computer program.
Describe the ways in which Jennifer can use both a compiler and an interpreter while
developing the program.
8 Explain how a programmer can make use of a typical Integrated Development Environment
(IDE) when writing and testing a program.
Writing e.g.
• Enter code into an editor
• Pretty printing to identify key terms
• Context-sensitive prompts to help complete statements
• Expand and collapse code blocks
• Auto-complete to suggest what to type next
• Auto-formatting to indent code blocks
• Dynamic syntax checking
Testing e.g.
• Single stepping to run the code line by line
• Breakpoints to stop the code at set points to check values
• Report window to see how variables change
18 Explain two benefits to the developer of choosing to create a Dynamic Link Library (DLL).
19 The development team needs to use a translator whilst writing the program for the client.
Identify whether an interpreter or a compiler would be more appropriate at this stage of the
program development. Justify your choice.
Ans:
22 Explain the reasons why the programmer uses a compiler when the program has been
written.
Ans:
25
Ans:
27 Identify two utility programs that can be used to improve the performance of a computer and
state how they improve the performance.
28
30 Explain why high-level language programs might be partially compiled and partially
interpreted.
Ans:
32 Three examples of language translators and four definitions are shown below.
Draw lines to link each language translator to the correct one or more definitions.
34 Assemblers translate from assembly language to machine code. Some assemblers scan the
assembly language program twice; these are referred to as two-pass assemblers.
The following table shows five activities performed by two-pass assemblers.
Write 1 or 2 to indicate whether the activity is carried out during the first pass or during the
second
pass.
Ans:
Ans
36 A virus checker has been installed on a PC. Give two examples of when a virus checker should
perform a check.
any two from:
– checks for boot sector viruses when machine is first turned on
– when an external storage device is connected
– checks a file / web page when it is accessed / downloaded
37
Ans:
40 One of the tasks carried out by the OS is the management of the use of the processor.
Name and describe two other management tasks that the OS performs.
One mark for the name and one mark for description.
Max two management tasks.
Provides the Human Computer Interface (HCI) 1
Controls communications between user and hardware// or by example 1
Main memory management 1
Memory protection to ensure that two programs do not try to use the same
space // Use of virtual memory // Location of processes within the memory // By
example 1
File / Secondary storage management 1
Chapter 8 System Software and OS _Full notes.docx
Maintains directory structures // Provides file naming conventions // Controls
access 1
Peripheral / hardware / device / Input-Output management 1
Installation of appropriate driver software // Controls access to data being sent
to/from hardware/peripherals // Controls access to hardware/peripherals //
manages communication between devices. 1
Interrupt handling 1
Identifies priorities of interrupts // Saves data on power outage // Loads
appropriate Interrupt Service Routine (ISR) // By example 1
Security management 1
Makes provision for recovery when data is lost // Provides usernames and
passwords // Prevents unauthorised access // Ensures privacy of data 1
41
Ans:
A User interface is needed to allow the user to get the software and hardware to do something useful.
Operating system provides the following for user input and output.
The human–computer interface (HCI) is usually achieved through a graphical user interface (GUI),
although it is possible to use a command line interface (CLI) if the user wishes to directly communicate
with the computer.
A CLI requires a user to type instructions to choose options from menus, open software, and so on.
There are often a number of commands that need to be typed; for example, to save or load a file. The
user, therefore, has to learn a number of commands (which must be typed exactly with no errors) just to
carry out basic operations. Furthermore, it takes time to key in commands every time an operation has to
be carried out.
The advantage of CLI is that the user is in direct communication with the computer and is not restricted to
a number of pre-determined options.
GUIs use various technologies and devices to provide the user interface. One of the first commonly used
GUI environments was known as windows, icons, menu and pointing device (WIMP), which was
developed for use on personal computers (PCs). Here, a mouse is used to control a cursor and icons are
selected to open and run windows
2. Process Management
Resource Management
When the execution of a program has begun it is described as a process. In modern computer
system, a process will not be able to run to completion without interruption. At anytime there will be many
processes running on the computer system. Each process needs access to the resources provided by
the computer system.
OS aims to achieve optimum efficiency by providing the resources
• Scheduling of process
• Resolution of conflicts when two processes require the same resource.
3. Memory Management
• Memory Protection ensures that one program does not try to use the same memory locations as
another program.
• Optimum usage of a limited memory size.
• Making decision about which processes should be in main memory at any one time and where
they are stored in this memory.
Memory optimisation
Memory optimisation is used to determine how computer memory is allocated and deallocated when a
number of applications are running simultaneously. It also determines where they are stored in memory.
It must, therefore, keep track of all allocated memory and free memory available for use by applications.
To maintain optimisation of memory, it will also swap data to and from the HDD or SSD.
Memory organisation
Memory organisation determines how much memory is allocated to an application, and how the memory
can be split up in the most appropriate or efficient manner.
Memory protection
Memory protection ensures that two competing applications cannot use the same memory locations at
the same time. If this was not done, data could be lost, applications could produce incorrect results, there
could be security issues, or the computer may crash.
• Hardware management involves all input and output peripheral devices. The functions of
hardware management include
• • communicating with all input and output devices using device drivers
• • translating data from a file (defined by the operating system) into a format that the input/output
device can understand using device drivers
• • ensuring each hardware resource has a priority so that it can be used and released as required.
Managing devices like Printer, Screen, keyboard and web cam
Installation of the appropriate device driver software
• The management of input/output devices is essentially the control and management of queues
and buffers.
For example, when printing out a document, the printer management
• locates and loads the printer driver into memory
• sends data to a printer buffer ready for printing
• sends data to a printer queue (if the printer is busy or the print job has a low priority) before
sending to the printer buffer
• sends various control commands to the printer throughout the printing process
• •receives and handles error messages and interrupts from the printer.
5. File Management
6. Security Management
Security management is another part of a typical operating system. The function of security
management is to ensure the integrity, confidentiality and availability of data.
This can be achieved by
• carrying out operating system updates as and when they become available
• ensuring that antivirus software (and other security software) is always up-to-date
• communicating with, for example, a firewall to check all traffic to and from the computer
• making use of privileges to prevent unauthorized access(this is done by setting up user accounts and
making use of passwords and user IDs). This helps to ensure the privacy of data
• maintaining access rights for all users
• offering the ability for the recovery of data (and system restore) when it has been lost or corrupted
• helping to prevent illegal intrusion to the computer system (also ensuring the privacy of data).
• Errors can arise in the execution of a program either because it was badly written or it has been
supplied with inappropriate data.
• Devices not working properly
Whatever the cause of an error, the operating system should have the capability to interrupt a
running process and provide error diagnostics where appropriate. In extreme cases, the operating system
needs to be able to shut down the system in an organised fashion without loss of data.
Utility Software
A program that performs a very specific task, usually related to managing system
resources. Some of the utility programs are provided by OS and some are installed separately.
➢ Disk Formatter
➢ Virus Checker
➢ Defragmenter software
➢ File Compression
➢ Backup Software
1. Disk Formatter
• Removes existing data from a disk that has been used previously.
• It is a utility program that divides the disk into smaller areas. The disk surface is divided into a
number of tracks and each track is divided into number of smaller blocks called sectors.
• Partitioning the disk into logical drives.
• Disk content analysis/disk repair-bad sector, file system error
• It is a diagnostic utility that checks and repairs file systems errors on a disk drive.
• A disk repair utility program can mark bad sectors as such and ensure that the file system no
longer tries to use them. When the integrity of files has been affected, the utility might be able to
recover some of the data but otherwise it has to delete the files from the file system.
A defragmenter utility program reorganizes the file storage to return it to a state where all files are stored
in contiguous sectors.
Defragmenter software is utility software designed to increase access speed by rearranging files stored
on a disk to occupy contiguous storage locations, a technique called defragmentation.
4. Virus Checker
It is a utility program that continually compares a dictionary of known viruses against the files accessed
by the computer. It alerts the user if any of the files matches a virus.
A virus checking program should be installed as a permanent facility to protect a computer system.
5. File Compression
File compression software reduces the size of a file by cutting out much of the duplication of data in the
file.
Helps to minimize the hard disk storage requirement.
6. Backup Software
A backup is a simple utility program that automatically copies the contents of files to another location.
Establish a schedule for backups
Only create a new back up file when there has been a change.
Types of Back up – Full Back up/Incremental back up/Daily back up
Library Programs
Library program is a collection of stored modules that can be reused by program developers in various
software developments whenever required.
Library routines are already written & tested. So it saves a lot of work.
Code exists in compiled form, no need to recompile
DLL – Dynamic Link Library
Dynamic link library is library program that is loaded only when needed by an application at run time.
Example:
All office programs require the print function, and use it in the same way. It would be wasteful to include
the code for printing in all the programs in the office suite separately. Instead this code is included in a
DLL file, which can be called by any program requiring access to the printer.
• The interpreter program, the source code file and the data to be used by the source code program
• are all made available.
• The interpreter program begins execution.
• The first line of the source code is read.
• The line is analysed.
• If an error is found, this is reported and the interpreter program halts execution.
• If no error is found, the line of source code is converted to an intermediate code.
• The interpreter program uses this intermediate code to execute the required action.
• The next line of source code is read and Steps 4–8 are repeated.
• The compiler program and the source code file are made available but no data is needed.
• The compiler program begins execution.
• The first line of the source code is read.
• The line is analysed.
• If an error is found this is recorded.
• If no error is found the line of source code is converted to an intermediate code.
• The next line of source code is read and Steps 4–7 are repeated.
• When the whole of the source code has been dealt with one of the following happens.
• If no error is found in the whole source code the complete intermediate code is converted into
• object code.
• If any errors are found a list of these is output and no object code is produced.
Execution of the program can only begin when the compilation has shown no errors. This can take place
automatically under the control of the compiler program if data for the program is available.
Alternatively, the object code is stored and the program is executed later with no involvement of the
compiler.
Each different type of computer has to have a Java Virtual Machine created for it. Then when a
programmer writes a Java program this is compiled first of all to create what is called Java Byte Code.
When the program is run, this code is interpreted by the Java Virtual Machine. The Java Byte Code can
be transferred to any computer that has a Java Virtual Machine installed.
An IDE is used by programmers to aid the writing and development of programs. There are many
Chapter 8 System Software and OS _Full notes.docx
different IDEs available.
Examples: NetBeans, PyCharm, Visual Studio etc
• Prettyprinting
• Context-sensitive prompts
• Dynamic syntax checks
• Expanding and collapsing code blocks
• Debugging
Prettyprinting
Prettyprint refers to the presentation of the program code typed into an editor. For example, the Python
IDLE automatically colour-codes keywords, built-in function calls, comments, strings
and the identifier in a function header. In addition, indentation is automatic.
Context-sensitive prompts
This feature displays hints (or a choice of keywords) and available identifiers that might be appropriate
at the current insertion point of the program code.
When a line has been typed, some editors perform syntax checks and alert the programmer to errors.
When working on program code consisting of many lines of code, it saves excessive scrolling if you can
collapse blocks of statements
Debugging
An IDE often contains features to help with debugging. If a Debugger feature has been switched on it is
possible to select a breakpoint. When the program starts running it will stop when it reaches the
breakpoint. The program can then be stepped through, one instruction at a time.