0% found this document useful (0 votes)
20 views

Chapter 5

The document discusses system software and operating systems. It explains the key tasks of an operating system including memory management, process management, and hardware management. It also defines common system utilities like virus checkers, disk formatters, and libraries that help operating systems function smoothly.

Uploaded by

fullnameisit
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Chapter 5

The document discusses system software and operating systems. It explains the key tasks of an operating system including memory management, process management, and hardware management. It also defines common system utilities like virus checkers, disk formatters, and libraries that help operating systems function smoothly.

Uploaded by

fullnameisit
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Revision Guides / AS / COMPUTER SCIENCE / 05 System Software

05 System Software
Candidates should be able to:
Explain why a computer system requires an Operating System (OS)

Explain the key management tasks carried out by the Operating System (OS)

Show understanding of the need for typical utility software provided with an Operating
System

Show understanding of program libraries

Show understanding of the need for:


• assembler software for the translation of an assembly language program
• a compiler for the translation of a high-level language program
• an interpreter for translation and execution of a high-level language program
Explain the benefits and drawbacks of using either a compiler or interpreter and justify
the use of each

Show awareness that high-level language programs may be partially compiled and
partially interpreted, such as Java (console mode)

Describe features found in a typical Integrated Development Environment (IDE)

Definitions
Software that provides an environment in which applications
Operating System can run and provides an interface between hardware and
human operators

Memory Management Management of a computer’s main memory

Determining how computer memory is allocated and


Memory Optimization deallocated when several applications are running
simultaneously

Determining how much memory is allocated to an application,


Memory Organization and how the memory can be split up in the most appropriate
or efficient manner

Ensuring two competing applications cannot use the same


Memory Protection
memory locations at the same time

Security Management Ensuring the integrity, confidentiality, and availability of data.

Process A program is run on a computer

Allocates resources and permits sharing and exchange of


Process Management
data allowing all processes to be fully synchronized
Involves the management of input and output peripheral
Hardware Management devices such as communicating with them via device drivers
and assigning priority

Tasks relating to management of files, such as naming


File Management
conventions and performing specific tasks (delete, copy etc.)

System software that helps to maintain the proper and


Utility Software
smooth functioning of a Computer System

A device that decides how and where files are stored on hard
Hard Disk Formatter
disks

A software that runs in the background of a computer and


Virus checker
constantly checks for virus attacks

Checking of software for types of behaviour that can indicate


Heuristic Checking
a possible virus

Defragmentation A software that takes the fragmented files and rearranges the
Software segments so that they run continuously

A collection of prewritten code that programmers can use to


Programming Library
optimize tasks.

Library routines are not linked until actual run time and are
Dynamic Library
stand-alone files only accessed as required

software being developed is linked to executable code in the


Static Library library at the time of compilation, so library routines would be
embedded directly into the new program code

Assembler A language translator that translates assembly language into


machine code

A language translator that translates a high-level language


Compiler
into machine code at once

A language translator that executes a high-level program line-


Interpreter
by-line

A system used by high-level language programs that is


Partial Compiling and partially compilation and partially interpreted; source code is
Interpreting translated by compiler into object code, which is interpreted
by an interpreter

Also called intermediate code, p-code, and bytecode, it is a


Object Code
low-level machine independent code

Integrated Development Used by programs to aid the writing and development of


Environment (IDE) programs

It checks for possible syntax errors as the program code is


Dynamic Syntax being typed in to the source code editor and alerts the
programmer

A program that runs the program under development and aids


Debugger
the process of debugging

The process of identifying and removing errors from


Debugging
computer hardware or software

Auto-Documenter Explains the function and purpose of programming code

5.1 Operating Systems (OS)


5.1.1 The need for an Operating System
Operating System is a software that provides an environment in which applications can
run and provides an interface between hardware and human operators

5.1.2 Operating System Tasks

Memory Management

Memory Optimization
Determines how computer memory is allocated and deallocated when a number of
applications are running simultaneously.

To maintain optimization of memory, it will also swap data to and from the HDD or SSD.

Memory Organization
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

Single (contiguous) allocation: Entire memory made available to a single application.

Partitioned allocation: Memory is split up into contiguous partitions (or blocks) and
memory management then allocates a partitions of varying size to an application.

Segmented memory: Memory blocks are not contiguous but instead each segment will
be a logical grouping of data.

Memory Protection
Ensures two competing applications cannot use the same memory locations at the same
time

This prevents loss of data, security issues, and applications producing incorrect results

Security Management
To ensure the integrity, confidentiality, and availability of data.

This can be achieved by:

Carrying out OS updates when they’re available, ensuring up-to-date antivirus software

Communicating with a firewall to check incoming and outgoing traffic

Maintaining access rights for all users on a computer

Offering the ability for the recovery of data


Preventing illegal intrusion into the computer system.

Process Management
Process is a program being run on a computer.
OS allocates resources and permit the sharing and exchange of data, thus allowing all
processes to be synchronized

