Title: Hardware
1Hardware I/O
- Ch.4 beginning on page 90
- Ch.13 Topic 1 Topic 2
2Representing Data
Positive Negative
Yes No
True False
On Off
1 0
3RepresentingNumbers
Decimal Binary
(Base 10) (Base 2)
0 0
1 1
2 10
3 11
4 100
5 101
6 110
7 111
8 1000
9 1001
10 1010
11 1011
1000 1111101000
4Representing Characters
- Extended ASCII 256 characters
- EBCDIC 256 characters
- UNICODE 64K characters
HI!
48 49 21
C8 C9 5A
? 16 bits each
ASCII
EBCDIC
UNICODE
5Quantifying Bytes
We deal with bytes all the time in programming.
It seems that we are always counting bytes.
especially in Assembler language. Fortunately, we
usually dont need to deal in large numbers of
bytes in our programs a couple of hundred at a
time, at most. Most of the time, many fewer than
that enough to fill an input or output buffer
and we must accurately count the number of bytes
within each field. Counting bytes seems to never
end.
1 Byte 8 bits
Kilobyte 210 bytes
Megabyte 220 bytes
Gigabyte 230 bytes
Terabyte 240 bytes
Petabyte 250 bytes
Exabyte 260 bytes
6An older Mainframe Computer
IBM Stretch Computer - 7030 Circa 1964-1965
You can see a portion of the operators console
on the very left side of this photo. The panels
that open contain circuitry of the processor and
memory.
7Here is a look inside one of those panels that
opens. How would you like to be the person who
must do repairs on this computer? This is, of
course, in the days before integrated circuitry.
It was all hand-wired and (by todays standard)
very slow, although this was the faster computer
in existence in its day. This is the computer
that the first man-on-the-moon satellite was
programmed.
8Todays Mainframe Z/10
1 64 4.4GHz processors 1.52 Terabytes memory 6
ft. tall with a 30 Sq. Ft. footprint 2.5
tons Computer power of 1500 industry-standard
servers using 85 less power and covering 85
less floor space. Not much to look at, is
it? Announced Feb. 2008
9A mainframe processor consists of
- A Control Unit
- Fetches instructions
- An Arithmetic and Logic Unit
- Performs arithmetic
- Compares
- General Purpose Registers
- Just like a PC
10And How Fast ???
Small z/9 system Large z/9 system Parallel systems up to 32 Pentium4E(2004)
26MIPS 17,801MIPS 221,248MIPS
3.2GHz
Max11,000MIPS
MIPS stands for Millions of Instructions Per
Second and represents the measurement for
mainframe speed (similar to PC GHz). It is a
measurement that is no more accurate that GHz and
has earned the new acronym meaning of Meaningless
Indicator of Processor Speed.
11Memory
- Capacity
- PC --- 4 GB ?
- Mainframe --- 1.52 TB ?
- Simultaneous Users
- PC --- a few
- Mainframe --- hundreds of thousands
12Storage Devices
- Disk
- Tape
- CD
- DVD
- Flash Drive
- paper
2 GB Flash Drive 9 MB Write / 15 MB
Read Retractable USB Connect About 110
13Magnetic Disk (PC)
TrackSector
Track
14Magnetic Disk (PC)
Directory
FAT
Filename0
Filename1
Filename2
Filename3
Filename4
-
-
-
15Disk (Mainframe)
Catalog
Volume
Filename1 Vol label
Filename2 Vol label
Filename3 Vol label
Filename4 Vol label
filename5 Vol label
-
-
-
pp. 22 23
16Catalog
Filename1
Filename2
All files are typically cataloged and are usually
found by using the catalog. Catalog entry points
to the volume and VTOC that contains the file.
Other routines verify that the file is really
there.
VTOC
VTOC Volume Table of Contents
17Volume Table of Contents
Filename-1 DSCB
Filename-n DSCB
So how is the file found? Look in the catalog to
find the volume, then look in the VTOC on the
volume that contains the file. The DSCB is
essentially a list of files (by name) located on
the volume and its beginning cylinder and track
number. Remember, the access arm on the device
must be moved and thats a mechanical
(take-forever) process compared to memory speeds.
18Another Mainframe deviceDS6800 from IBM
Capacity up to 64 TBTransfer Rate up to 1600
MB per sec.16 disk units (max 128 units)
19.0
5.25
19Accessing Data
- OPEN / CLOSE macros
- OPEN prior to first access to data
- CLOSE after last access to data, usually in your
eof routine
label
OPEN
dcb-label
label
CLOSE
dcb-label
20Accessing Data
- Data Control Block (DCB)
- LRECL length of record in bytes
- RECFM F for fixed-length
- MACRF G/P for Get/Put
- DDNAME path and filename
- EODAD input-only (label for EOF rtn.)
dcb-label
DCB
operand1,operand2,..
INDCB DCB LRECL80,RECFMF,MACRFG, EODADEOFR
TN,DDNAMEF\TIMECDS.TXT
21Example (from REALTORS)
No need to test for EOF. Provide EODAD rtn and
the system will automatically take the branch
when EOF occurs.
22Accessing Data
- GET / PUT a Record
- Input or Output 1 logical record
label
GET
dcb-label,area-name
label
PUT
dcb-label,area-name
OPEN INDCB OPEN OUTDCB GET INDCB,INBUFF PU
T OUTDCB,OUTBUFF CLOSE INDCB CLOSE OUTDCB
23Snippet of Code
24End of I/O Slide Show