Chapter 4
Chapter 4
Competition
Defragmentation Software - When HDD becomes full, blocks used for files will
be scattered all over the disk surface. Data accessing will be faster if files could
be stored in contiguous sectors to reduce HDD head movements.
data data
Examples of utilities software (3)
Operating
System
IGCSE Computer Science
History
• Computer used to run only one
program at a time
• Program (written in punch card)
needs to be inserted one by one
into the computer manually
• This approach slows down
computation
• It is also difficult to integrate a
hardware (input and output
devices) with the computer
• We need a way in which program
can operate automatically
• This leads to the creation of
operating system
History
3 types of HCI
Command Line
Interface
• User needs to learn a
number of commands
• Direct communication
with the computer and
is not restricted to a
number of
predetermined options
HCI
3 types of HCI
3 types of HCI
Command Line
Interface
• The user is in direct communication with the • It is more user-friendly; icons are used to
computer represent applications
• Uses a small amount of computer memory • The user doesn’t need to learn any
commands
• Need to learn a lot of commands • Use up more computer memory than CLI
• Each command must be typed in correctly in • The user is limited to icons provided on the
terms of format and spelling screen
HCI MM
Memory Management
CU
When a program is
needed, its code will
AL be loaded from the
U
Secondary Storage
into the Primary RAM,
but who does it????
HCI MM
Memory Management
AL
U
HCI MM
Memory Management
Memory Management
Pre-emptive multitasking
Hardware Peripheral
Management
Meaning of peripheral devices Roles of the OS: Carry out Hardware Management
User Account
Management
User Account
Management
Role of an administrator
File management
File management
Security Management
- covered more in depth in chapter 5
Memory Management
7 Main
Multitasking
Functions Of
Hardware Peripheral Management
The Operating
User Account Management System
File Management
Security Management
Human Computer Interface
Memory Management
Multitasking
File Management
Security Management
EXAM QUESTION
EXAM QUESTION
Chapter 4.3
Running of
Application
Introducing BIOS (Basic Input/Output System)
• Known as firmware (a tangible
electronic component with
embedded software
instructions, such as a BIOS)
• The BIOS settings are stored on
a CMOS chip (complementary
metal-oxide-semiconductor)
⚬ BIOS settings would be reset
if the battery was removed or
disconnected
• Responsible for booting up the
computer by loading part of the
operating system from
secondary storage into RAM
Application Software Running Sequence
Power On
Hardware
Application Software Running Sequence
Firmware
Hardware
(BIOS)
Loads the
BIOS
program
located in
the ROM
Application Software Running Sequence
Firmware Operating
Hardware
(BIOS) System
INTERRU
PT
IGCSE CS
DEFINITION OF
INTERRUPT
AN INTERRUPT IS WHERE A SIGNAL IS SENT
FROM A DEVICE OR A PROGRAM TO THE
OPERATING SYSTEM THAT CAUSES A
TEMPERORY STOP.
EXAMPLES OF AN
INTERRUPT : YOU TRY
A timing signal
FUNCTION OF AN
INTERRUPT
Device sends
an interrupt
signal
The interrupt
Device sends is collected
XX
an interrupt by an
signal interrupt
handler
AL
U
IF THERE ARE SO MANY INSTRUCTIONS NEED
TO BE EXECUTED IN A SECOND, HOW DOES
THE COMPUTER DECIDE WHICH INSTRUCTION
TO EXECUTE FIRST?
FLOW
Part of the
Interrupt Service Routine
Before After
Before After
1 I1 1 XX
Eg.Divide by 0, keyboard key
pressed, printer error, mouse 2 I2 2 I1
movement
3 3 I2
TYPES OF PROGRAMMING
LANGUAGES
IGCSE Computer Science
Chapter 4: Software
PROGRAMMING LANGUAGES
POPULARITY
RANKING
IGCSE Computer Science
https://statisticstimes.com/tech/top-computer-languages.php
RECAP
Definition of a Software
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
Translators 0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
Why does programmers have to code using programming
language instead of machine code
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
High-Level Programming Languages
Machine Code
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
0101010100101001001001 It is impossible to code in
0101010100100101001001
10101010001011010101010 machine code
10101010100101010101010
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
Low-Level Programming Languages (2)
a0 2
a1 3
t0
Low-Level Programming Languages (2)
• A type of programming
that sits just above
machine code and is low-
level language that use
mnemonics for its
instructions and
commands.
• Mnemonic
⚬ LW - Load Word
⚬ INP - Input
⚬ RET - Return
MEMORISE A FEW !
Low-Level Programming Languages (2)
Harry
Eat
My
Supper
TRANSLATOR
IGCSE CS
Programming Languages Machine Code
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
Translators 0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
Different programming
languages need a different
translator to be converted
into machine code
Machine Code
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
0101010100101001001001
Translators 0101010100100101001001
10101010001011010101010
10101010100101010101010
0101010100101001001001
0101010100100101001001
10101010001011010101010
10101010100101010101010
• Interpreter (Python)
• Compiler (C)
• Assembler (Assembly Language)
Translators 3 types of translator
• Interpreter (Python)
• Compiler (C)
• Assembler (Assembly Language)
Main functions
Python Javascript
Interpreter
Python
Compile
Running the
compiled code
C Programming Language
Compiler
• Translates an entire program written in a high- level language (HLL) into
machine code all in one go so that it can be directly used by a computer to
perform a required task. An executable file will be produced
• A report of errors is produced at the end of the translation
Compile
Running the
compiled code
C Programming Language
Compiler
• Translates an entire program written in a high- level language (HLL) into
machine code all in one go so that it can be directly used by a computer to
perform a required task. An executable file will be produced
• A report of errors is produced at the end of the translation
• Once a program is compiled the machine code can be used again and again
to perform the same task without re-compilation
Compile
Running the
compiled code
C Programming Language
Assembler
• Translate a program written in an assembly language into machine code
• Once a program is assembled the machine code can be used again and again
to perform the same task without re-assembly.
Assembler
Compare and contrast the 3 translators
Compile Assemble
r r
Auto
Code Run-time
completion Translator
Editor Environment
- common - compiler,
- contains - with
function interpreter
shell debugger
/syntax