Vous êtes sur la page 1sur 35

Software

Programming Languages:
•  Machine Language
•  Assembler Language
•  High Level Language

Software:
•  System Software
•  Application Software

OS:
•  Functions of OS
•  types of OS
•  overview of UNIX and Windows OS
Programming Languages
Allows programmer to develop the sets of instructions that make-up program
Machine Language (low-level) Assembler Language
-  Written in binary codes (0 & 1s) -  Written using Symbolic/Mnemonics
-  programs are machine dependent words e.g., “LOAD”,”ADD” for
-  No compilation/translation required machine operations
-  Executes faster -  Programs are machine dependent
-  difficult and error prone programing -  Requires language translator
programs called assemblers
Example: Find and print the names of all student
who scored more than 79% on the first exam.

Machine Language:
00000010 10001100
High-level Languages
01100000 00010001 -  More close to natural language
00000111 ... -  Written using readable instructions,
called statements
Assembly: LOAD 4F, R1
CMP R1, R2 … -  requires translator programs called
compilers or interpreters
High Level: If Year = 1 and Score1 > 79
-  Machine independent
then put StName ...
Programming

Algorithm: Executable Code:


a.  Get two numbers 000101001001
b.  Add them 101001000111
c.  Display the final result 111100000001

Source Code:
a.  INPUT A, B
b.  C = A + B
c.  PRINT C
Computer Software
Computer requires both software and hardware to functions properly.
hardware software
physical unit (parts) that (set of instructions or
computes and manipulate programs) that carries
information out predefined tasks

Software allows users to interact with/use available hardware resources

Instruction tells the hardware what to do

sets of instructions, that control sequence of operations is Program

Software: collection of programs

Example:
All human physical actions such as walking and eating are based on the thoughts and feelings,
which is raised by the brain. If the brain does not raise thoughts and feelings, we do not perform
any physical activity. Similarly, the actions and functioning of every hardware equipment is driven
by software. The combination of physical equipment (hardware) and logical instructions (software)
gives modern computing system their power and versatility.
Computer Software
Sources of Software
Computer Instructions or
data, anything that can be
stored electronically is
Software
Application
software

Proprietary Off-the-shelf
software software

In-house Customized Standard


Contract
developed package package

In-house Contract
customized customization
Computer Software
Computer System Components
Software
collection of program along with its associated data is software
Software contains the instructions that the hardware would executes

Helps utilize hardware resources such as processor, input output devices


and communication links
Without software computer’s hardware are useless.

Programs are written using programming languages and must be


translated into a machine language for execution. This translation is done
by compilers, interpreters and assemblers.
example:
Software you buy is an executable version that has already been converted to machine
language i.e. compiled, assembled and ready to be used.

word processing software package provides functionality to the computer so that it can
be used to create text documents like letters and mailing lists. Similarly, an image
processing software package assists a user in drawing and manipulating graphics.
Software
Two categories of Software

Software

1. Application 2. System Computer Software Relationships


Software Software

User Interface Application Programs


1.1 General Purpose: 2.1 System
- browsers, Utility
- word processors,
- spreadsheets,
2.2 Device User Interface Operating System
- Database systems, Drivers
- presentation graphics
- Games
2.3 Language
Translators User Basic Input and Output Services (BIOS)
1.2 Special Purpose: Interface •  needed for a computer to boot up
- Multimedia
- Web authoring, 2.4 Operating
- virtual reality, system
- artificial intelligence
Computer Hardware
1. Application software
It is the reason that one buys a personal computer
help users to solve particular computing problems
Allows users to create content or perform basic/business functions.
Increases users productivity
includes database programs, Email, word processors, spreadsheet, food
ordering systems etc.,

e.g. Microsoft
Office, Excel and
Outlook, Google
Chrome, Mozilla
Firefox and Skype,
A d o b e R e a d e r,
P h o t o s h o p ,
Games, mobile
applications,
windows media
player ….
Application Vs. System software
Applications software are controlled by system software
Without system software, the computer will not run, and
without application software, computer is useless

System Software Application Software


