0% found this document useful (0 votes)
429 views23 pages

UNIX Unbounded 5 Edition: Amir Afzal

Uploaded by

Osei Banning
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
429 views23 pages

UNIX Unbounded 5 Edition: Amir Afzal

Uploaded by

Osei Banning
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

UNIX Unbounded 5th Edition

Amir Afzal

Chapter 1
First Things First

Copyright ©2008 by Pearson Education, Inc.


Upper Saddle River, New Jersey 07458
All rights reserved.

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 1 of 23
Chapter 1
First Things First

This chapter briefly describes the fundamentals of computer hardware and


software and explains basic computer terms and concepts. It discusses the
types of software, explains the importance of the operating system, and
explores its primary functions.

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 2 of 23
1.1 Computers: An Overview

Computers can be grouped according to their sizes, capabilities, and speed


into four classifications, as follows:
• Supercomputers

• Mainframe computers

• Minicomputers

• Microcomputers

These are rather arbitrary classifications: the low-end systems of one


category can overlap the high-end systems of the other.

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 3 of 23
Table 1.1: Computer Classifications

Class Typical Specifications Approximate Speed

Microcomputer 64+ million main memory cells 10+ million instructions per
4 billion disk storage cells single second
user

Minicomputer 128+ million main memory cells 30+ million instructions


10 billion disk storage cells per second
1 tape drive
128 interactive users

Mainframe 1+ billion main memory cells 50+ million instructions


100 billion disk storage cells per second
Multiple tape drives
100s interactive users
4+ central processing units or
more

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 4 of 23
1.3 Computer Hardware

Figure 1-1: Four Functional Parts of a Computer System

Certain devices can be used for either input or output for


example, magnetic disks and touch screen terminals.

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 5 of 23
Processor Unit
The Central Processing Unit (CPU) consists of three basic sections:

• Arithmetic and Logic Unit (ALU)

• Registers

• Control Unit (CU)

The CPU is also called the brain, heart, or thinking part of the
computer.
Computers usually have two types of main memory:

• Random access memory (RAM)

• Read only memory (ROM)

Main memory is short term and retains data only for the period that
a program is running.

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 6 of 23
Data Representation
Bit (Binary Digit)
Each bit can hold either a 0 or a 1. A bit is the smallest unit of information a
computer can understand

Byte
A group of eight bits is called a byte (pronounced bite)

ASCII
When you input data to a computer, the system must change it from what you
recognize (letters, numbers, and symbols) into some format that the computer
understands

Word
Most computers are able to manipulate a group of bytes called a word.
The word size is system dependent and could vary from 16 bits (2 bytes) to 32
bits (4 bytes) or even 64 bits (8 bytes)

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 7 of 23
The Memory Hierarchy
Memory Size
The letter K is used to express the size of the main memory, or disk space.
K stands for kilobytes, which represent 1,024 bytes of storage
(2 to the power of 10)
For example:
32K of memory means 32,768 bytes (32 times 1,024)

Other measurements referring to the size of the computer memory:


• Megabyte (MB) is approximately one million bytes
• Gigabyte (GB) is approximately one billion bytes

Memory Size
The letter K is used to express the size of the main memory, or disk space.
K stands for kilobytes, which represent 1,024 bytes of storage
(2 to the power of 10)
For example:
32K of memory means 32,768 bytes (32 times 1,024)

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 8 of 23
Other measurements referring to the size of the computer memory:

• Megabyte (MB) is approximately one million bytes

• Gigabyte (GB) is approximately one billion bytes

Figure 1-2: The Memory Hierarchy

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 9 of 23
External Storage

• Secondary storage is an extension of main memory, not a replacement for it.

• A computer cannot execute a program or manipulate data stored on disk


unless the data are first copied into main memory.

• Main memory holds the current programs and data, whereas secondary
storage is for long-term storage.

Table 1.2: Summary of the Different Storage Types

Storage Type Location Usage


Registers Within the Very high-speed devices Currently executing instructions;
CPU instructions; part of the related data

Primary Storage Outside of the CPU Entire programs or part of the part of
High-speed devices (RAM) the associated data

