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

Chapter 5 System-Software

Uploaded by

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

Chapter 5 System-Software

Uploaded by

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

Chapter 5: System Software

5.1 Operating System

5.2 Language Translators

01/11/2022 By: Noureddine Tadjerout 1


Lesson Objectives:

01/11/2022 By: Noureddine Tadjerout 2


Lesson Objectives:

01/11/2022 By: Noureddine Tadjerout 3


Resources:

https://www.hoddereducation.co.uk/cambridgeasalevelcomputerscience
Resources:

https://www.cambridgeinternational.org/programmes-and-qualifications/cambridge-
international-as-and-a-level-computer-science-9618/published-resources/
Resources:

https://www.bbc.co.uk/bitesize
Lesson Objectives:

01/11/2022 By: Noureddine Tadjerout 7


5.1 Operating System
What is an Operating System?
https://www.youtube.com/watch?v=pVzRTmdd9j0

01-Nov-22 Mr. Noureddine Tadjerout 8


5.1 Operating System
What is an Operating System?
https://www.youtube.com/watch?v=r5qiHoU8TgU

01-Nov-22 Mr. Noureddine Tadjerout 9


5.1 Operating System
Need of Operating Sytem
https://www.youtube.com/watch?v=8aFBYlR_CYw

01-Nov-22 Mr. Noureddine Tadjerout 10


5.1 Operating System
How operating system maximizes the use of computer resources:
Basic Input Output System (BIOS)
https://www.youtube.com/watch?v=xpqtruZAE_0

01-Nov-22 Mr. Noureddine Tadjerout 11


5.1 Operating System
Type of Operating System?
https://www.youtube.com/watch?v=YjwXNUpsByE

01-Nov-22 Mr. Noureddine Tadjerout 12


5.1 Operating System
Watch the video for the Operating System
https://www.youtube.com/watch?v=7vbRGDgHukA

01/11/2022 By: Noureddine Tadjerout 13


5.1 Operating System

01/11/2022 By: Noureddine Tadjerout 14


5.1 Operating System
An operating system is a collection (or suite) of programs that manages and controls the
computer. Operating systems have many functions:

•controlling hardware components


•providing a platform for software to run on
•providing a user interface
•managing processes
•managing the computer's memory
•managing input and output devices
•managing applications
•managing security

Example operating systems include:

•Microsoft Windows
•Apple OS X
•Linux
•Android
•IOS

01/11/2022 By: Noureddine Tadjerout 15


5.1 Operating System
1) Operating System:
Most people use computers because they want to use application software(such as word
processing, internet browsing) however these applications only work inside of an operating
system environment. The operating system is the software that controls, manages and run all of
the applications on the computer.

The functions of an operating system include:

1-Loading a software interface for the user to interact with (usually a GUI or CLI)
2-Managing hardware resources such as memory and devices
3-User management
4-authentication & security
5-File management

When a user is using a computer they are either interacting directly with the operating system
( e.g. logging in to the computer) or via an application (e.g. saving a word processing document)
01/11/2022 By: Noureddine Tadjerout 16
5.1 Operating System
Processor management
Multitasking means to be able to run more than one program simultaneously. These
programs perform processes. In the past, computers with CLIs were unable to
multitask - the operating systems of the day only allowed one program to run at a
time.

Modern operating systems are multitasking in that they allow several programs to run
side-by-side. It is not uncommon for a user to be streaming music while entering text
into a word processor, or streaming a video while making a backup of files.

Multitasking is possible only if:

-the operating system can support multitasking


-the computer has enough memory to hold more than one program in primary at
the memory same time

01/11/2022 By: Noureddine Tadjerout 17


5.1 Operating System
Multitasking
Most general use systems (e.g. desktops, laptops, tablets) allow multitasking, where
most than one program is open at one time.

Advantages
Allows a combination of active and passive user interaction, e.g.:
Type up a word processing document while listening to music.
Editing images while burning files to an optical device (DVD / CD)
Allows rapid switching between applications which can make the use more efficient.

Disadvantages
Multiple open applications can slow down the computer, making it harder to use.
Requires more physical resources (CPU power / memory) so uses more battery.
Can offer unwanted distractions from the task at hand.

01/11/2022 By: Noureddine Tadjerout 18