Enable the computer to function Enable user to work efficiently
COMPULSORY: must have for any OPTIONAL: depends on user's need and
computer system requirement
Ecah computer need one system Each computer can have multiple
software application software
INDEPENDENT: can be used without DEPENDENT: can be used without
application software system software
Provides environment in which Provides environment in which user can
application run create/accomplish specific task
Runs on background and acts as a Runs in foreground and interacts with
platform user
e.g. Language processor, OS, disk
e.g. Video Player, text editors, browser
drives
2. System software
refers to software that helps User Operating
manage and control the Application and
software systems
hardware (CPU, I/O devices software
and communication links) such
that users can perform task using application software.
Essential programs that enables computer to function
Program required to interpret/run application software
low-level programs that interact with computer at very basic level
e.g.: Windows, Mac OX, Linux, Disk Defragment, Antivirus,
Manages the fundamental operations of the computer, such as
•  loading programs and data into memory,
•  executing programs,
•  saving data to disks,
•  displaying information on the monitor,
•  transmitting data through a port to a peripheral device.
2.1 System Utility
Used to carry-out day-to-day tasks related
to computer maintenance
Primarily bundled with OS to support, enhance,
secure and change settings for existing programs
and data in the computer system.
User could also purchase many third-part utility software
generally small programs that performs specific tasks: such as
•  Uninstaller Program,
•  Backup,
•  Data Recovery,
•  Virus Protection,
•  Disk Defragmenter,
•  Anti-virus protection ,
•  disk formatting,
•  Firewall,
•  Disk Cleanup
•  Desktop widgets
2.2 Device Drivers
A computer program that facilitates the communication between the
computer and a peripheral device (e.g. printer, mouse, etc.)

Whenever a new device is added to the computer system, its device


driver must also be installed before the device could be used.

Most devices comes along with it's own


device drivers software bundled

It is not an independent program;


it assists and is assisted by the OS for
proper functioning of the device.

For example: printer driver software that comes


along while buying the printer; lets the CPU know the
type of hardware and the type of instruction for that
particular printer.
2.3 Language Translators
Computers only understand 0s and 1s (machine language).
To ease the burden of programming entirely in 0s and 1s, high-level
programming languages were developed
Initially assemblers were used but with advancement of programming
languages introduced English word as program statements which gave
rise to requirement for language translators which simply converts a
programmer’s source code into equivalent machine language.
Source code: High-level program code written by the programmer.

Object code: program in machine Some language translators:


Language code but not ready to be
run. a.  Compiler
(i.e. a partial program with OBJ extension) b.  Interpreters
Executable code: Program code in machine c.  Assembler
language which computer can run. d.  Loader
(i.e. program with .exe or .com extension) e.  Linker
Step 1: Translate program
Object Code

Compiler Machine
Computer
/ language
program
Interpreter program

•  converts ASCII source into


executable machine language
•  creates a new file containing
the object code.

Step 2: Execute program

Object Code Program


execution
Machine
language
program Execute that NEW
object code file.
a. Compiler

converts programs written in high level language into machine codes.

converts a complete program into machine language to produce a


program that the computer can process in its entirety

a system program that translates entire piece of source code into object
code at once

compilers requires some time before an executable program emerges.


However, compiled programs runs much faster than the same programs
executed by an interpreter.

Once compiled executable code can be saved and reloaded again.

useful for larger programs that needs to be executed several times


without having to be modified.
b. Interpreter & c. Assembler
b. Interpreter
Translates one high level program statement at a time into machine code

analyzes and executes each line of source code in succession, without


looking at the entire program.

The advantage of interpreters is it can execute a program immediately


However At every execution the translation has to be redone.

Easier to debug as it can pinpoint the error locations (e.g syntax error at
certain line number)

c. Assembler

Converts programs written in assembly language in machine language

Translates assembly words (mnemonics) into machine languages


Language Translators

Program.exe
Program.obj
•  Compiler
•  Interpreter
•  Assembler
IF A := B
THEN 1001101
Language
Translator 1110101
Program 0010110

Source
Program

Written in
PHP,
BASIC, C++, Language Machine
etc. Translation Language
Process Object
Program
d. Loader & e. Linker
d. Loader
responsible for loading programs into memory, preparing them for
execution and then executing them.
part of the operating system's kernel and is loaded at system boot time
and stays in memory until the system is rebooted or shut down

d. Linker (link editor)


combines object modules generated by compiler to form a single
executable program (exe), library file, or another object file.
Takes objects from a collection called a
library (DLL – Dynamic Link Library).
These objects are program modules containing
machine code and information for the linker.
replaces symbolic addresses with real addresses
Software Development
Major activities:
•  Editing (writing the program)
•  Compiling (creates .obj file)
•  Linking with compiled files (creates .exe file)
o  Object files
o  Library modules
•  Loading and executing Source Program

•  Testing the program


Compile
Library routines
Edit Link
Other object files
Think Load

Execute
2.4 Operating System
Must have program for on any computer system to run other programs
consists of the master set of programs that manage the basic tasks such
as recognizing input from keyboard, sending output to screen, keeping
track of files & directories and controlling peripheral devices
maximizes the productivity of a computer system by operating it
efficiently minimizing the human intervention.
What does an OS do for me? LOTS!
Provides Allows Hides Manages Detects
Applications hardware Controls Storage Maintains equipment
User Basic I/O Security
interface to run complexity space failure

