UNIX Unbounded 5 Edition: Amir Afzal
UNIX Unbounded 5 Edition: Amir Afzal
Amir Afzal
Chapter 1
First Things First
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
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
• Mainframe computers
• Minicomputers
• Microcomputers
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
Microcomputer 64+ million main memory cells 10+ million instructions per
4 billion disk storage cells single second
user
Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 4 of 23
1.3 Computer Hardware
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:
• Registers
The CPU is also called the brain, heart, or thinking part of the
computer.
Computers usually have two types of main memory:
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)
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:
Amir Afzal
UNIX Unbounded, 5th Edition
Copyright ©2008 by Pearson Education, Inc Chapter 1: First Things First 9 of 23
External Storage
• Main memory holds the current programs and data, whereas secondary
storage is for long-term storage.
Primary Storage Outside of the CPU Entire programs or part of the part of
High-speed devices (RAM) the associated 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:
• 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
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:
The necessary parts of the operating system are always resident in the main
memory.
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
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
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