5.1 Operating System
Memory management
Computer memory must be managed to ensure that:
- more than one program can run at the same time
- more than one document can be opened at the same time
One method of memory management is known as paging. Memory is broken up into fixed-size
blocks, known as pages.

Different operating systems allocate their own size to pages. For example, memory pages in
modern operating systems are typically 4 kilobytes (KB) in size.

When a program is run, it is loaded into memory. The operating system determines how much
memory the program requires, and allocates enough pages to hold it and its documents. When
the program is closed, the allocated pages are freed up for use by other programs.
The pages a program occupies may or may not be contiguous, but this does not matter. The
operating system knows what each page occupies and fetches the data held in them when
needed.

01/11/2022 By: Noureddine Tadjerout 19


5.1 Operating System
Memory management
Consider this example. Program A requires two pages. It is allocated pages 0 and 1. Program B
requires three pages. It is allocated pages 2, 3 and 4.

01/11/2022 By: Noureddine Tadjerout 20


5.1 Operating System
Memory management
Program A now closes, and Program C now runs. Program C requires three pages. Pages 0 and 1
are now free, so Program C is allocated pages 0, 1 and 5.

01/11/2022 By: Noureddine Tadjerout 21


5.1 Operating System
Input/output devices management
Input and output devices, which are also known as peripherals, are hardware devices
connected to a computer, such as a screen, printer, keyboard or camera.

To operate a peripheral, the operating system uses a program called a device driver.
Device drivers contain instructions on how to control a device. Each connected device
has its own driver.

Using device drivers brings two advantages:

any device can be used with the operating system, as long as a driver is available for it
drivers can be updated, usually to give better performance or to remove a bug

01/11/2022 By: Noureddine Tadjerout 22


5.1 Operating System
Applications management

Application programs and hardware can communicate through an interface provided by the
operating system. This is known as the application programs interface (API).

The applications manager allocates memory space and determines time needed by a processor
for an application to run

01/11/2022 By: Noureddine Tadjerout 23


5.1 Operating System

01/11/2022 By: Noureddine Tadjerout 24


5.1 Operating System

01/11/2022 By: Noureddine Tadjerout 25


5.1 Operating System

01/11/2022 By: Noureddine Tadjerout 26


5.1 Operating System

01/11/2022 By: Noureddine Tadjerout 27


5.1 Operating System
Security management

Operating systems also manage security. They allow:

- individual users to be created and deleted


- access levels to be given to users, such as administrator rights or standard user rights
- auditing (keeping a log) of files a user creates, accesses, edits and deletes

01/11/2022 By: Noureddine Tadjerout 28


5.1 Operating System
File management:
File management is one of the basic and important features of operating system. Operating
system is used to manage files of computer system. All the files with different extensions are
managed by operating system.

A file is collection of specific information stored in the memory of computer system. File
management is defined as the process of manipulating files in computer system, it
management includes the process of creating, modifying and deleting the files.

The following are some of the tasks performed by file management of operating system of
any computer system:
- It helps to create new files in computer system and placing them at the specific locations.
- It helps in easily and quickly locating these files in computer system.
- It makes the process of sharing of the files among different users very easy and user friendly.
-
It helps to stores the files in separate folders known as directories. These directories help users
to search file quickly or to manage the files according to their types or uses.
It helps the user to modify the data of files or to modify the name of the file in the directories.
01/11/2022 By: Noureddine Tadjerout 29
5.1 Operating System
Utilities
https://www.youtube.com/watch?v=AG6Sux3zvpM

01-Nov-22 Mr. Noureddine Tadjerout 30


5.1 Operating System
2)-Utility Software
Utility software helps maintain the system. Utility software includes:
- encryption software
- defragmentation software
- data compression software
- backup software
- virus checker
- disk formatter
- disk contents analysis
- disk repair software

1- encryption software:
Encryption software disguises the contents of files so they can only be understood by authorized
users. The software uses a complex algorithm to scramble the content so that it appears to be
gibberish. Only authorized users can unscramble the content.
The software can encrypt specified files, or the whole of the hard disk on which the files are
stored.
You can read more about encryption by clicking the link below:
https://www.bbc.co.uk/bitesize/guides/z666pbk/revision/6
5.1 Operating System
Watch the video for Utility Software and Models
https://www.youtube.com/watch?v=Z0uVNcNKags

