Chapter 1
Chapter 1
01/25/25 1
CHAPTER -ONE
Content
Computers, parts of computers and their roles
Data and Networking
Operating systems
Accounts
Command prompt
Command options and arguments
DOS and Unix common commands
The Job of the Shell
01/25/25 2
The Role of Computers
01/25/25 3
Parts of a Computer
01/25/25 4
Basic Personal Computer System
A computer system consists of hardware and software components.
Hardware is the physical equipment such as the case, storage drives, keyboards, monitors, cables,
speakers, and printers.
01/25/25 5
Computer Cases and Power Supplies
Computer case
•Provides protection and support for internal components.
•Should be durable, easy to service, and have enough room for expansion.
Power supply
•Converts AC power from the wall socket into DC.
•Must provide enough power for the installed components and future additions.
01/25/25 6
Power Supplies
The power supply converts alternating-current (AC) power coming
from a wall outlet into direct-current (DC) power, which is a lower
voltage.
•DC power is required for all of the components inside the
computer.
•Cables, connectors, and components are designed to fit together
comfortably.
Never force any connector or component.
01/25/25 7
Four Basic Units of Electricity
Voltage (V): is a measure of the force required to push electrons
through a circuit. Voltage is measured in volts. A computer power
supply usually produces several different voltages.
•Current (I): is a measure of the amount of electrons going through a
circuit. Current is measured in amperes, or amps (A). Computer power
supplies deliver different amperages for each output voltage.
•Power (P): is voltage multiplied by current. The measurement is called
watts (W). Computer power supplies are rated in watts.
•Resistance (R): is the opposition to the flow of current in a circuit.
Resistance is measured in ohms. Lower resistance allows more current
to flow through a circuit.
•Formulas
–V = IR
–P = VI
01/25/25 8
Power Supplies
01/25/25 9
Internal Components of a Computer
01/25/25 10
Motherboards
The main printed circuit board.
•Contains the buses, or electrical pathways found in a computer. Buses
allow data to travel among the various components.
•Also known as the system board, the backplane, or the main board.
•Accommodates CPU, RAM, expansion slots, heat sink/fan assembly,
BIOS chip, chip set, sockets, internal and external connectors, various
ports, and the embedded wires that interconnect the motherboard
components.
01/25/25 11
Central Processing Unit (CPU)
Known as the brain of the computer. Also
referred to as the processor.
•Most important element of a computer system.
•Executes a program, which is a sequence of
stored instructions.
01/25/25 12
Parts of a Computer CPU
A device that interprets and runs the commands
that you give to the computer.
01/25/25 13
Cooling Systems
Electronic components generate heat. Too much heat can damage components.
•A case fan makes the cooling process more efficient.
•A heat sink draws heat away from the core of the CPU. A fan on top of the
heat sink moves the heat away from the CPU.
01/25/25 14
Parts of a Computer Memory
Memory is where information is stored and
retrieved by the CPU.
•There are two main types of Primary memory:
–Random Access Memory (RAM): It is the main
memory and allows you to temporarily store
commands and data.
01/25/25 16
Serial Ports and Cables
A serial port can be either a DB-9, as shown, or a DB-25
male connector.
•Serial ports transmit one bit of data at a time.
•To connect a serial device, such as a modem or printer,
a serial cable must be used.
•A serial cable has a maximum length of 50 feet (15.2
m).
01/25/25 17
Parallel Ports and Cables
Parallel ports can transmit 8 bits of data at one time and
use the IEEE 1284 standard.
•To connect a parallel device, such as a printer, a parallel
cable must be used.
•A parallel cable has a maximum length of 15 feet (4.5
m).
01/25/25 18
Network Ports and Cables
A network port, also known as an RJ-45 port, connects a computer to
a network.
•Standard Ethernet can transmit up to 10 Mbps.
•Fast Ethernet can transmit up to 100 Mbps.
•Gigabit Ethernet can transmit up to 1000 Mbps.
•The maximum length of network cable is 328 feet (100 m).
01/25/25 19
Input Devices
Input devices used to enter data or instructions into a computer:
•Mouse and Keyboard
•Digital camera and digital video camera
•Biometric authentication device
•Touch screen
•Scanner
01/25/25 20
Output Devices
•Printers, Scanners, and Fax Machines -Printers are output devices that create hard copies of
computer files. Other all-in-one type printers are designed to provide multiple services such
as printing, fax, and copier functions.
•Speakers and head phones are output devices for audio signals.
–Most computers have audio support either integrated into the motherboard or on an adapter
card.
–Audio support includes ports that allow input and output of audio signals.
Headphones
Speakers
01/25/25 21
Operating System Overview
What is OS?
Operating System is a software, which makes a
computer to actually work.
It is the software the enables all the programs we
use.
The OS organizes and controls the hardware.
OS acts as an interface between the application
programs and the machine hardware.
01/25/25 23
Structure of Operating System
Application Programs
System Programs
Software (Operating System)
HARDWARE
01/25/25 24
Contd…
01/25/25 25
Contd…
3. System programs: or System Software are the
programs which enable the computer hardware or
system to run (without these the computer as a whole
or parts of it's functionality would not work).
•The programs and the file that comprises the
operating system are called system software. These
files include configuration files, system preferences,
system services, libraries of functions and the drivers
for the hardware installed on the computer.
01/25/25 28
Home Work
1. is utility software? Give examples?
2.What is the purpose of translator software, give full definitions of the following
translator soft-wares.
•Assembler
•Compiler
•Interpreter
•Linker
•Loader
3.State which program goes with the definition? System program or application
program?
01/25/25 29
Four Components of a Computer System
01/25/25 30
Computer Startup
• There is a program on the motherboard called the
system BIOS(Basic I/O System)
• BIOS contains low-level I/O software including:
01/25/25 31
Contd…
• The bootstrap program is loaded at power-up
or reboot.
• –Typically stored in ROM or EPROM, generally
known as firmware.
• –Initializes all aspects of system
• –Loads operating system kernel and starts
execution.
• –It is the initial program run when a computer is
powered on or booted.
01/25/25 32
Computer System Organization
• Computer-system operation
• One or more CPUs, device controllers connect
through common bus providing access to shared
01/25/25 33
Computer-System Operation
• I/O devices and the CPU can execute concurrently.
• Each device controller is in charge of a particular
device type.
• Each device controller has a local buffer.
• CPU moves data from/to main memory to/from local
buffers
• I/O is from the device to local buffer of controller.
• Device controller informs CPU that it has finished its
operation by causing an interrupt.
01/25/25 34
Storage Structure
• Main memory –The only large storage media
that the CPU can access directly.
• Secondary storage –extension of main
memory that provides large nonvolatile
storage capacity.
• Magnetic disks –rigid metal or glass platters
covered with magnetic recording material.
01/25/25 35
Storage Hierarchy
• Storage systems are organized in hierarchy.
• Speed
• Cost
• Volatility
01/25/25 37
Caching
• Important principle, performed at many levels in a
computer (in hardware, operating system, software).
• Information in use copied from slower to faster storage
temporarily.
• Faster storage (cache) checked first to determine if
information is there.
• –If it is, information used directly from the cache
(fast).
• –If not, data copied to cache and used there
• Cache smaller than storage being cached
• –Cache management important design problem
• –Cache size and replacement policy
01/25/25 38
Performance of Various Levels of Storage
01/25/25 39
Multiprogramming
• Multiprogramming is a technique to execute number of
programs simultaneously by a single processor.
• In Multiprogramming, number of processes reside in main
memory at a time.
• The OS picks and begins to executes one of the jobs in the
main memory.
• If any I/O wait happened in a process, then CPU switches from
that job to another job.
• Hence CPU is not idle at any time.
01/25/25 40
Contd…
The main memory consists of 5 jobs at a time, the CPU executes one by one.
• Advantages:
• Efficient memory utilization.
• Throughput increases.
• CPU is never idle, so performance increases.
OS
• Job 1
• Job 2
• Job 3
• Job 4
• Job 5
01/25/25 41
Time Sharing Systems
• Time sharing, or multitasking, is a logical
extension of multiprogramming.
• Multiple jobs are executed by switching the CPU
between them.
• In this, the CPU time is shared by different
processes, so it is called as “Time sharing
Systems”.
• Time slice is defined by the OS, for sharing CPU
time between processes.
• Examples: Multics, Unix, etc.,
01/25/25 42
Operating System Services
• One set of operating-system services provides functions that are
helpful to the user:
• –User interface -Almost all operating systems have a user
interface (UI).
• Varies between Command-Line (CLI), Graphics User Interface
(GUI), Batch.
• –Program execution -The system must be able to load a program
into memory and to run that program, end execution, either
normally or abnormally (indicating error).
• –I/O operations -A running program may require I/O, which may
involve a file or an I/O device.
• –File-system manipulation -The file system is of particular
interest. Obviously, programs need to read and write files and
directories, create and delete them, search them, list file
Information, permission management.
01/25/25 43
Cont…
• Communications–Processes may exchange information, on the
same computer or between computers over a network.
• Communications may be via shared memory or through message
passing (packets moved by the OS).
• Error detection –OS needs to be constantly aware of possible
errors.
• May occur in the CPU and memory hardware, in I/O devices, in
user program.
• For each type of error, OS should take the appropriate action to
ensure correct and consistent computing.
• Debugging facilities can greatly enhance the user’s and
programmer’s abilities to efficiently use the system.
01/25/25 44
Cont…
• Another set of OS functions exists for ensuring the efficient operation of
the system itself via resource sharing
• Resource allocation -When multiple users or multiple jobs running
concurrently, resources must be allocated to each of them.
• •Many types of resources -Some (such as CPU cycles, main memory, and file
storage) may have special allocation code, others (such as I/O devices) may
have general request and release code.
• –Accounting -To keep track of which users use how much and what kinds of
computer resources.
• –Protection and security -The owners of information stored in a multiuser or
networked computer system may want to control use of that information,
concurrent processes should not interfere with each other.
• •Protection: involves ensuring that all access to system resources is controlled.
• •Security : of the system from outsiders requires user authentication, extends to
defending external I/O devices from invalid access attempts.
• •If a system is to be protected and secure, precautions must be instituted
throughout it. A chain is only as strong as its weakest link.
01/25/25 45
User Operating System Interface -CLI
• CLI allows direct command entry.
• Sometimes implemented in kernel, sometimes by
systems program.
• Primarily fetches a command from user and executes
it.
• –Sometimes commands built-in, sometimes just
names of programs.
• »If the latter, adding new features doesn’t require
shell modification .
01/25/25 46
User Operating System Interface -GUI
• User-friendly desktop metaphor or symbol interface.
• –Usually mouse, keyboard, and monitor.
• –Icons repesent files, programs, actions, etc
• –Various mouse buttons over objects in the interface cause
various actions (provide information, options, execute function,
open directory (known as a folder).
• –Invented at Xerox PARC
• •Many systems now include both CLI and GUI interfaces
• –Microsoft Windows is GUI with CLI “command” shell
• –Apple Mac OS X as “Aqua” GUI interface with UNIX kernel
underneath and shells available.
• –Solaris is CLI with optional GUI interfaces (Java Desktop,
KDE).
01/25/25 47
User Operating System Interface
• Command Line Interface (CLI):
01/25/25 48
Most operating systems include both a GUI and a CLI.
01/25/25 49
Compare Operating Systems
• Terms often used when comparing operating systems:
• Multi-user–Two or more users can work with programs
and share peripheral devices, such as printers, at the
same time.
• Multi-tasking–The computer is capable of operating
multiple applications at the same time.
• Multi-processing–The computer can have two or more
central processing units (CPUs) that programs share.
• Multi-threading–A program can be broken into smaller
parts that can be loaded as needed by the operating
system. Multi-threading allows individual programs to
be multi-tasked.
01/25/25 50
Operating System Requirements
• Operating systems require a certain amount of hardware resources.
• These resources are specified by the manufacturer and include such things
as:
• –Amount of RAM
• –Hard disk space required
• –Processor type and speed
• –Video resolution
01/25/25 51
Cont…
• To take advantage of all of the features provided by an
OS, additional hardware resources such as sound cards,
NICs, modems, microphones, and speakers are generally
required.
• Many of the OS developers test various hardware
devices and certify that they are compatible with the
operating system.
• Always confirm that the hardware has been certified to
work with the operating system before purchasing and
installing it.
01/25/25 52
How to select an operating system
01/25/25 53
Installation of an Operating System
• An OS is installed in a defined section of the hard disk, called a disk
partition.
• •There are various methods for installing an OS.
• •The method selected for installation is based on the system hardware, the
OS being installed, and user requirements.
• •There are four basic options available for the installation of a new OS:
01/25/25 54
Cont…
• Clean Install
• A clean install is done on a new system or in cases where no
upgrade path exists between the current OS and the one being
installed.
• It deletes all data on the partition where the OS is installed and
requires application software to be reinstalled.
• A clean install is also performed when the existing OS
installation has become damaged in some way.
• Upgrade
• If staying within the same OS platform, it is often possible to do
an upgrade.
• With an upgrade, system configuration settings, applications and
data are preserved.
• It simply replaces the old OS files with the new OS files.
01/25/25 55
Cont…
• Multi-boot
• It is possible to install more than one OS on a computer to create a multi-boot
system.
• Each OS is contained within its own partition and can have its own files and
configuration settings.
• On start-up, the user is presented with a menu to select the desired OS.
• Only one OS can run at a time and it has full control of the hardware.
• Virtualization
• Virtualization is a technique that is often deployed on servers.
• It enables multiple copies of an OS to be run on a single set of hardware, thus
creating many virtual machines.
• Each virtual machine can be treated as a separate computer.
• This enables a single physical resource to appear to function as multiple logical
resources.
01/25/25 56
Preparing for OS installation
• A pre-installation checklist helps ensure that the installation process is
successful.
• 1. Verify that all hardware is certified to work with the selected
OS.
• 2. Verify that the hardware resources meet or exceed the
published minimum requirements.
• 3. Confirm that the appropriate installation medium is available.
Current operating systems are usually available on both CD and
DVD medium.
• 4. If the OS is to be installed on a system that already contains
data: (a) Use system diagnostic tools and utilities to ensure the
current OS installation is in good condition, free of malicious or
damaging files and codes;
• (b) Complete a full backup of all important files.
• 5. If performing a clean-install, verify that all application
software is available for installation.
01/25/25 57
Cont…
• Before starting the installation, it is necessary to determine the
partition structure that best meets user requirements.
• One of the techniques available to help protect data is to divide the
hard drive into multiple partitions. usually 1 for data 1 for the OS)
• It is also necessary to determine the type of file system to use.
• A file system is the method the OS uses to keep track of the files.
• Commonly used file systems include FAT 16/32, NTFS, HPFS,
ext2, ext3.
• Each OS is designed to work with one or more of these file system
types and each file system type offers specific advantages.
• Careful consideration should be made to the type of file systems
supported by the selected OS and the benefits of each.
01/25/25 58
Prepare a computer to participate in a network
• Once an OS is installed, the computer can be configured
to participate in a network; that means it would be given
it an address to be identified.
• A network is a group of devices, such as computers, that
are connected to each other for the purposes of sharing
information and resources.
• Shared resources can include printers, documents and
Internet access connections.
01/25/25 59
Cont…
• To physically connect to a network, a computer must have a network interface
card (NIC).
• The NIC is a piece of hardware that allows a computer to connect to the
network medium.
• In addition to the physical connection, some configuration of the operating
system is required for the computer to participate in the network.
• Each computer on a network requires an Internet Protocol (IP) address, as well
as other information, to identify it.
• There are three parts to the IP configuration, which must be correct for the
computer to send and receive information on the network:
• –IP address-identifies the computer on the network.
• –Subnet mask-is used to identify the network on which the computer is
connected.
• –Default gateway-identifies the device that the computer uses to access the
Internet or another network.
01/25/25 60
Cont…
• Manual IP Configuration:-The IP address
entered is referred to as a static address and is
permanently assigned to that computer using a
Keyboard.
• Dynamic IP Configuration :-Set up a computer
to receive network address dynamically. This
allows a computer to request an IP address from
a pool of IP addresses assigned by another
device within the network (DHCP)
01/25/25 61
Computer naming
• In addition to the IP address, some network operating systems make use of
names.
• •In this environment each individual system must have a unique name
assigned to it.
• •A computer name provides a user friendly name, making it easier for
users to connect to shared resources such as folders and printers on other
computers.
01/25/25 62
Networking and Its Benefits
• New technologies create a new kind of network that delivers
more than a single type of service.
• •Unlike dedicated networks, these new converged networks
are capable of delivering voice, video and data services over
the same communication channel or network structure.
01/25/25 63
Contd…
• Networks come in all sizes. They can range from simple
networks consisting of two computers, to networks connecting
millions of devices.
01/25/25 64
Contd…
• In business, large networks can be used to advertise and sell products, order supplies,
and communicate with customers.
• Communication over a network is usually more efficient and less expensive than
traditional forms of communication, such as regular mail or long distance phone calls.
• The Internet is considered a "network of networks" because it is literally made up of
thousands of networks that are connected to each other.
• Here are other uses of a network and the Internet:
• –Sharing music and video files
• –Research and on-line learning
• –Chatting with friends
• –Planning vacations
• –Purchasing gifts and supplies
01/25/25 65
Components of a network
• There are many components that can be part of a network, for example personal
computers, servers, networking devices, and cabling.
• •These components can be grouped into four main categories:
• –Hosts
• –Shared peripherals
• –Networking devices
• –Networking media
01/25/25 66
Cont…
Hosts: Are devices that send and receive messages directly across
the network.
•Shared peripherals: Are not directly connected to the network, but
instead are connected to hosts. The host is then responsible for
sharing the peripheral across the network. Hosts have computer
software configured to enable people on the network to use the
attached peripheral devices.
•The network devices: as well as networking media are used to
interconnect hosts.
•Some devices can play more than one role, depending on how they
are connected.
For example: a printer directly connected to a host (local printer) is
a peripheral. A printer directly connected to a network device and
participates directly in network communications is a host .
01/25/25 67
The Role of Host computers
• In modern networks, computer hosts can act as a client, a server, or both.
• The software installed on the computer determines which role the computer
plays.
• Servers are hosts that have software installed that enable them to provide
information, like email or web pages to other hosts on the network.
• For example, a host requires web server software in order to provide web
services to the network.
• Clients are computer hosts that have software installed that enable them to
request and display the information obtained from the server.
• •An example of client software is a web browser, like Internet Explorer.
01/25/25 68
Peer-to-peer networks
• Client and server software usually runs on separate computers, but it is also possible
for one computer to carry out both roles at the same time.
• This type of network is called a peer-to-peer network.
• The simplest peer-to-peer network consist software directly connected computers
using a wired or wireless connection.
• Multiple PC scan also be connected to create alarger peer-to-peer network but this
requires a network device,such as a hub
01/25/25 69
Network Topologies
• When networks are installed, a physical topology map is created to record where each
host is located and how it is connected to the network.
• •The physical topology map also shows where the wiring is installed and the locations
of the networking devices that connect the hosts.
• •It is very important to maintain and update physical topology maps to aid future
installation and trouble shooting efforts.
• •it is some times necessary to have a logical view of the network topology.
• •A logical topology map groups hosts by how they use the network, no matter where
they are physically located. Hostnames, addresses, group information and applications
can be recorded on the logical topology map.
01/25/25 70
Concept of communication (source, destination
and channel)
• All communication methods have three elements in common; the message
source, or sender like are people, or electronic devices ,that need to
communicate a message to other in dividuals or devices. These can element of
communication is the destination ,or receiver .A third element, called a
channel, provides the pathway over which the message can travel from source
to destination.
01/25/25 71
What is the Internet
• The Internet is a network of networks that connects users in every country in the world. There
are currently over one billion Internet users world wide.
• •Up to now the networks we have discussed have been controlled by one individual or
organization. The Internet is a conglomerate or multinational of networks and is owned by one
individual or group.
• •There are, however, several major International organizations that help manage the Internet so
that every one uses the same rules.
01/25/25 72
Internet Service Providers (ISP)
• Any home, business or organization that wants to connect to the Internet must use an
Internet Service Provider (ISP).
• •An ISP is a company that provides the connections and support to access the Internet.
It can also provide additional services such as Email and web hosting.
• •ISPs range in size from small to very large and differ in terms of the area they service
(they may service an entire country)
• •ISPs also differ in the types of connection technologies and speeds they offer.
Examples of well known ISPs include AOL, EarthLink, and Roadrunner.
01/25/25 73
The ISPs relation with the Internet
• Describe how you connect to the Internet through the ISP and the ISP’s
relationship to the Internet.
01/25/25 74
Contd…
• Individual computers and local networks connect to the ISP at a Point of
Presence (POP).
• •A POP is the connection point between the ISP's network and the particular
geographical region that the POP is servicing.
• •An ISP may have many POPs depending on its size and the area it services.
• •Within an ISP, a network of high-speed routers and switches with multiple
links move data between the various POPs.
• •ISPs connect to other ISPs in order to send information beyond the
boundaries of their own network.
• •The Internet is made up of very high-speed data links that interconnect ISP
POPs and ISPs to each other.
• •These interconnections are part of the very large, high capacity network
known as the Internet Backbone.
01/25/25 75
Options for connecting to the ISP
• ISPs provide a variety of ways to connect to the Internet,
depending on location and desired connection speed.
• Choices for connection:
• •Dial-Up
• •DSL
• •Satellite
• •Cable modem
• •Leased line
01/25/25 76
Contd…
• Each Internet access technology uses a network access device, such as a modem, in
order to connect to the ISP.
• •It may be built in to your computer or may be provided by the ISP.
• •The simplest arrangement is a modem that provides a direct connection between a
computer and the ISP.
• •However, if multiple computers connect through a single ISP connection, you will
need additional networking devices.
• •This includes a switch to connect multiple hosts on a local network, and a router to
move packets from your local network to the ISP network.
• •A home networking device, such as an integrated router, can provide these
functions, as well as wireless capability, in a single package.
• •The choice of Internet access technologies depends on availability, cost, access
device used, media used and the speed of the connection.
01/25/25 77
Home Work
1.Write a note and different each of the following networking
devices?
• –Router
• –Switch
• –Hub
• –Bridge
2.What is the difference between hardware(MAC) address and IP
address?
3.Different the physical topology from logical topology of a
network?
4.Compare and contrast wired and wireless media and come up
with clear advantages and disadvantages of each wired and
wireless communication media?
5.When and where is better to use GUIOS and CLIOS? 78
END OF CHAPTER- ONE
01/25/25 79