Hardware Management
Controlled by queues and buffers

Communicating with all input and output devices using device drivers
Translating data from a file 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

File Management
Defining file naming conventions

Maintaining directory structures

Performing specific tasks (copy, open, create etc.)

Ensures access control mechanisms are maintained


Ensures memory allocation for a file by reading it form the HDD/SSD and loading it into
memory

5.1.3 Utility Software


Utility Software is system software that helps to maintain the proper and smooth
functioning of a Computer System

Hard Disk Formatter


OS need to know how to store files and where the files will be stored on the hard disk

It organizes storage space by assigning it to data blocks


Disk surface may have several partitions (contiguous blocks of data)

After creation, files are formatted by writing files which will hold directory data and tables
of contents at the beginning of each partition
Allows OS to recognize a file and know where to find it on the disk surface

Has checking tools, which are non-destructive tests that can be carried out on each
sector
If bad sector errors are discovered, the sector is flagged as ‘bad’ and the file tracking
records are reorganized
Bad sectors are replaced with new unused sectors

Hard bad sectors (difficult to repair Soft bad sectors

The sudden loss of power led to some of


Caused by manufacturing errors
the data being corrupted

Damage to disk surface by allowing the


read-write head to touch the disk surface Corruption of some data due to the effects
(for example, by moving HDD without first of static electricity
parking the read-write head)

System crashes lead to physical damage


to disk surfaces

Virus Checkers
Check software or files before they are run or loaded
Compares possible viruses against a database of viruses

Carries out heuristic checking (Checking software for types of behaviour that could
indicate a possible virus)
Quarantining files which may be infected to
Automatically delete the virus

Allow the user to decide


Needs to be kept up to date

Defragmentation Software
Blocks used for files are scattered as HDD becomes full
Happens when files are deleted, partially deleted, extended, etc.
Leads to slower data access time, because HDD read-write head requires more
movement
Data stored in contiguous sectors reduces data access time

Hence, a disk defragmenter rearranges blocks of data to store files in contiguous sectors
whenever possible
Not possible if the disk drive is almost full

Hence, some defragmenters carry out clean-up operations

Disk Content Analysis/Repair Software


Used to check disk drives for empty space and disk usage by reviewing files and file
folders

Leads to optimal use of disk space by removal of unwanted files and downloads

Disk Compression and File Compression


File compression saves storage space and make it quicker to download/upload/transfer
files

Disk compression compresses data before writing it to hard disk, and decompresses
when reading
It is a high-priority routine and will override all other operating system routines
It should not be uninstalled as that would render previously saved data to be
unreadable

Back-Up Software
Allows a schedule for backing up files to be made

Carries out a back-up procedure if changes are made to a file

5.1.4 Program Libraries


A programming library is a collection of prewritten code that programmers can use to
optimize tasks.

When software is under development the programmer can utilize pre-written subroutines
in their program, saving time.
Helps a software developer wishing to use dynamic link library (DLL) subroutines in their
own program

Benefits of using Program Libraries:

Removes need to rewrite routines every time (save time and money)

Leads to modular programming, which means several programmers can work on the same
piece of software simultaneously
Allows continuity with other parts that may form part of a whole program

Allows to maintain the eye of a ‘corporate image’ in all the software being developed by a
company
Saves time used in testing each routine, since they are already fully tested in other
software
Drawbacks of using Program Libraries:

Compatibility issues

May contain unexpected bugs


Code may not meet exact needs

Types of library routines:

Static Libraries: software being developed is linked to executable code in the library at
the time of compilation, so library routines would be embedded directly into the new
program code

Dynamic Libraries: Library routines are not linked until actual run time and are stand-
alone files only accessed as required

Pros of using DLL files Cons of using DLL files

Executable code is not self-contained,


Executable code is much smaller, since
therefore all DLL files need to be available
DLL is only loaded into memory at run time
at run-time

Possible to change DLL files independently


of main program, hence not necessary to Any DLL linking software should also be
recompile main program when changes available at run time
made to DLL files

If any of the DLL files are changed, the


Can be made available to a number of
main program could give unexpected
applications simultaneously.
results and even crash
All of the above save memory and Malicious changes to DLL files due to
execution time malware presents a risk to main program

Skill Check 1
a) A computer has an operating system (OS).

1. State three memory management tasks performed by the OS. [3]

2. State two input/output device management tasks performed by the OS. [2]

b) Utility programs are also provided with the OS.


Identify and describe two different utility programs. [4]

Solution

a)

1. i) Prevents two processes occupying the same memory space


ii) Organizes memory e.g. paging/segmentation
iii) Allocates memory to processes

2. i) Installs drivers
ii) Receives signals from the device
b)

1. Virus Checker: It scans for viruses and reports, quarantines or deletes them
2. Defragmenter: It finds files that are not stored in contiguous blocks and
moves them together

5.2 Language Translators