01/11/2022 By: Noureddine Tadjerout 32


5.1 Operating System
2)-Utility Software
2- Defragmentation Software:
https://www.youtube.com/watch?v=AtRIOUZuI2c

01/11/2022 By: Noureddine Tadjerout 33


5.1 Operating System
2)-Utility Software
2- Defragmentation Software:
When a file is stored on a hard disk it is actually stored not as a whole file, but as a series of
segments. Sometimes the segments run together in sequence (see File 1) and sometimes the
segments are split up over a disk (see File 3). This is known as fragmentation

01/11/2022 By: Noureddine Tadjerout 34


5.1 Operating System
2)-Utility Software
2- Defragmentation Software:
Over time, more and more files become fragmented, as do individual files. A fragmented disk
takes longer to read from and write to, making a computer run slower.

01/11/2022 By: Noureddine Tadjerout 35


5.1 Operating System
2)-Utility Software
2- Defragmentation Software:
Defragmentation software takes the fragmented files and rearranges the segments so that they
run contiguously. This decreases read/write time, thereby speeding up computer performance.

01/11/2022 By: Noureddine Tadjerout 36


5.1 Operating System
2)-Utility Software
3- Data Compression Software:
Compression software reduces the size of a file stored on secondary storage.

Smaller files are easier to transmit across a network as they require fewer packets to be sent.
Their reduced size also means more files can be stored in any given area of storage.

You can read more about compression by clicking the link below :

https://www.bbc.co.uk/bitesize/guides/zd88jty/revision/9

01/11/2022 By: Noureddine Tadjerout 37


5.1 Operating System
2)-Utility Software
4- Backup Software:
Data can be lost accidentally, or deliberately. A user may accidentally delete or overwrite a file,
or a hard disk may fail, preventing access to any files stored on it. A hacker or malicious user
may deliberately delete or overwrite data.

To prevent data loss, regular copies of the data should be made. A copy of data is known as a
backup. Backups can contain a copy of all files on a computer, or just ones specified by a user.

Network managers make regular backups of all files on a network using backup software.
The software automatically makes a backup at a scheduled time of day, usually during the
evening when the network is quiet. Backups are usually made to a high capacity secondary
storage device, or to the cloud.

01/11/2022 By: Noureddine Tadjerout 38


5.1 Operating System
2)-Utility Software
4- Backup Software:
If data loss occurs, data can be retrieved from the backup. The software allows all backed-up
files to be retrieved or just specified files.

Two types of backup are possible:


- full backup
- incremental backup

A full backup involves making a copy of every file on the computer or network. They can require
a lot of storage space and can be time consuming to make.

Incremental backups take a copy of any new files created since the last backup, or of any files
that have been edited, such as user documents.

Most network managers make an initial full backup and then switch to daily incremental
backups. This way all data is backed up and daily backups are small and less time-consuming.
01/11/2022 By: Noureddine Tadjerout 39
5.1 Operating System
2)-Utility Software
4- Virus Checker:
Antivirus software, or antivirus software (abbreviated to AV software), also known as anti-
malware, is a computer program used to prevent, detect, and remove malware.

Antivirus is a kind of software used to prevent, scan, detect and delete viruses from a computer.
Once installed, most antivirus software runs automatically in the background to provide real-
time protection against virus attacks.

Comprehensive virus protection programs help protect your files and hardware from malware
such as worms, Trojan horses and spyware, and may also offer additional protection such as
customizable firewalls and website blocking.

01/11/2022 By: Noureddine Tadjerout 40


5.1 Operating System
2)-Utility Software
5- Disk formatter:
Disk formatting is the process of preparing a data storage device such as a hard disk drive, solid-
state drive, floppy disk or USB flash drive for initial use. In some cases, the formatting operation
may also create one or more new file systems.

6- Disk contents analysis:


A disk analyzer is a piece of software that checks drives for space and usage and explores files
and folders visually, simplifying file cleanup and optimization ( mean the action of making the
best or most effective use of a situation or resources).

7- disk repair software:


