Chapter 8 System Software and OS - Full Notes

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

The Westminster School, Dubai

2023-2024

Name: …………………………… Year:12 / Sec: …….

Subject: Computer Science Date: ………………..

Topic : System Software

1.

Chapter 8 System Software and OS _Full notes.docx


2 Identify four key management tasks that the Operating System will perform.

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.

4 Identify two debugging tools that a typical IDE can provide.

Chapter 8 System Software and OS _Full notes.docx


5

6 Explain the benefits to the programmer of using program libraries.

1 mark per bullet point to max 3


• Saves (programming/testing) time as code does not have to be
written/re-written from scratch // code does not have to be tested
• Code is already tested so it is more robust/likely to work
• If there is an improvement in the library routine the program updates
automatically
• can perform complex calculations that the programmer may be unable to do

7 A programmer uses language translators when writing and testing a program.


(a) Describe the operation of a compiler.

1 mark per point to max 2


e.g.
• Attempts to translate the whole source code
• Creates a separate error report at the end of the translation process
• If translation successful / no errors creates an executable file

Chapter 8 System Software and OS _Full notes.docx


(b) Describe the operation of an interpreter.

1 mark per point to max 2


e.g.
• Reads each line then translates it and executes it
• Stops when an error is encountered // displays errors where it finds
Them

8 Explain how a programmer can make use of a typical Integrated Development Environment
(IDE) when writing and testing a program.

1 mark per point, max 2 for writing, max 2 for testing

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

9 A computer has system software including an operating system.


(a) Describe the key management tasks of an operating system.

Chapter 8 System Software and OS _Full notes.docx


10 Utility software is a type of system software.
(i) Describe the purpose of back-up software and defragmentation software.

11 Give one other example of utility software.

12 A computer has an Operating System (OS).


(a) Describe how the Operating System manages the peripheral hardware devices of the
computer.

13 The Operating System has utility software including defragmentation software.


Explain how defragmentation can improve the performance of the computer.

1 mark each to max 3


• Rearranges blocks of individual files (on the HDD) so they are
contiguous // moves the free space together
• Accessing each file is faster
• …because there is no need to search for the next fragment / block of
the file
• …so less head movement is needed

14 A program is written in assembly language.


(a) The program is converted into machine code by a two‑pass assembler.
Draw one or more lines to identify the pass or passes in which each action takes place.

Chapter 8 System Software and OS _Full notes.docx


15 The laptop has systems software.
(i) Describe how the Operating System (OS) manages processes in the computer.

16 Describe the purpose of utility software in a computer.

1 mark each to max 2


• To help users to set-up / configure / analyse / optimise / maintain the
computer ...
• ... by for example, making memory allocation more efficient
• ... by for example, checking the system for faults
Chapter 8 System Software and OS _Full notes.docx
17 A software developer is working in a team writing a program for a client.
(a) The developer is writing a new program library to be used by the other team members.
(i) Define the term program library.

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.

Chapter 8 System Software and OS _Full notes.docx


20

Ans:

21 A programmer is developing a computer game in a high-level language to sell to the public.


(a) The programmer uses both an interpreter and a compiler at different stages of the
development of the program.
(i) Explain the reasons why the programmer uses an interpreter while writing the program
code.

22 Explain the reasons why the programmer uses a compiler when the program has been
written.

Chapter 8 System Software and OS _Full notes.docx


23

Ans:

24 Francis’s team use language translators.


Complete the descriptions of language translators by writing the missing words.
............................................... are usually used when a high‑level language program is
complete. They translate all the code at the same time and then run the program.
They produce ............................................... files that can be run without the source code.
............................................... translate one line of a high‑level language program at a time,
and then run that line of code. They are most useful while developing the programs because
errors can be corrected and then the program continues from that line.
Assemblers are used to translate assembly code into ............................................... .

Chapter 8 System Software and OS _Full notes.docx


Ans:

25

Ans:

Chapter 8 System Software and OS _Full notes.docx


26 Describe the file management tasks that an Operating System performs.

27 Identify two utility programs that can be used to improve the performance of a computer and
state how they improve the performance.

28

Chapter 8 System Software and OS _Full notes.docx


29 Compilers and interpreters translate programs written in a high-level language into a low-level
language.
(i) State two drawbacks of using a compiler compared to an interpreter during program
development.

30 Explain why high-level language programs might be partially compiled and partially
interpreted.

Chapter 8 System Software and OS _Full notes.docx


31

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.

Language translator Definition

