Académique Documents
Professionnel Documents
Culture Documents
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
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
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 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
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
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
Compiler Machine
Computer
/ language
program
Interpreter program
a system program that translates entire piece of source code into object
code at once
Easier to debug as it can pinpoint the error locations (e.g syntax error at
certain line number)
c. Assembler
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
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.
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.
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”.
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.
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.
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.
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.
It manages the input-output subsystem or all the devices attached to the computer
system such as mouse, printers, modems, Graphics card, keyboard etc.
5. Storage management:
It manages all the storage devices and the transferring of data and instructions between
the storage devices, CPU and the peripheral devices
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.
used in earlier operating system which allowed only one program to run at a time.
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.
Here, softwares takes the appropriate steps to access the central database and return
the information to the terminal from which the request was made.