In general terms……
intermediate between the user/application and the hardware.
part of OS code is stored in a ROM and the rest of it resides on a disk.
loaded to the main memory when the computer is switched on (Booting)
Microsoft Windows, MS-DOS, Mac OS, OS/2, Linux, Android, UNIX etc.
2.4 Operating System cntd…
Elements of OS:

1.  User Interface (UI): The part of the OS that user interface with.
2.  Kernel: The core of the OS which interacts with the BIOS and UI
3.  File Management System: Organizes and manages files.

Common functions that OS performs:


•  Perform common computer hardware functions
•  Provide a degree of hardware independence
•  Control access to system resources
•  Provide networking capability
An OS provides services for:
—  Processor Management
•  Manage processing tasks
—  Memory Management
•  Manage system memory
—  File Management
•  Provide a user interface
—  Device Management
•  Manage files
—  Concurrency Control
Types of Operating System
1. Single-User 2. Multi-User OS

-  can only be accessed/ -  provides an environment where multiple users


used by a single user can work/use the system at given time. i.e.
at a time users running same instance of or multiple
applications without any concern about what
-  generally installed on other users are doing
personal computers, or
-  installed on powerful machines like
mobile devices
mainframes and minicomputer (aka Server)
e.g. MS-DOS, Win95, -  User uses terminal (Client) that are connected
Win98, Win XP, Android, to this server; to run applications
Apple iOS
-  Each users can run multiple applications BUT
all compete for available system resources
-  ensures sufficient resources to each user
such that problem with one doesn't affect
others
-  e.g. UNIX, Windows 2000 Server, Sun Solaris
Types of Operating System
3. Single-Tasking OS 4. Multi-tasking OS
-  support only a single - Processor divides its execution time (time-
task at any time. sharing) among multiple tasks.
-  All tasks are executed - Simultaneous execution of multiple task is
sequentially. handled by sharing of it's resources (memory &
processors clock)
e.g. MS-DOS, Palm OS ,
Symbian OS - Switching of processor between applications
gives the appearance of programs being executed
Single Program 1 at same time.
Tasking
OS - switching allows user to open and run multiple
Unused memory
applications at the same time.
Program 1 i.e. writing in MS-Word while listening music on VLC
Multi Program 2 player and using firefox to browse internet and
Tasking download a pdf file to print
OS Program 3
Unused memory e.g. Microsoft's Windows OS, Apple's Mac-OS, Linux

Most of the time it is safe to say that Multi-User OS is also a Multi-tasking OS


but the reverse may not be true
Types of Operating System
5. Real-time OS (RTOS)
-  responds to inputs within a defined time period and have a
predictable behavior. (real time behavior)
-  allows a computer to control or monitor tasks performed by other
machines and people by responding to the input data in the required
amount of time.
-  are implemented where it requires certain actions to be performed by
system based on various events
-  used to control machinery, scientific instruments, industrial systems,
etc..
-  Limited/little user-interface capability, and NO end-user utilities
- These days; RTOSs are also a part of video games, CD players,
washing machines, Reservation systems and so on
e.g.: Lynx OS, Nucleus RTOS
Types of Operating System
6. Multi-threading OS
-  ability of OS to execute different parts of program (threads), i.e.
running different parts of a single program concurrently.
-  processing activity that is basically multitasking within a single
application

THREAD
an independent strand of the process that performs basic instructions
within the context of the same process.
- a single sequential flow of control within a program execution.
e.g. bold, Underline and Italics functions in ms-word
- Each thread has a beginning, a sequence of instruction, and an end.
- A thread is not a process by itself.
- It cannot run on its own; it always runs within a process
EXTRA READING:
Software applications (program) may contain both threads and processes. A process
may contain one or more threads, but a thread cannot contain a process.

A PROGRAM is an executable file residing on the disk (secondary storage).

It is a set of instructions stored persistently in the secondary storage device that are
intended to carry out a specific job. It is read into (loaded into) the primary memory and
executed by the kernel.

termed ‘passive entity’ because it exists in storage persistently even if machine reboots.
e.g. : The ‘Calculator’ program is stored at “:\windows\system32\calc.exe”.
The ‘ls’ program is available at: “/bin/ls”.

A PROCESS is an executing instance of a program.

Termed ‘active entity’ because it is always loaded in main memory and remains there
until the program is closed. Several process may be associated with a same program.

On a multiprocessor system, multiple processes can be executed in parallel. On a


Single processor system, a process scheduling algorithm schedules the processor to
execute each process one at a time.

e.g.: Executing multiple ‘Calculator’ program, called Instance, Each instances is a


process.
EXTRA READING:
A THREAD is called a ‘lightweight process’.
Is similar to process in that they both execute a series of instructions. Both may be
initiated by a program or the operating system.