Chapter 8 System Software and OS _Full notes.docx


33 Describe two differences between a compiler and interpreter.

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:

Chapter 8 System Software and OS _Full notes.docx


35 A game program is written which can be either interpreted or compiled. The table below shows
five statements about the use of interpreters and compilers.
Tick (✓) to show whether the statement refers to an interpreter or to a compiler.

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

Chapter 8 System Software and OS _Full notes.docx


38 A user has the following issues with the use of his PC. State the utility software which should
provide a solution.
The hard disk stores a large number of video files. The computer frequently runs out of
storage space.
Utility software solution .................................................................................................[1]
(ii) The user is unable to find an important document. He thinks it was deleted in error some
weeks ago. This must not happen again.
Utility software solution .................................................................................................[1]
(iii) The operating system reports ‘Bad sector’ errors.
Utility software solution .................................................................................................[1]
(iv) There have been some unexplained images and advertisements appearing on the
screen. The user suspects it is malware.
Utility software solution .................................................................................................[1]

Ans:

39 Explain why a personal computer (PC) needs an operating system (OS).


Two from:
 The hardware is unusable without an OS // hides complexity of hardware
from user 1
 Acts as an interface/ controls communications between user and hardware /
hardware and software // or by example 1
 Provides software platform / environment on which other programs can be
run 1

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:

Chapter 8 System Software and OS _Full notes.docx


Notes

An Operating system is a program or set of programs that manages the operation


of the computer. It is a program that controls the execution of all other programs
and acts as an intermediary between users and computer.
Key management tasks carried out by the operating system are
• User system interface
• Process management
• Memory management
• I/O Control(hardware management)
• File Management
• Security Management

1. User –System Interface

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.

A command line interface


A graphical user interface (GUI)

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

Chapter 8 System Software and OS _Full notes.docx


However, smart phones, tablets and many computers now use a post-WIMP interaction where fingers
are in contact with the screen, allowing actions such as pinching and rotating which are difficult using a
single pointer and device such as a mouse. Also, simply tapping the icon with a finger (or stylus) will
launch the application. Developments in touch screen technology mean these flexible HCIs are now
readily available.

2. Process Management

Program – Hardware Interface


The OS has to ensure that the hardware does what the software wants it to do. The OS has to
provide the mechanism for the execution of the developed program.

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.

This can be done with the use of


• a single (contiguous) allocation, where all of the memory is made available to a single
application. This is used by MS-DOS and by embedded systems
• partitioned allocation, where the memory is split up into contiguous partitions (or blocks) and memory
management then allocates a partition (which can vary in size) to an application • paged memory, which
is similar to partitioned allocation, but each partition is of a fixed size. This is used by virtual memory
systems
• segmented memory, which is different because memory blocks are not contiguous – each segment of
memory will be a logical grouping of data (such as the data which may make up an array).

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.

Chapter 8 System Software and OS _Full notes.docx


4. Device Management(I/O controlling))

• 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

• File naming conventions


• Directory (Folder) Structure
• Access control Mechanism

The main tasks of file management include


• defining the file naming conventions which can be used (filename.docx, where the extension can be
.bat, .htm, .dbf, .txt, .xls, and so on)
• performing specific tasks, such as create, open, close, delete, rename, copy, move
• maintaining the directory structures
• ensuring access control mechanisms are maintained, such as access rights to files, password
protection, making files available for editing, locking files, and so on
• ensuring memory allocation for a file by reading it from the HDD/SSD and loading it into memory.

6. Security Management

• Provision for recovery when data is lost


• Prevention of intrusion
• Ensuring data privacy

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).

Chapter 8 System Software and OS _Full notes.docx


7. Error detection & Recovery

• 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

2. Disk contents analysis/Disk repair software

• 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.

Chapter 8 System Software and OS _Full notes.docx


3. Hard disk defragmenter

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.

Chapter 8 System Software and OS _Full notes.docx


Language Translators

Chapter 8 System Software and OS _Full notes.docx


Chapter 8 System Software and OS _Full notes.docx
Compilers and interpreters

For an interpreter the following steps apply.

• 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.

For a compiler the following steps apply.

• 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.

Java ( Partial Compiling and Interpreting)

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.

Integrated Development Environment(IDE)

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

Features found in a typical Integrated Development Environment (IDE)

• 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.

Dynamic syntax checks

When a line has been typed, some editors perform syntax checks and alert the programmer to errors.

Expanding and collapsing code blocks

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.

Chapter 8 System Software and OS _Full notes.docx

You might also like