Title: ICS124
1ICS124 Session 5 Software Introduction to UNIX
1
2Review Quiz
1) Internet protocol is governed by a)
EFT c) MAN b) TCP/IP d) EDI 2) Transmission
permitting data to move only one way at a time is
called a) half duplex c) simplex b) full
duplex d) start/stop 3) One or more computers
connected to a hub computer is called a) ring
network c) node b) CSMA d) star
network 4) Signals produced by a computer to be
sent over phone lines must be converted to a)
modems c) analog signals b) digital
signals d) microwaves 5) Two dissimilar
networks can be connected by a a) gateway c)
node b) bus d) server
2
3Review Quiz
1) Internet protocol is governed by a)
EFT c) MAN b) TCP/IP d) EDI 2) Transmission
permitting data to move only one way at a time is
called a) half duplex c) simplex b) full
duplex d) start/stop 3) One or more computers
connected to a hub computer is called a) ring
network c) node b) CSMA d) star
network 4) Signals produced by a computer to be
sent over phone lines must be converted to a)
modems c) analog signals b) digital
signals d) microwaves 5) Two dissimilar
networks can be connected by a a) gateway c)
node b) bus d) server
3
4- Objectives
- By the end of the session the student will be
able to - List the 5 types of application software
- Give examples of each type of application
software - Classify the application software as
Task-oriented, Office Suite or Business - List the two classifications of Systems Software
- Give examples of operating system utilities
- Describe the interaction of the hardware,
operating system, application software and user
within a computer system - List the four attributes that describe the
capabilities of an operating system - Define each of the attributes that describe the
capabilities of an operating system - List two methods to manage memory in a computer
system - Describe how each method works, and provide
advantages and disadvantages of each method - List the components of a UNIX command
- Construct a UNIX command
- Describe the structure of the UNIX file system
- Determine the name of a directory, or describe
the position of a directory within the UNIX file
system - List the rules for naming directories and files
- List the three classes of file permissions and
the membership for each class - List the three permissions for each class, and
how it behaves differently for files and
directories
4
5Software
5
6(No Transcript)
7(No Transcript)
8Software, continued
- Software
- Software is what makes the sophisticated hardware
so powerful. The hardware may as well be a
paper-weight without software. - Software is a set of instructions in the language
of the processor. This language is not readable
by humans (typically). - The instructions will consist of
- op-codes (operation codes) and,
- operands (sometimes)
- Op-codes
- The op-codes are fetched and decoded by the
Control Unit, and executed by the ALU. - Operands
- The operands are either scalar data (a fixed
number, such as 5) or a memory address where data
is stored. These are also fetched by the Control
Unit for use by the ALU.
8
9Software, continued
Machine language for Motorola 6809 (8-bit
CPU) 4F 97 13 96 12 27 09 4A 97 12 96 13 9B 11
20 F1 3E 02 05 op-code operand data The above
program multiplies two numbers by repeated
addition. i.e. 5 x 2 2 2 2 2 2
9
10Software, continued
- Application Software
- By providing different sets of instructions to
the computer, the hardware can be instructed to
perform very different tasks such as word
processing to weather prediction. - Application example
- Assuming the application is a spreadsheet. A
user enters data at the keyboard. The
spreadsheet software stores these values as
numbers or text or formulas in memory. The
formulas require calculations be performed based
on data elsewhere in memory (on the spreadsheet).
While all this is taking place, a constant
update of what is happening is sent to the user
through the monitor. - Task oriented software
- Software that performs a specific function that
can be customized by the user, is referred to as
Task Oriented Software. Examples of task
oriented software are - Word processing
- Spreadsheets
- Database management
- Graphics
- Communications
10
11Software, continued
Word processing Word processing software is used
for writing memos, letters, reports,
etc. Documents can be created, saved and edited.
This type of software replaced the need for
typing pools at companies. Spreadsheets Spreads
heets are a means to manipulate rows and columns
of numbers and formulas. Historical data can be
tracked in a spreadsheet, such as household
expenses paid. Planning and forecasting analysis
can also be performed through a spreadsheet
(what if? analysis). Possible future outcomes
can be calculated by manipulating values in the
spreadsheet. Recalculating a paper-based
spreadsheet can be a tedious, time-consuming
task. The electronic spreadsheet speeds up the
process.
11
12Software, continued
Database management Database management software
is a means to track and report on inter-related
data. A database consists of characters or
numbers that are stored in fields.
Inter-related fields are grouped into records.
Inter-related records are stored in tables.
Tables are stored in database files on secondary
storage. Databases can be searched for specific
data or data can be summarized to derive useful
information. For example, here are two tables of
information employees departments empno
name deptno salary deptno name 0001 John
Smith 10 40000 10 Marketing 0002 Jane
Doe 10 45000 20 Sales 0003 Frank
Tank 20 30000 30 Manufacturing 0004 Tweedle
Dee 20 29500 40 Executive 0005 Tweedle
Dum 20 35000 0006 Jill Jelly 30 38000
12
13Software, continued
Database management, continued employees
departments empno name deptno salary deptno n
ame 0001 John Smith 10 40000 10 Marketing 00
02 Jane Doe 10 45000 20 Sales 0003 Frank
Tank 20 30000 30 Manufacturing 0004 Tweedle
Dee 20 29500 40 Executive 0005 Tweedle
Dum 20 35000 0006 Jill Jelly 30 38000 Using
SQL, information can be drawn from these tables.
For example, what is the average salary of each
department? select departments.name,
avg(employees.salary) from employees,
departments where employee.deptno
departments.deptno group by departments.name
13
14Software, continued
Graphics This class of software is used to depict
information pictorially, such as through maps,
charts and graphs. Presentation software is a
type of Graphics software used to prepare
presentations that are either transferred to
acetate (overhead transparencies) or are
projected directly onto a screen from a
computer. Communications Communications software
is used to interconnect two or more computers. A
package such as HyperTerminal allows a computer
to connect to another either directly through a
serial connection or through a phone line by use
of a modem. The nature of the connection will
depend on the software running on the remote
computer. A browser, as discussed last week, is
used to navigate through the Internet, and
display the information that is stored on the
servers.
14
15Software, continued
- Office suite
- Office suite software combines many of the task
oriented software into a group of packages that
are able to share data between themselves. For
example, a spreadsheet could be embedded into a
document that is being prepared on a word
processor. - The user interface is typically consistent
between each of the packages within the suite
(the buttons / icons / short-cuts etc.). - Business software
- In addition to task oriented software, businesses
use other types of software that are classified
as - Vertical market software
- Group ware (collaborative software)
15
16Software, continued
Vertical market software Vertical market software
is targeted to a specific industry, or a specific
segment within an industry. For example, a
software package that has been written
specifically for Dentist Offices would be
considered vertical market software. This
software has features that cannot be found in
off-the-shelf task oriented software. For
example, the Dentist application may have
appointment scheduling. A Doctor Office
application may also have appointment scheduling,
however there may be differences in that the
Dentist application may have a customized
database that tracks cleaning, tooth pulling,
fillings, root canals, etc. that the Doctor
Office application does not require.
16
17Software, continued
Group ware Group ware is a type of software that
allows groups of people to collaborate on a
project without having to meet face-to-face. An
e-mail package is a form of group ware More
specifically, group ware stores information
(documents, databases, etc.) in a central
location. This ensures that all members of a
project have access to the most current version
of the information. Lotus Notes provides this
functionality.
17
18Software, continued
- System Software
- System software can be classified in two ways
- Utilities
- Operating system
- System software defines the computing environment
of the computer. Some forms of system software
can only run on specific types of hardware,
whereas other forms of system software can run on
many types of hardware. - For example, the various system software packages
distributed by Microsoft will run only on
Intel-based PCs (Windows9x, Windows-NT,
Windows2000 Professional, Windows XP). The
system software distributed by Apple will run
only on Motorola-based computers (MAC OS). - Linux (to be discussed later) is available for
many types of hardware, from PCs to IBM
Mainframes (such as the 390).
18
19Software, continued
- Utilities
- Utilities are used to manage the computer
environment. - Some examples of utilities are
- File manager - used to organize files into a
hierarchy of directories - Backup - used to copy files to a mass storage
device such as tape of CD-ROM. - Restore - used to restore files that have been
backed up - File compression -used to reduce the size of file
by eliminating the redundancy that naturally
exists within the file. - Defragmenter - used to reorganize disks so that
files use contiguous sectors on disk. A file is
fragmented if there is not enough contiguous
space to store it (it will be scattered over the
disk). - Device drivers - a utility program that is
specific to a manufacturers device (such as a
printer). The computer will send the same set of
commands to printer device drivers, it is up to
the device driver to translate the commands for
the specific device it was written for.
19
20Software, continued
Operating System The operating system is what
controls and oversees the operation of the
computer system. The operating system is also
software, but it is software that is always
running on the computer system. If you want to
run a spreadsheet application, it is the
operating system that you make the request
to. The operating system talks to the hardware
to load the application from disk into memory,
and begins running the application. The
operating system also controls access to the
hardware. Applications typically do not
communicate directly with the disk or the
monitor, applications perform these tasks through
the operating system.
20
21Software, continued
Operating system, continued This is what the
computer system looks like when you take into
account what each component talks to
21
22Software, continued
- Definitions
- There are several terms that are applied when
talking about operating systems. These terms are
used to describe the nature and capabilities of
the operating system - multi-user
- time-sharing
- multiprogramming
- multiprocessor
- Multi-user
- A multi-user operating system allows for more
than one user to interact with the computer
system at a time. - The operating systems that typically run on a PC
are not multi-user, whereas the operating system
on a mainframe is multi-user
22
23Software, continued
Time-sharing Time-sharing is typically associated
with multi-user operating systems. Time-sharing
is a means to ensure that all users have equal
(or near equal) access to the computer system's
resources. A timer is set to interrupt the CPU
periodically so that the computer system can
service the next user. Multiprogramming A
multiprogramming operating system appears to be
running many tasks concurrently. Various
operations within the computer system waste the
CPU's time as they are very slow by comparison.
For example, waiting for data to be retrieved
from disk is painfully slow for a CPU. If the
CPU could be doing something else while waiting
for the data, its efficiency could be
increased. Multiprogramming is the solution to
this problem. While waiting for something to
happen in the computer system, the CPU works on
another task.
23
24Software, continued
Multiprogramming continued In multiprogramming
interrupts are generated to ensure that resources
in the computer system are shared. If a program
needs to read or write data on a disk drive, it
will ask the operating system to perform this
operation which interrupts the execution of the
program. While the data is being read or
written, the CPU can be servicing other programs
while waiting for the task to complete. When the
operation is complete, another interrupt is
generated that restores the execution of the
first program (unless there are higher priority
programs still waiting to run). Multiprocessor In
more sophisticated computer systems hardware,
there is an allowance for more than one CPU.
Programs can run simultaneously, each with its
own processor. In order to fully exploit the
capabilities of a computer system with multiple
processors, the operating system needs to be more
sophisticated.
24
25Software, continued
- Memory management
- Modern operating systems are very complex, so
much so that there is not enough memory in the
typical computer system to load it all and still
have memory left over for running applications
(especially if there are multiple applications
that need to be run concurrently). - Modern operating systems consist of
- Resident programs
- Non-resident programs
- Resident programs
- There is one component of the operating system
that never leaves memory while the computer
system is powered on, it is the Kernel. - Non-resident programs
- A set of programs that can be loaded as needed
- Utilities (as discussed before)
- Non-resident O/S modules
25
26Software, continued
- Memory management, continued
- The operating system must manage memory so that
multiple programs can be loaded simultaneously. - Two methods will be introduced
- Partitions
- Pages
- Memory partitions
- The memory is divided up into fixed sized
partitions, or regions. The size of the regions
is chosen to be large enough to hold the largest
anticipated program. For example, if the largest
program expected to be run on a computer is
200MB, then the regions will be 200MB each. - A more intelligent approach allows the regions to
be of different sizes so that large programs are
placed in large regions and small programs are
placed in small regions.
26
27Software, continued
Memory partitions, continued There is a problem
of wasted memory. For example if the two
smallest regions on a computer system are 5MB and
10MB, and the program that needs to run is
5.01MB. The 10MB region will be used, which
results in 4.99MB being wasted. Memory
pages This is similar to the method of regions,
however the regions are intentionally small in
size (2KB or 4KB). Furthermore, a page is not
expected to hold the entire program, only a
portion of it. The program is broken up into
equal size pages that fit into equal size page
frames in primary storage (memory). The program
is not guaranteed to be placed into contiguous
page frames. The O/S tracks which page frame
belongs to which program.
27
28(No Transcript)
29Software, continued
Memory pages, continued The management of the
pages consumes computer system resources. If the
computer spends too much time managing the pages
(reading them in and writing them out) the
performance of the computer can suffer. This is
referred to as thrashing. In the case of
Partitions or Regions, thrashing does not occur
as the total memory space has been defined for
the program.
29
30Introduction to UNIX
30
31Introduction to UNIX
- UNIX
- UNIX is an operating system that is multi-user,
time-sharing operating system. If you have the
right version, it can be run in multiprocessor
environments. - We will begin by looking at two aspects of UNIX
- Command line interface
- File structure
- Command line interface
- Unlike Graphical User Interface (GUI) operating
systems such as MAC/OS or Windows, the typical
UNIX system has a command line interface. - Any operation that you wish to have the UNIX
operating system perform, requires a command to
be typed into the keyboard. The command may be
followed by various options and / or required
parameters - command options parameters
- All commands entered are case-sensitive ('ls' is
not the same as 'Ls')
31
32Introduction to UNIX, continued
Command line interface, continued For example,
here is a UNIX command that contains no required
parameters or options ls This is the same
command, with one of the options selected. In
UNIX these options are also referred to as
switches. A switch is always preceded by a minus
sign. Switches modify the behaviour of the
command ls -l Finally, here is a command
followed by two switches as well as a required
parameter. Multiple switches can be specified,
with a minus sign in front of each switch, or one
minus sign followed by all the switches
together rm -R -f /usr/myData or rm -Rf
/usr/myData
32
33Introduction to UNIX, continued
- UNIX file structure
- The UNIX operating system's file system is
hierarchical in nature. Other hierarchies that
you may have seen or experienced - Family tree
- Company organizational chart
- Windows file structure
- The hierarchy in the UNIX file system consists of
one of two elements - A directory
- A file
33
34Introduction to UNIX, continued
Directory A directory in UNIX is something like a
filing cabinet. The cabinet contains drawers,
the drawers contain folders. It is where you
store something. In UNIX the drawers and folders
are each a directory. These directories may
contain other directories. The top-most
directory is called 'root', and has the symbol
'/'. An example file structure for UNIX may look
like
34
35Introduction to UNIX, continued
/
opt
etc
tmp
. . .
var
cde
include
types
sys
Directory To specify a name of a directory, you
must list all directories between the root and
the directory you are trying to name, each
separated by a '/' character. For example, to
name the 'sys' directory /opt/include/sys
35
36Introduction to UNIX, continued
- File
- Within the directories defined above, are files.
The files contain data or software. The file is
what you store in a directory. - Files may be found at any level of the
directories. - UNIX file and directory names
- There are rules for the names you assign to files
and directories. - May not contain a space character (contemporary
versions allow spaces- use with caution) - May not contain a '/' character
- Must not exceed 255 characters
- The names are case-sensitive
- If the name begins with a period '.', it will not
show in normal directory listings. It is hidden.
36
37Introduction to UNIX, continued
- UNIX file permissions
- As mentioned earlier, UNIX is a multi-user
operating system. When there are multiple users
using a system, a means to protect files is
needed. - File permissions consist of three general
classes - Owner
- Group
- Public
- Within these three classes are three possible
permissions - Read
- Write
- Execute
37
38Introduction to UNIX, continued
Owner The Owner of a file is the person that
created the file. Although it is possible to
transfer ownership of a file from one person to
another. Group Users on a UNIX system are
assigned to groups. On the UNIX system at
Seneca, all students in this class belong to a
group called 'ce124a'. Other groups on a UNIX
system may include 'sys', 'adm', 'bin'. Groups
can also be assigned to other groups. Public This
is really a special group that everybody on the
system belongs to.
38
39Introduction to UNIX, continued
Read permission This permission means that the
file or directory can be read from. Write
permission This permission means that the file or
directory can be written to Execute
permission This permission means that the file
can be executed as a program. When assigned to a
directory is allows access to that
directory. Structure of permissions The
permissions structure is constructed in this
format
39