Secondary Storage Low-speed devices Programs not currently being


Electromagnetic or optical executed; large amount of data

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 10 of 23
1.4 PROCESS OPERATION
Each instruction is known to the ALU by a unique number called the
instruction code or the operation code (“op code”)
The steps required to process each instruction can be grouped into two phases:
the instruction cycle and the execution cycle.

Instruction Cycle
The sequence of events during the instruction cycle, also referred to as the fetch
cycle, is as follows:

Step 1:
The control unit reads an instruction from main memory into a CPU register
called the instruction register.

Step 2:
The control unit increments the instruction pointer register to show the
location of the next instruction in the main memory.

Step 3:
The control unit generates a signal to the ALU to execute the instruction.

The instruction cycle is performed within the control unit; the execution
cycle is performed within the arithmetic and logic unit.
Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 11 of 23
Figure 1-3: Sequence of the Processor Operation

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 12 of 23
1.4 PROCESS OPERATION
Execution Cycle
The sequence of events during the execution cycle is as follows:
Step 1:
The ALU accesses the operation code of the instruction in the instruction
register to determine which function to perform and to obtain the input
data for the instruction.

Step 2:
The ALU executes the instruction.

Step 3:
The results of the instruction are stored in registers or are returned to the
control unit to be written to memory.

CPU Speed
MIPS: Millions of instructions per second
MFLOPS: Millions of floating-point operations per second

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 13 of 23
1.5 WHAT IS SOFTWARE?
In general, computer programs are called software.
Program
A program is a set of instructions that directs the activities of a computer system. It
consists of instructions that are logically sequenced to perform a specific operation.
Software Categories:
- system software - application software
Figure 1-4: Types of Software

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 14 of 23
Figure 1-5: User Interaction with Software Layers

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 15 of 23
Who Is the Boss?

The operating system is the boss and is the most important system software
component of a computer:

• It is a collection of programs that controls all hardware and software in a


computer

• The necessary parts of the operating system are loaded into the main memory
when you turn the computer on and remain there until you turn it off

• The operating system plays different roles as service provider, hardware


manager, and facilitator of the user interface

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 16 of 23
The primary purposes and functions of an operating system:

• To provide an interface for users and application programs to low-level


hardware functions

• To allocate hardware resources to users and their application programs

• To load and accept the application programs on behalf of the users

The necessary parts of the operating system are always resident in the main
memory.

The operating system continually responds to the program’s resource


requirements, resolves resource conflicts, and optimizes the allocation of
resources

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 17 of 23
Operating System Model
Viewing the operating system as a layered set of software:

Kernel Layer
The kernel is the innermost layer of the operating system software

Service Layer
The service layer accepts service requests from the command layer, or the application
programs, and translates them into detailed instructions to the kernel. The service layer
provides the following types of services:
Access to I/O devices
for example, the movement of data from an application to a printer or terminal

Access to storage devices


for example, the movement of data from a tape drive or a magnetic disk to an
application program

File manipulation
for example, opening and closing files, reading from a file, and writing to a file

Other services
such as window management, access to communication networks, and basic
database services
Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 18 of 23
File manipulation
for example, opening and closing files, reading from a file, and writing to a file
Other services
such as window management, access to communication networks, and basic
database services

Command Layer
The command layer, also called the shell (because it is the outermost layer),
provides the user interface and is the only part of the operating system with which
users can interact directly

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 19 of 23
Figure 1-6: Operating System Layers

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 20 of 23
Operating Systems Environment

Some basic concepts and terminology describing the different operating systems and
their environments:

Single-Tasking
A single-tasking (single-programming) operating system is designed to execute only
one process at a time.

Multitasking
A multitasking (multiprogramming) operating system is capable of executing more
than one program at a time for a user.

Multiuser
In a multiuser environment, more than one user (terminal) can use the same host
computer. The multiuser operating system is complex software that provides services
for all users concurrently.

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 21 of 23
Figure 1-7: A Multiuser Computer System

Chapter 1: First Things First

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 22 of 23
Figure 1-8: The Multiuser in a Network Environment

Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 23 of 23

You might also like