Команда ввода

advertisement
Организация подсистемы
ввода-вывода
CSS (Channel Subsystem)
Лекция № 9
1
Channel Paths, Control Units, and Devices
2
Device Numbers
• Devices (such as disks, printers, screens)
are assigned device numbers from 0 to
0xFFFF by the system administrator.
• These numbers are used in communication
between a system operator and the
operating system.
• These numbers do not need to be
contiguous in a configuration.
3
4
Subchannels
The IOCP (I/O configuration program) reads the
I/O configuration input deck. It defines the relationship
between:
– Channel paths
– Control units and
– Devices
•
IOCP assign a subchannel number to each device.
•
The numbers range from 0 to 0xFFFF and are
contiguous.
5
Dynamic I/O Configuration
The I/O configuration may be changed
under software control by adding or deleting
– Channel paths
– Control units
– Devices
The software front-end is known as HCD
(Hardware Configuration Definition)
6
7
Изменения в подканалах
(Modification of Subchannels)
Часть блока SCHIB может быть изменена с помощью
команды
MODIFY SUBCHANNEL (MSCH),
а именно:
– подкласс прерывания I/O (ISC);
– бит применения (E).
•
MSCH обычно хранит блок SCHIB который
использован (retrieved) перед командой
START SUBCHANNEL (STSCH)
8
Starting an I/O operation
9
Starting an I/O operation
10
Operation-Request Block (ORB)
• The interruption parameter is saved by the channel
subsystem and returned unchanged at the time of the I/O
interrupt. It is normally used by the operating system to
store the address of its own device control block.
•
The logical path mask (LPM) can be used by the
operating system to route an I/O operation to specific
channel paths. Normally, the operating system sets this
field to 0xFF to allow the channel subsystem to use any
configured path.
•
The channel program address points to the first channel
command word (CCW).
11
12
Типы кодов команд управляющего
слова канала CCW
Коды операции CCW
CCW command code types:
– Write (normal data output)
– Read (normal data input)
– Read backward (good for tapes)
– Control (e.g. to position disk head)
– Sense (retrieve reason for unit check)
– Sense ID (retrieve device type, e.g.
3390)
– Transfer in channel (branch in
channel program)
•
The particular command code is
device-specific
Код
операции
Выполняемые
действия
~~~~0000
не используется
mmmmmm01
записать
mmmmmm10
прочитать
mmmm1100
прочитать в обратном
направлении
mmmmmm11
управление
mmmm0100
прочитать состояние
11100100
прочитать уточненное
состояние
~~~~1000
переход в канале (формат
0)
00001000
переход в канале (формат
1)
mmmm1000
не используется
m - биты модификации кодов в зависимости
от типов
устройств
13
CCW Flags
• CD: chain data (use the same CCW command on
the next CCW)
• CC: chain command (0 = this is the last CCW)
• SLI: suppress incorrect length indication
• SKP: do not read data on input
• PCI: program-controlled interruption (generate
intermediate I/O interrupt when this CCW is
fetched)
• IDA: indirect data addressing
• S: suspend channel program without generating
I/O interrupt
14
Indirect-Data-Address Words (IDAWs)
• IDAWs are used to describe I/O buffers that are
contiguous in virtual storage – and thus usually scattered in
absolute storage.
– With z/Architecture, they provide the only means to address
data buffers above 2G.
•
IDAWs are used when the IDA flag is set in the CCW.
The address in the CCW points to the list of IDAWs.
– Format-1 IDAWs are 32 bits long and cover up to 2K of storage
– Format-2 IDAWs are 64 bits long and cover up to 4K of storage
•
When ORB word 1.14 (H) is 1, format-2 IDAWs are used.
When ORB word 1.15 (T) is also 1, the IDAWs cover a 2K
area, otherwise, they cover 4K.
15
Indirect-Data-Address Words (IDAWs)
16
Conclusion of I/O Operations
•
When the last CCW has been processed, the channel
signals ending status to the channel subsystem
•
The subchannel is now made status-pending and an
interruption condition is generated for its I/O-interruption
subclass (ISC)
•
An I/O interrupt is said to be floating, i.e. it is “offered” to
all CPUs that are enabled for this ISC
•
If more than one CPU is enabled for this I/O interrupt,
only one will actually take it
•
As an alternative, the CPU may poll for an interrupt using
the TEST PENDING INTERRUPTION (TPI) instruction 17
Conclusion of I/O Operations
18
Conclusion of I/O Operations
19
Conclusion of I/O Operations
20
Conclusion of I/O Operations
21
Способы выполнения канальных программ
В зависимости от типа каналов в
z/Architecture возможны три способа
выполнения канальных программ:
– байт-мультиплексный (byte-multiplex mode);
– блок-мультиплексный (burst mode);
– фрейм-мультиплексный (frame-multiplex
mode).
22
Структура фрейма
23
z990 Extensions to I/O Architecture
• Multiple channel subsystems (MCSS)
• 1 to 4 logical channel subsystems (LCSS)
– Up to 256 channel paths per logical partition (LPAR)
– Up to 63K devices (subchannels) per LPAR
– An LCSS may be shared by multiple LPARs
• Allows much larger configurations (e.g. To
consolidate two z900 systems on a single
z990)
24
z990 – I/O Configuration Support
25
z990 – I/O Configuration Support
26
z9 Extensions to I/O Architecture
• Multiple subchannel sets (MSS)
• The problem: z990 had only one subchannel set
– 64,512 subchannels (1,024 reserved for internal use)
• This became a problem for large installations because
of PAV (parallel access volumes):
– With PAV, a single disk drive often consumes four
subchannels (base address plus three aliases)
• The solution z9 supports two subchannel sets
– 65,280 subchannels in set 0 (256 reserved for internal use)
– 65,535 subchannels in set 1
• z/OS 1.7 exploits second subchannel set to access alias
addresses of parallel access volumes (PAV)
27
z9 – I/O Configuration Growth - Multiple
Subchannel Sets (MSS)
28
z9 – Multiple Subchannel Sets per LCSS
29
Modified Indirect-Data-Address Words (MIDAWs)
• MIDAWs were invented to increase I/O throughput by reducing the
number of CCWs required.
• Like IDAWs, MIDAWs specify a list of data areas in absolute storage.
• Unlike IDAWs, MIDAWs are used to describe I/O buffers that are
scattered in virtual storage:
– MIDAWs never have to specify aligned addresses (the areas must
not cross 4K-boundaries, though).
– Each MIDAW has its own count field.
• MIDAWs were introduced with the IBM System z9.
• Use of MIDAWs must be enabled in the ORB (D-bit, word 1, bit 25).
• The MIDA flag must be set in the flags of the CCW (bit 15 in format1 CCW). When it is used, neither IDA nor SKIP flags must be set.
• The CCW points to a list of MIDAWs (MIDAL).
• The MIDAL begins on a quadword boundary. It must not cross a 4K
boundary.
30
MIDAW layout
31
Initial Program Loading
(IPL)
• Boots the operating system from an I/O device
• Initiated manually at the support element (SE) or
hardware management console (HMC)
• System operator specifies device number
• Operator may specify an IPL parameter that is
retrieved later by the operating system with a
SERVICE CALL instruction (SERVC, also
known as SCLP)
32
Initial Program Loading (IPL)
33
IPL Process
34
Функциональный состав CSS
• Настройка и
управление ПУ
• Операции вводавывода
• виртуальные
соединения между
логическими
разделами сервера
• Channel Subsystem –
CSS
• канальные
программы Channel
Programs
• Внутренние каналы
= подканалы
Subchannels
35
Варианты исполнения CSS
36
Варианты исполнения CSS
37
Общая организация канальной подсистемы
CSS
38
Параметры
канальных
подсистем
Параметры канальных подсистем
S390
(G5/G6)
z800, z900
1 на сервер
z990
CSS
1 на сервер
2 на сервер
Логические
разделы
15 на сервер 15 на сервер
15 на LCSS 30
на сервер
Подканалы
288 К на
сервер
512 К на
сервер
945 К на LCSS
1890 К на
сервер
Канальные
пути
256 на CSS
256 на
сервер
256 на
сервер 256
на LCSS
256 на CSS 512
на сервер
Периферий
ные
устройства
36 К на
сервер
63 К на
сервер
63 К на LCSS
126 К на сервер
39
Адресация в подсистеме
ввода-вывода
40
Идентификация объектов канальной системы
41
Формат команды ввода-вывода
Адресация устройств в командах вводавывода
0
Команда
вводавывода
COP
0
GR 1
15
19
B2
31
31
D2
47
0000000000000001
63
SCBNUM
42
Идентификация объектов канальной системы
Идентификатор подсистемы
0
˜
31
39
43
47
63
CSSID
IID
0001
SCBNUM
43
Принципы выполнения операций ввода-
вывода в канальных подсистемах
• Распараллеливание
работы большого
числа периферийных
устройств
• Каждой операции
ввода-вывода
• Параллельно
функционирующие
каналы в CSS
• своя канальная
программа,
определяющая
параметры обмена
• каналы реализуются как процессоры со
специализированной системой команд
44
Принципы
выполнения
операций
ввода-вывода в
базовой
архитектуре
45
Принципы
выполнения
операций
ввода-вывода в
базовой
архитектуре
46
Выполнение
операций
ввода-вывода в
архитектуре
zSeries
47
Основные отличия канальной подсистемы
z/Architecture от базовой архитектуры
48
Download