Disk Utility can check for and fix errors related to the formatting and directory structure of a
Mac storage device. Disk Utility can fix certain disk problems—for example, multiple apps quit
unexpectedly, a file is corrupted, an external device doesn't work properly, or your computer
won't start up.

01/11/2022 By: Noureddine Tadjerout 41


5.1 Operating System
3)-Program Libraries

A dynamic link library (DLL) is a collection of small programs that can be


loaded when needed by larger programs and used at the same time.

Below is an example of how you might import libraries into python:

01/11/2022 By: Noureddine Tadjerout 42


5.1 Operating System
3)-Program Libraries
A library is a collection of non-volatile resources used by computer programs, often for software
development. These may include configuration data, documentation, help data, message
templates, pre-written code and subroutines, classes, values or type specification.

Library programs contain code and data that provide services to other programs such as
interface (look and feel), printing, network code and even the graphic engines of computer
games. If you have ever wondered why all Microsoft Office programs have the same look and
feel, that is because they are using the same graphical user interface libraries. For computer
games a developer might not have the time and budget to write a new graphics engine so they
often buy graphical libraries to speed up development, this will allow them to quickly develop a
good looking game that runs on the desired hardware. For example Battlefield 3 and Need for
Speed both use the same Frostbite engine.

01/11/2022 By: Noureddine Tadjerout 43


5.1 Operating System
Dynamic link library (DLL):

A dynamic link library (DLL) is a collection of small programs that can be loaded when needed by
larger programs and used at the same time. The small program lets the larger program
communicate with a specific device, such as a printer or scanner.

https://www.installsetupconfig.com/win32programming/dynamiclinkl
ibrarydll9_5.html

Click the link below to create a Dynamic Link Library (DLL)

https://www.youtube.com/watch?v=Ws5AhdN0hqQ&t=4s

01/11/2022 By: Noureddine Tadjerout 44


5.1 Operating System
Practical Activates

01/11/2022 By: Noureddine Tadjerout 45


5.1 Operating System
Practical Activates

01/11/2022 By: Noureddine Tadjerout 46


5.1 Operating System
Practical Activates

01/11/2022 By: Noureddine Tadjerout 47


5.1 Operating System
Practical Activates

01/11/2022 By: Noureddine Tadjerout 48


5.1 Operating System
Practical Activates

01/11/2022 By: Noureddine Tadjerout 49


5.1 Operating System
Practical Activates

01/11/2022 By: Noureddine Tadjerout 50


5.1 Operating System
Practical Activates

01/11/2022 By: Noureddine Tadjerout 51


5.1 Operating System
Practical Activates

01/11/2022 By: Noureddine Tadjerout 52


5.1 Operating System
Practical Activates

01/11/2022 By: Noureddine Tadjerout 53


5.1 Operating System
Practical Activates

01/11/2022 By: Noureddine Tadjerout 54


Learning Objective:

55
5.2 Language Translators
Watch the video for Translators (Assemblers, Compilers & Interpreters)
https://www.youtube.com/watch?v=eXu0c5vZnhU

56
5.2 Language Translators
Assembler Software:
The Assembler is a Software that converts an assembly language code to machine code. It takes
basic Computer commands and converts them into Binary Code that Computer’s Processor can
use to perform its Basic Operations. These instructions are assembler language or assembly
language.
We can also name an assembler as the compiler of assembly language. This is because a
compiler converts the high-level language to machine language. On the other hand, an
assembler is doing the same task but, for assembly language, the name compiler of assembly
language.

What is an Assembly Language?

An assembly language is a low-level language. It gives instructions to the processors for different tasks. It is
specific for any processor. The machine language only consists of 0s and 1s therefore, it is difficult to write a
program in it. On the other hand, the assembly language is close to a machine language but has a simpler
language and code.

57
5.2 Language Translators
Assembler Software:
What is an Assembly Language?
Assembly language is used. It uses opcode for the instructions. An opcode basically gives
information about the particular instruction. The symbolic representation of the opcode
(machine level instruction) is called mnemonics. Programmers use them to remember the
operations in assembly language.

For example ADD A,B

Here, ADD is the mnemonic that tells the processor that it has to perform additional function.
Moreover, A and B are the operands. Also, SUB, MUL, DIVC, etc. are other mnemonics.

