4. Software
4. Software
SOFTWARE
Types of software
SYSTEM SOFTWARE APPLICATION SOFTWARE
Provides services that computer requires. Provides services that the user requires.
Examples: Examples:
- Utility software (eg. defragmentation - Word processor
software, antivirus, firewall, screensaver) - Web browser
- Operating system - Photo/video editing software
- Gameware
Runs when system is turned on and stops Runs as per the user’s request.
running when system is turned off.
Operating System
- A program designed to run other programs on a computer.
- Provides an environment in which applications can run and also provides an interface
between computer & human operator.
- Backbone of computer: manages both software and hardware resources.
- Examples: Windows, MAC, Linux
NOTE:
- Most computers store OS on a HDD or SSD, since they tend to be large programs.
- Mobile phones and tablets store OS on SSD (as HDD is too large).
Functions
Manages user accounts - Each user is provided with account for access to
system.
- Accounts accessed using username + password
- Users granted different levels of access
- Monitor login activity & log users out if they have been
inactive for a while
Driver
- Software that translate instructions from computer so
devices can understand
- Allows devices to communicate with the computer
Handles interrupts
Interrupts
- A signal sent from a device/ software to a microprocessor requesting its attention.
- Microprocessor suspends all operations until interrupt has been serviced.
- It causes OS to take specified action.
How interrupt is generated - Device/software generates interrupt
- Interrupt signal sent from
device/software to CPU/processor
When a user is reading a text on the mobile phone, they may also get a telephone call on
the mobile phone. An interrupt signal is generated that results in an output to inform the
user that a person is calling them. Describe how the interrupt signal is processed to inform
the user that a person is calling them.
- The interrupt signal is sent to the CPU/processor
- The CPU stops the task it is currently processing …
- ... to service the interrupt
- An interrupt service routine is used (to service the interrupt)
- Once the interrupt is serviced, a message is displayed to notify the user of the call
Types of interrupt:
- Hardware Interrupt
- Moving the mouse
- Clicking a mouse button
- Plugging in a device
- Paper jam in printer
- Printer out of paper
- Software Interrupt
- Division by zero
- Two processes accessing the same memory location
- Null value
Programming languages
Computer program: a list of instructions that enable a computer to perform a specific task.
Syntax: structure of language statements in a computer program.
Advantages Advantages
1. Closer to human language - Directly manipulate hardware
- Easier/quick to read/write/understand: can - Can use specialised hardware /
write code in less time machine-dependent instructions
- Easier/quicker to debug: can find and correct - Quicker to execute
errors in less time - Smaller file size // less storage
- Less likely to make errors space
2. Machine independent/ code is portable - Program will be more memory
- Can be used on many different computers efficient: useful when application
without need for understanding of hardware has high memory consumption
- Because it is written in source code. - No requirement for program to be
- Because it’s compiled to object code. portable
3. Only need to learn a single language - No requirement for
- This can be used on many computers. compiler/interpreter
4. They have built-in functions or libraries
- Saves time when writing the program
5. Can use an IDE
6. No need to manipulate memory addresses
directly
- specialised knowledge of this not required
7. Can focus on the problem instead of the
manipulation of memory/hardware
8. Easier to maintain
9. One line of code can carry out multiple
commands
Disadvantages Disadvantages
- Cannot directly manipulate hardware - More difficult to
- Take longer to execute: may need to wait for read/write/understand.
translation before running - Takes longer to write & debug
- Program may be less efficient - Not machine independent
- Programs larger
Assembly language
- Form of low-level language that uses mnemonics
- Assembler is needed to translate assembly language program to machine code
Translators
Compiler Interpreter
how errors are reported - Creates an error report - Stops when error found
after trying to compile - when corrected, program
- Displays all errors in code can be run from same
- Errors require correction position // allows error
before executing correction in real time
Similarities between compiler & interpreter
- Both translate high level language to machine code
- Both generate error report // check for errors
Difference between compiler & interpreter
Interpreter Compiler
translates one line at a time / checks one translates whole code in one go / checks all
line and then executes immediately code before executing
stops & reports when error is encountered creates error report at the end of
// corrects errors in real time translation
run code up to the point it finds an error will not run code at all if an error is found
required to run the code each time if used Not required to run the code each time
Benefits of compiling
- Code will run without the need of an translator
- Code is platform independent.
- Source code not available, therefore cannot be modified
Drawbacks of compiling
- Source code not available, therefore cannot be modified
- Comments, etc. are not visible
- Future changes will require the code to be recompiled
Features/functions
Auto-completion
Auto-correction
Run-time environment allow the program to run and see its corresponding output