5.2.1 Translation and Execution of Programs
Instructions in a program can only be executed in machine code, hence need to be
translated.

Assembler Compiler Interpreter

The source program assembly language high-level language high-level language


translated to to machine code to machine code to machine code

Machine
yes yes no
Dependent?

Each line of the


program is
Object Program is disk or in the main disk or in the main interpreted and
stored on memory memory executed every
time the program
runs

Many machine code Many machine code


Each line of the one machine code
instructions, instructions,
source program instruction (one-to-
(instruction (instruction
generates one translation)
explosion) explosion)

5.2.2 Pros and Cons of Compiling or Interpreting a Program


Pros of Compiler over Interpreter

Compiler Interpreter
The end user does not need to purchase a End-user needs to purchase a compiler or
compiler since only executable code is an interpreter to translate source code
needed to run the program before the use

Source code cannot be edited by the end-


The developer relinquishes control of the
user, since the developer keeps hold of it.
source code, making it difficult to charge
This allows the development to charge for
for upgrades and alterations
updates and alterations

Shorter execution time as the translation Longer execution time since each line
has been completed needs to be translated

Interpreted programs may have syntax or


Compiled programs have no syntax or
semantic errors if part of the program has
semantic errors
not been fully tested

The translated source code can be Cannot be interpreted on one device and
executed on a different type of computer interpreted on a different computer

Pros of Interpreter over Compiler

Interpreter Compiler

Easier to develop and debug a program as It finds all errors in a program and, hence
errors can be corrected on each line and might find dependent “errors”, which may
the program restarted from that place be resolved when correcting earlier errors

An untested program should not be able to The untested program can cause the
cause the program to crash program to crash

Partial results can be viewed during The developer needs to write special
development, allowing developers to make routines to view partial results during
informed decisions about a section of code development.

When purchased, the end-user has all The end-user has no access to source
source code and run-time libraries, code and run time libraries, is unable to
enabling the program to be modified as make modifications and relies on the
required without further purchases developer for updates

5.2.3 Partial Compiling and Interpreting


To achieve shorter execution times, many high-level language programs use a system
that is partially compilation and partially interpretation
Source code is checked and translated by a compiler into object code

The compiled object code is a low-level machine-independent code, called intermediate


code
To execute the program, the object code can be interpreted by an interpreter or compiled
using a compiler

For example, Java and Python can be translated by a compiler into a set of instructions
for a virtual machine, which is then interpreted by an interpreter.

5.2.4 Integrated Development Environment (IDE)


IDE is used by programmers to aid the writing and development of programs

Source Code Editor


Allows a program to be written and edited without the need to use a separate text editor
Speed up the development process as editing can be done without changing to a
different piece of software each time the program needs correcting or adding to
Dynamic syntax finds possible syntax errors while the program is being typed and before
the source code is interpreted
Logical errors can only be found when the program is run
Most source code editors colour code their words and layout of the program (Pretty-
printing)
For larger programs, some code blocks can be collapsed allowing programming to just
see code blocks currently being developed.

Compilers and Interpreters


An interpreter is used for developing the program
A compiler is used to produce the final version of the object code

A Run-Time Environment with a Debugger


Aids in the process of debugging (the process of identifying and removing errors from
computer hardware or software)
Allows programmer to go a single step through the program a line at a time or set a
breakpoint to stop the execution of the program at a certain point in the source code
A report window then shows the contents of the variables and expressions evaluated at
that point in the program, allowing a programmer to check for logical errors and
determine if the program runs correctly

Auto-Documenter
Used to explain the function and purpose of programming code

Skill Check 2
A programmer uses language translators when writing and testing a program

1. Describe the operations of a compiler. [2]


2. Describe the operation of an interpreter. [2]
3. Explain how a programmer can make use of a typical Integrated Development
Environment (IDE) when writing and testing a program. [4]

Solution


1. A compiler attempts to translate the whole source code. It creates a
separate error report at the end of the translation process.

2. An interpreter reads each line then translates it and executes it. It stops
when an error is encountered.
3. Writing
An IDE allows a programmer to enter code into an editor. The pretty printing
features identifies key terms to assist the programmer. Dynamic syntax
checking also allows the programmer to correct his syntax errors on the go.

Testing
Single stepping allows the programmer to run the code line by line. Putting
breakpoints allows the programmer to stop the code at set points to check
values

Points to Note
Operating system tasks can be categorized in more than one way, for example, some are
for helping the user, others are for running the system
Utility programs include hard disk utilities, backup programs, virus checkers, and file
compression utilities

Library programs, including Dynamic Link Library (DLL) files, are available to be
incorporated into the program; they are usually subroutines and are very reliable
A high-level language can be translated using an interpreter or a compiler
A Java compiler produces Java Byte Code which is interpreted by a Java Virtual Machine

An Integrated Development Environment (IDE) contains many features that provide


support for a programmer when a program is being written and when it is being corrected

You might also like