Each process starts with one thread and may also be made up of multiple threads, that
execute instructions concurrently.

On multiprocessor systems Multiple threads are executed at the same time and on a
single processor system, a thread scheduling algorithm schedules each thread one at a
time.

Processes typically run for a long time (often until a program is closed), while threads
may run for only a brief moment (often less than a second).
Processes
also require
their own
memory
space,
while
threads
simply
uses the
available
memory
temporarily.
EXTRA READING:
Basic function of Operating system:
1. Process management:
A PROCESS, is a programs that performs some action and can be controlled by a user,
by other applications or by the operating system.

It is processes, that operating system controls and schedules rather than applications,
for execution by the CPU.

Process management handles the creation, deletion, suspension, resumption, and


synchronization of process.
It performs the following activities for completing every process:
(a) Executes the instructions sequentially;
(b) Transfers data between memories and terminals
(c) passes control from one program to another when more than one application
programs are running,
(d) Activates, deactivates or synchronizes devices for the execution of processes.

NOTEs: The application you see (word processor, spreadsheet or game) cause several
other processes to begin, for tasks like communications with other devices or other
computers. There are also numerous processes that run without giving you direct
evidence that they ever exist. For example, Windows XP and UNIX can have dozens of
background processes running to handle the network, memory management, disk
management, virus checks and so on.
EXTRA READING:
2. Memory management:
Operating system performs two broad tasks to manage computer's memory, there are:

a. Each process must have enough memory to execute, and it can neither run into
the memory space of another process nor be run into by another process.

b. The different types of memory in the system must be used properly so that
each process can run most effectively.

Memory management thus, handles allocation and de-allocation of memory space as


required by various programs.

It also transfers or exchanges data and instructions into and out of memory.

3. File management:

It performs the file related activities such creating, organizing, storing, retrieving,
naming, protecting and deleting the files and directories.

Copying the files from one directory to another


EXTRA READING:
4. Input / output and peripherals management:

It manages the input-output subsystem or all the devices attached to the computer
system such as mouse, printers, modems, Graphics card, keyboard etc.

It manages the difference in speeds of CPU and input-output devices by creating


buffers.

it detects the device failure and notifies to the user

5. Storage management:

It allocates space in main storage to meet the processing requirements of different


applications.

It manages all the storage devices and the transferring of data and instructions between
the storage devices, CPU and the peripheral devices

6. CPU time management:

The most efficient operation of any computer depends upon keeping CPU busy.

To achieve this, the operating system schedules work for the CPU.
EXTRA READING:
7. Virtual Storage:
This technique increases the capacity of main memory without increasing its size.

Divides job into sequences of instructions, and keeping only a few of these in main
memory at a time; while the remaining are kept on secondary storage devices.

Thus, relatively large jobs can be processed efficiently by a CPU without running out of
the resources.

8. Security management:
It protects system resources and information from destruction and unauthorized use by
allowing user to create a password for protection.

They also provide backup and recovery routines for starting over in the event of a
system failure.

9. User interface:
It provides the interface between the user and hardware.

This interface consists of a set of commands or menus which are helpful for the user to
communicate with the program.
EXTRA READING:
10. Detects Problems and Equipment Failure:
The operating system is the maintenance mechanic of the system.

computer performs checks on all electronic parts for it's proper functioning. If failure is
detected notifies it to the user.

11. Batch Processing:


It is the basic method in which data are accumulated and processed in groups.

used in earlier operating system which allowed only one program to run at a time.

In Batch processing; series of programs to be executed are held in a queue.

Jobs are scheduled and the required resources are allocated according to priority.

It is best suited for large computers doing large numbers of repetitive jobs.

12. Online processing:


In online processing data are processed instantaneously.

Here, softwares takes the appropriate steps to access the central database and return
the information to the terminal from which the request was made.

All these steps are done within a few seconds.


EXTRA READING:
Other general functions may include:
It creates the environment in which the application program can function.
It allows users to:
1) Execute Program :- Loading the program into memory , execute & terminate the
program.
2) Error Detection :- Identifies errors and notifies to user
3) Resource Allocation :- Management of available resources & allocation of
those resources to different applications ans
users.
4) I/O Operation :- Execution of input/output request involving devices & files.
5) File Management or Manipulation :- Executing request to read, write, rename
or delete the data file as well as file management services.
6) Accounting :- Maintaining accounts of resources being used by different users &
applications and generating usable table.
7) Security :- Providing protection to program & data to ensure data security.

Function of operating system can be further listed as follows:

- user interface implementation - share hardware implementation


- allows users to share data - Prevent users from interfering with one another
- Facilitates input/output process - Scheduling resources among users.
- Facilitate parallel operations - Organize data for secure and rapid access.
- Handle network communications

Vous aimerez peut-être aussi