COE 121 Lecture 2
COE 121 Lecture 2
• Single program/single user program: This allow only a single user to run a single
program at one time e.g. MsDos.
• Multiprogramming/Multitasking : Allow more than one program/user to be run
at the same time. The CPU switches back and forth between programs. e.g. the
computer could be performing a complex spreadsheet calculation at the same
time downloading a file from another computer while the user is writing a memo.
– Multiprogramming OS on PC’s can support a single user running multiple programs or
support more than one user running more than one program. This version of is called
multi-user - multiprogramming operating system.
• Multiprocessing :Computers that have more than one CPU are called
multiprocessors. A multiprocessing operating system co-ordinates the operating
of multiprocessor computer. They have an advantage that if one CPU fails, work
can be shifted to the remaining CPUs. The ability to continue processing when a
major component fails is called fault tolerance.
Virtual machine
• VM operating system, available on some large computers,
allows a single computer to run two or more different
operating systems. It allocates system resources to each
operating system.
• One or more virtual “guest” machines run on a physical
“host” machine. Each virtual machine runs its own operating
system and functions separately from the other VMs, even
when they are all running on the same host.
• The advantage is that an organization can concurrently run
different operating systems that are best suited for different
tasks.
• Some virtual machines OSs are avaliable in the cloud
Utility software
Are designed to help analyse, configure, optimise or maintain a computer. A single
piece will be called a utility or tool. Some well-known utility software include :
– Antivirus programs: Used to detect and eliminate computer viruses and
related malicious software. Some e
– Backup programs: Help to make copies of all information available to a
computer or information system and store it safely. The information can be
restored in the event of disk failure or other accidents
– Data Recovery: Are used to recover data. Since disk drives or other hardware
may fail, these utilities are essential to recover data in such a scenario..
– Data Compression programs: They make the data more compact, reducing
the space occupied by the data.
– Disk management programs : These are programs involving formatting and
arranging disk files in an orderly manner.
– Memory management software : Handles locations in RAM where data put
their current data. It can move certain memory-resident items out of the way
so as to increase the memory space.
Programming software
A type of software used for creating other software also called Integrated
Development Environment (IDE).
• Program written in high-level language is called as source code. To convert the source code
into machine code, translators are needed
• IDE normally consist of a source code editor, a translator (compiler or interpreter) and a
debugger.
• Editor : programming tool used for creating and modifying application programs. It helps
computer user to enter, search, delete, replace, copy and insert text or sections of a text in a
desired position.
• Translators: These are the software that converts the source code/programs to their object
code/program equivalence.
• Types of translators
– Compiler: It is used to convert a complete program written in a high-level language
(such as Pascal and C) into a program in low-level/machine language.
– Assembler: A programming tool that convert a program in assembly language into
program in machine language.
– Interpreter: A program which translates the program statements into machine
language one line at a time as the program is running
• Debugger: It a program used for locating and correcting programming errors
Number system
• A number system is a set of symbols or
numbers combined with rules on how these
numbers are used.
• Examples:
– Decimal number system (Base 10)
– Binary number system ( Base 2)
– Octal number system ( Base 8)
– Hexadecimal number system( Base 16)
Number system
• Decimal system: 10 symbols (digits)
– 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
• Octal System : 8 symbols
– 0, 1, 2, 3, 4, 5, 6, 7
• Binary System : 2 symbols
– 0, 1
• Hexadecimal : 16 symbols
– 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
To represent any number, no matter how large
or how small.
Number system
• The value of each digit is determined by
relative position; how many places to
the left or to the right of the point
• The most significant digit is to the left
while the least is to the right
Converting number systems
Procedure for converting:
Any number system to decimal system
• Multiply the number by the base raised to the power of
position number, them sum
• 5 2 1 7 (base-8)
7 X 80 = 7x1 = 7
1 X 81 = 1x8 = 8
2 X 82 = 2x64 = 128
5 X 83 = 5x512 = 2560
Sum them : 2560 + 128 + 8 + 7 = 2703
Therefore 52178 = 270310
Converting number systems
Procedure for converting:
Any number system to decimal system
• Fractional numbers begins with position -1 and moving to the
right which is the least significant
• 1 0 1 (base-2)
1 X 2-1 = 1x0.5 = 0.5
0 X 2-2 = 0x0.25 = 0
1 X 2-3 = 1x0.125 = 0.125
Sum 0.5 + 0 + 0.125 = 0.625
Therefore 0.1012 = 0.62510
Converting number systems
Procedure for converting:
Any decimal system to another base
• Whole number
-divide the number by the base you are converting to-write the
remainder on the left, and write number upwards beginning with the
least remainder
0 . 4375 to binary
0.4375 x 2 = 0.8750
0.8750 x 2 = 1.75
0.75 x 2 = 1.5
0.5 x 2 = 1.0
0.437510 = 0.01112
Converting number systems
Procedure for converting:
Binary to Octal
• Starting from the least significant bit, make groups of three
bits
• If there are one or two bits less in making the groups, 0s can
be added after the most significant bit
• Convert each group into its equivalent octal number
Binary to Hexadecimal
• Starting from the least significant bit, make groups of four
bits
• If there are one or two bits less in making the groups, 0s can
be added after the most significant bit
• Convert each group into its equivalent Hexadecimal number
Converting Number systems
Example:
Decimal numbers to hexadecimal -do repeat division of the
number by 16 while recording the remainder. The remainders
are to be read from bottom to top with (least significant
being the top digit)to obtain the binary equivalent.Any
number system to decimal system
42310 = 1A716
Character representation
Refers to the way non-numeric data, e.g letter of the alphabet , punctuation mark is
represented by a series of bits. We use standard encodings (binary sequences) to
represent characters. Codes most widely used are ASCII, ANSI and EBCDIC. A fourth
code is Unicode considered prevalent today.
• ASCII - American standard code for information interchange code.
– This coding system uses single 7-bit binary integer for each character. Itis
used in many mini computers to represent 27 (=128) symbols including
uppercase and lowercase letters, special control codes, numerals and
punctuation symbols. There is one additional parity bit for error checking.
• ANSI - American National Standards Institute Code
– This code uses 8 bits to represent each character. They can convey up to 28 (=
256) units of information so it can be used to code 256 letters and symbols.
• EBCDIC - Extended Binary Coded Decimal Interchange Code
– This is an 8 -bit character representation code (256 characters) developed by
IBM for its mainframe computers. It does not use the same code as ASCII or
ANSI for the initial 128 characters.
• Unicode: is a 16/32 -bit code that can represent any character in every language
used today. ASCII constitutes the first 127 characters in Unicode
Computer network
A computer network is a collection of interconnected
computers and other devices (nodes) that communicate to
share data, hardware and software.
Categories if networks
• Local area network (LAN) is a computer network covering a local area, like a
home, office building or small group of buildings such as a college/campus. LANs
are distinguished from other kinds of networks by three characteristics: (1) their
size, (2) their transmission technology, and (3) their topology.
• Metropolitan Area Networks or MANs are large computer networks usually
spanning a campus or a city. They typically use wireless infrastructure or optical
fiber connections to link their sites. For instance a university may have a MAN
that joins together many of their campus LANs around a city.
• Wide area network or WAN is a computer network covering a wide geographical
area, often a country or continent involving a vast array of computers. The best
example of a WAN is the Internet. WANs are used to connect local area networks
(LANs) together, so that users and computers in one location can communicate
with users and computers in other locations. Many WANs are built for one
particular organization and are private.
LAN Hardware
• Network interface card (NIC): This is the hardware component for connecting a
computer to a LAN. It is a small circuit board designed to plug into an expansion
slot on a computer main-board. The NIC sends data from your computer out over
the network and collects incoming data for your workstation. Most recent
computers have them integrated onto the motherboard. Each card has a unique
MAC address in ROM
• Connecting cables:- The cables commonly used for interconnecting PCs are the
twisted pair copper wires, either Category 5 (CAT 5) or Category 6 (CAT 6) cables
or fiber optic conections.
– some use wireless networks . The NIC on a wireless network contain the
transmitting device necessary to send data to other devices on the LAN.
• Network Servers: There are different kinds of network servers. e,eg file server
– Print server – stores files in a print queue and sends each queued file to the
network printer.
– Application server : computer that runs application software and forwards
the results of processing to workstations
• Modem - modulate and demodulate data.
Network software
• Network operating system gives basic support functions to the computers
within the LAN
• A network requires network software or network operating system to control
the flow of data, maintain security, and keep track of user accounts.
• Examples:
– Network Operating Systems such as Novell Network, Banyan lines, and
LANtastic are software packages designed to control data flow.
• Network software is sometimes included as a component of popular
computer Operating systems such as windows for workgroup, , UNIX, OS.
• A network OS has both the server and client software.
• Standalone Applications: Most applications designed for standalone
computers can be installed on a network server, which sends them to
individual workstations as requested.
• GroupWare: A workgroup is basically two or more people who work on the
same project. GroupWare is application software that support collaborative
work, usually on a LAN.
Physical Topology
It is the geometric representation of the relationship of all the
links and linking devices (called nodes) to one another. There
are four basic topologies possible: mesh, star, bus, and ring
Bus-topology: Is multipoint. One cable acts as backbone to link all the devices in the
network. New nodes are easily added to the bus cable by drop lines and taps and all
nodes may directly communicate with each other.
Advantages
• Easy to implement and extend
• Well suited for temporary networks (quick setup)
• Typically the cheapest topology to implement
• Failure of one station does not affect others
Disadvantages
• Difficult to administer/troubleshoot
• Limited cable length and number of stations
• A cable break can disable the entire network/Fault isolation
• Maintenance costs may be higher in the long run
• Performance degrades as additional computers are added
Physical Topology
Ring-topology: Node is connected to two other nodes-dedicated
point-to-point connection. Movement of data on the ring is in one
direction until it reaches destination . Each device in the ring
incorporates a repeater
Advantages
• Growth of the system has minimal impact on performance
• All stations have equal access
• Each node on the ring acts as a repeater, allowing ring networks to span
greater distances
• Because data travels in one direction high speeds of transmission of
data are possible
• Fault isolation easy- nodes alarms
Disadvantages
• Often the most expensive topology
• Failure of one computer may impact others
Physical Topology
Star-topology: Each device has a dedicated point-to-point link only to
a central controller called hub. Does not allow direct traffic between
devices, If one device wants to send data to another, it sends the data
to the controller, which then relays the data to other connected
devices
Advantages
• Less expensive than a mesh topology
• All stations have equal access
• Additions, moves, and deletions involve only one connection: between
that device and the hub
• Robustness. If one link fails, only that link is affected. Other links remain
active
• Fault isolation easy- nodes alarms
Disadvantages
• Often the most expensive topology
Physical Topology
Mesh-topology: Every device has a dedicated point-to-point
link to every other device
Advantages
• Dedicated links guarantees that each connection can carry its own data
load
• Privacy or security. When every message travels along a dedicated line,
only the intended recipient sees it
• Robustness. If one link fails, only that link is affected. Other links remain
active
Disadvantages
• installation and reconnection are difficult.
• bulk of the wiring can be greater than the available space
• hardware required to connect each link
• (I/O ports and cable) can be prohibitively expensive
Network Protocols
A communication protocols is a set of rules that ensures the orderly
and accurate transmission and reception of data.
In networks, communication occurs between entities and two entities
cannot simply send bit streams to each other and expect to be
understood. For communication to occur, the entities must agree on a
protocol. A protocol is a set of rules that govern data
communications. A protocol defines what is communicated, how it is
communicated, and when it is communicated. The key elements of a
protocol are syntax, semantics, and timing.
o Syntax. The term syntax refers to the structure or format of the data, meaning the
order in which they are presented
o Semantics. The word semantics refers to the meaning of each section of bits.
o Timing. The term timing refers to two characteristics: when data should be sent and
how fast they can be sent. For example, if a sender produces data at 100 Mbps but
the receiver can process data at only 1 Mbps, the transmission will overload the
receiver and some data will be lost
Viruses
A malicious software program loaded onto a user’s computer
without the user’s knowledge and performs malicious actions
• A computer virus passes from computer to computer like a
biological virus passes from person to person-Once it’s
running, it spreads by inserting copies of itself into other
executable code ordocument
• SELF REPLICATION: Viruses are notable for the ability to replicate itself to infect
computers
• EXECUTABLE PATH: Before the virus can do anything, it must be executed. If it
• cannot be executed, it is harmless
• SIDE EFFECTS: Viruses do not just contain self-replicating code; they also contain
what is called a payload. The payload is similar to a warhead on a missile; it is the
side-effect of the virus.The payload has the potential to be malicious
• DISGUISE: Virus will be able to disguise itself before it is noticed by its side-
effects. There are two methodsof disguise, encryption and interrupt interception
Viruses
WHAT VIRUSES MAY DO TO A COMPUTER
• Delete files.
• Varies messages in files or on programs.
• Changes volume label.
• Randomly overwrites sectors on the hard disk.
• Marks clusters as bad in the FAT (file allocation table)
• Replaces the MBR (master boot record ) with own code.
• Create more than one partition
• Causes cross-linked files.
• Causes a "sector not found" error.
• Cause the system to run slow.
• A directory may be displayed as garbage.
• Directory order may be modified so files, such as COM files, will start at the
beginning of the directory.
• Causes keyboard keys to be remapped.
Viruses
Signs Your Computer is Infected
• Functions slower than normal
• Responds slowly and freezes often
• Restarts itself often
• See uncommon error messages, distorted
menus, and dialog boxes
• Notice applications fail to work correctly
• Fail to print correctly
Types Viruses
• Time Bomb: A time bomb is a virus program that performs an activity on a
particular date or after a particular period
• Logic Bomb: A logical bomb is a destructive program that performs an activity
when a certain action has occurred or s trigered by an action
• File virus: A file virus infects the executable program files on your computer
system. These usually, but not always, have .COM or .EXE file extensions. When
you run an infected program, your computer also runs the attached virus
instructions to replicate or to deliver its payload.
• Boot Sector Virus: Infects boot sector of computers. During system boot, boot
sector virus is loaded into main memory and destroys data stored in hard disk
• Macros Virus: Is associated with application software like word and excel. When
opening the infected document, macro virus is loaded into main memory and
destroys the data stored in hard disk
• Trojan Horse: It usually pretends as computer games or application software. If
executed, computer system will be damaged
– usually comes with monitoring tools and key loggers
Worms
A computer worm is a self-replicating computer program. It uses a network to send copies
of itself to other nodes on the network. It may do this without user intervention.
Worms tend to harm the network by consuming network bandwidth whereas viruses
infect or corrupt files on the targeted computer.
It is designed to enter a computer system – usually a network through security holes. Like
a virus, a worm reproduces itself. Unlike a virus, a worm does not need to be attached to
an executables program to reproduce. These security holes may be electronic mail system
Email Worms :{Spread via email messages. Typically the worm will arrive as email, where the
message body or attachment contains the worm code, but it may also link to code on an
external website.
File-sharing networks worms: File-sharing worms copies itself into a shared folder which is most
likely located on the local machine. The worm will place a copy of itself in a shared folder under
a harmless name
Internet worms : Internet worms are those that target low level TCP/IP ports directly, rather
than going via higher level protocols such as email or IRC.
Preventing Viruses
• Update anti-virus software at least weekly.
• Back up important files and ensure that they can be restored.
• Computer's boot sequence should always start the PC from its hard drive
• Don't share Drive C: without a password and without read-only
restrictions.
• Remove portable drives before turning on computers, especially laptops
• Do not open unexpected e-mail attachments, even if they're from friends.
• Install computer's anti-virus software and use it.
• Keep multiple backups of important files. This lowers the chance that all
are infected
• Install security updates for your operating system and programs as soon
as possible.
• Keep learning more about computer. This will help in spoting viruses
End