58
5.2 Language Translators
Assembler Software:
Types of Assembler
Assemblers generate instruction. On the basis of a number of phases used to convert to
machine code, assemblers have two types:
1. One-Pass Assembler
These assemblers perform the whole conversion of assembly code to machine code in one go.
2. Multi-Pass/Two-Pass Assembler
These assemblers first process the assembly code and store values in the opcode
table and symbol table. And then in the second step, they generate the machine code using
these tables.
a) Pass 1
- Symbol table and opcode tables are defined.
- keep the record of the location counter.
- Also, processes the pseudo instructions.
b) Pass 2
Finally, converts the opcode into the corresponding numeric opcode.
Generates machine code according to values of literals and symbols

59
5.2 Language Translators
Assembler Software:
Some Important Terms:
Opcode table: They store the value of mnemonics and their corresponding numeric values.

Symbol table: They store the value of programming language symbols used by the programmer,
and their corresponding numeric values.

Location Counter: It stores the address of the location where the current instruction will be
stored.

60
5.2 Language Translators
Assembler Software:
Watch the video for Assembly language Symbol Table AS/A level Exam PPQ W17 QP 12
https://www.youtube.com/watch?v=NoRNhCOvuhM

61
5.2 Language Translators
Compilers and interpreters:
Watch this video below for Interpreters and Compilers
https://www.youtube.com/watch?v=_C5AHaS1mOA

62
5.2 Language Translators
Differences between Interpreter and Compiler:

63
5.2 Language Translators
Integrated Development Environment (IDE):
An integrated development environment (IDE) is a software application that provides comprehensive
facilities to computer programmers for software development. An IDE normally consists of at least a source
code editor, build automation tools and a debugger. Some IDEs, such as NetBeans and Eclipse, contain the
necessary compiler, interpreter.

1- Prettyprinting:
Prettyprint refers to the presentation of the program code typed into an editor. For example,
the Python IDLE (see Figure 8.02) automatically colour-codes keywords, built-in function
calls, comments, strings and the identifier in a function header. In addition, indentation is
automatic.

64
5.2 Language Translators
Integrated Development Environment (IDE):
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. Figure 8.03 shows an example
of the Visual Studio editor responding to text typed in by the programmer.

65
5.2 Language Translators
Integrated Development Environment (IDE):
Dynamic syntax checks
When a line has been typed, some editors perform syntax checks and alert the programmer
to errors. Figure 8.04 shows an example of the Visual Studio editor responding to a syntax error.

66
5.2 Language Translators
Integrated Development Environment (IDE):
Expanding and collapsing code blocks
The blue underline shows that there is a syntax error. As you move the mouse pointer over
different parts of the line of code, the editor will display explanations. When working on
program code consisting of many lines of code, it saves excessive scrolling if you can collapse
blocks of statements. Figure below shows the Visual Studio editor window with the procedures
collapsed, so the programmer can see the global variable declarations and the main program
body. The procedure headings are still visible to help the programmer supply the correct
arguments when calling one of these procedures from the main program.

67
5.2 Language Translators
Integrated Development Environment (IDE):
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. Figure 8.05 shows the windows presented to the
user in the Python IDLE when this feature is being used.

68
AS/A Level Exam Question 1

69
AS/A Level Exam Answer 1

70
AS/A Level Exam Question 2

71
AS/A Level Exam Answer 2

72
AS/A Level Exam Question 3

73
AS/A Level Exam Answer 3

74
AS/A Level Exam Question 4

75
AS/A Level Exam Answer 4

76
AS/A Level Exam Question 5

77
AS/A Level Exam Answer 5

78
AS/A Level Exam Question 6

79
AS/A Level Exam Answer 6

80
AS/A Level Exam Question 7

81
AS/A Level Exam Question 7

82
AS/A Level Exam Answer 7

83
AS/A Level Exam Question 8

84
AS/A Level Exam Question 8

85
AS/A Level Exam Answer 8

86
AS/A Level Exam Answer 8

87
AS/A Level Exam Question 9

88
AS/A Level Exam Question 9

89
AS/A Level Exam Question 9

90
AS/A Level Exam Answer 9

91
AS/A Level Exam Answer 9

92
AS/A Level Exam Question 10

93
AS/A Level Exam Question 10

94
AS/A Level Exam Answer 10

95

You might also like