SU1327113A2 - Apparatus for controlling virtual memory - Google Patents
Apparatus for controlling virtual memory Download PDFInfo
- Publication number
- SU1327113A2 SU1327113A2 SU864029267A SU4029267A SU1327113A2 SU 1327113 A2 SU1327113 A2 SU 1327113A2 SU 864029267 A SU864029267 A SU 864029267A SU 4029267 A SU4029267 A SU 4029267A SU 1327113 A2 SU1327113 A2 SU 1327113A2
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- block
- page
- input
- group
- memory
- Prior art date
Links
- 230000015654 memory Effects 0.000 title claims abstract description 133
- 238000012937 correction Methods 0.000 claims description 17
- 238000010586 diagram Methods 0.000 description 15
- 230000009471 action Effects 0.000 description 12
- 238000004364 calculation method Methods 0.000 description 9
- 238000000034 method Methods 0.000 description 7
- 238000013519 translation Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000009434 installation Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 241001417495 Serranidae Species 0.000 description 1
- 241001415849 Strigiformes Species 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 238000007664 blowing Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005094 computer simulation Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- RDQWQMVBBQKHGH-UHFFFAOYSA-N n-[2-methyl-4-[(2-methylphenyl)diazenyl]phenyl]furan-2-carboxamide Chemical compound CC1=CC=CC=C1N=NC(C=C1C)=CC=C1NC(=O)C1=CC=CO1 RDQWQMVBBQKHGH-UHFFFAOYSA-N 0.000 description 1
- 239000004071 soot Substances 0.000 description 1
- 230000007480 spreading Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 235000005282 vitamin D3 Nutrition 0.000 description 1
- 239000011647 vitamin D3 Substances 0.000 description 1
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Изобретение относитс к вычислительной технике, может быть использовано в вычислительных машинах с виртуальной пам тью ,и позвол ет осуществить оптимальное распределение страниц оперативной пам ти между активными задачами. С этой целью в состав устройства дл управлени вирту-. апьной пам тью по авт. ев. К 955076 введен блок управлени страничным обменом, который по результатам анализа числа страничных сбоев и числа успешных обращений к оперативной пам ти позвол ет с помощью аппаратных средств перераспределить страницы оперативной пам ти между активными задачами. 21 ил.The invention relates to computing, can be used in computers with virtual memory, and allows for an optimal distribution of pages of RAM between active tasks. For this purpose, the virtual control device is included. by memory ev By 955076, a paging exchange control unit was introduced, which, based on the results of the analysis of the number of page failures and the number of successful accesses to the RAM, allows the hardware to redistribute the pages of the RAM between active tasks. 21 il.
Description
1132 1132
Изобретение относитс к вычислительной технике и может быть использовано в вычислительных машинах с виртуальной пам тью.The invention relates to computing and can be used in virtual memory computers.
Цель изобретени - расширение функциональных возможностей путем обеспечени динамического оптимального перераспределени страниц ОП между активными задачами.The purpose of the invention is to expand the functionality by providing a dynamic optimal redistribution of EP pages between active tasks.
На фиг, I приведена функциональна схема устройства дл управлени виртуальной пам тью; на фиг. 2 - схе- .ма блока входных регистров; на фит, 3 схема блока выходных регистров фиг, 4 - схема формирователей; на фиг. 5 - схема блоков сравнени ; на фиг. 6 - схема компаратора; на фиг, 7 схема блока местного управлени ; на фиг. 8 - схема блоков пам ти страниц; на фиг, 9 - схема элемента пам ти; на фиг, 10 --схема генератора расстановки; на фиг, 1 1 - схема блока управлени замещением; на фиг, 12 - схема узла приоритета; на фиг. 13 - схема блока коррекции; на фиг, 14 - схема блока управлени страничным обменом; на фиг, 15 - схема блока определени числа страничных сбоев; на фиг. 16 - .схема блоков расстановки; на фиг. 17 - схема первого блока сравнени ; на фиг, 18 - схема второго блока сравнени , на фиг. 19 - схема формировател адреса обмена страниц; на фиг. 20 - временна диаграмма тактовых импульFig. I shows a functional diagram of a device for managing virtual memory; in fig. 2 - block scheme of input registers; on fit, 3 block diagram of the output registers of FIG. 4, the circuit of drivers in fig. 5 is a diagram of comparison blocks; in fig. 6 is a comparator circuit; Fig. 7 is a diagram of a local control unit; in fig. 8 is a page memory block diagram; Fig. 9 is a diagram of the memory element; FIG. 10 is a schematic of the arrangement generator; Fig 1 1 is a diagram of a replacement control block; FIG. 12 is a diagram of a priority node; in fig. 13 is a block diagram of the correction; FIG. 14 is a diagram of a paging control unit; Fig. 15 is a block diagram of determining the number of page faults; in fig. 16 - layout of block arrangements; in fig. 17 is a diagram of the first comparison unit; FIG. 18 is a diagram of the second comparator unit; FIG. 19 is a diagram of the forwarder of the page exchange address; in fig. 20 is a timing diagram of clock pulses.
сов; на фиг. 21 - пространство состо ни активной задачи в оперативной пам ти.owls; in fig. 21 - the space of the active task state in the RAM.
Устройство дл управлени виртуальной пам тью (фиг, 1) содержит блок I входных регистров, блок 2 выходных регистров, управл ющий регистр 3, регистр 4 общего назначени , блоки 5 сравнени , блок 6 местного управлени , блоки 7 пам ти страниц, генератор 8 расстановки, блок 9 управлени замещением, блок 10 коррекции , блок 11 управлени страничным обменом, вход 12 оперативной пам ти, вход 3 задани режима, вход 4 синхронизации , вход 15 задани кода операции устройства, входы 16-24 блока 6 местного управлени , вход 25 управлени прерыванием блока 6 местного управлени , выходы 26 - 3 блока 6 местного управлени , дополнительный выход 32 блока 6 местного управлени вход 33 устройства, информационньй выход 34 блока 1 входных регистров,The device for managing the virtual memory (FIG. 1) contains a block of I input registers, a block 2 of output registers, a control register 3, a general purpose register 4, blocks 5 of comparison, a block of 6 local controls, blocks of 7 page memories, a spread generator 8 , substitution control unit 9, correction unit 10, paging exchange control unit 11, main memory input 12, mode setting input 3, synchronization input 4, device operation code setting input 15, device 16 inputs of 24-24 local control unit, control input 25 interrupt block 6 local control detecting the outputs 26 - 3 local control unit 6, an additional output 32 of the local control unit 6, input device 33, output 34 An information input unit 1 registers,
5 0 5 о 5 0 5 o
5five
00
5five
00
5five
3232
выход 35 сигнала прерывани , информа- щюнный выход 36 устройства.output 35 of the interrupt signal, informational output 36 of the device.
Блок 11 управлени страничным обменом (фиг, 1Д) содержит блоки 37 определени числа страничных сбоев, первый 38 и второй 39 блоки расстановки , первый 40 и второй 41 блоки- сравнени , первый - четвертый дешифраторы 42 - 45, первый 46 и второй 47 сумматоры, первую - четвертую группы 48 - 51 элементов пам ти, первую - Четвертую группы 52 - 55 блоков вычислени , блок 56 вычислени , группу 57 формирователей, элемент И-ИЛИ 58,The page exchange control unit 11 (FIG. 1D) contains the page fault number determination units 37, the first 38 and second 39 placement blocks, the first 40 and second 41 comparison blocks, the first to fourth decoders 42 to 45, the first 46 and second 47 adders, the first to fourth groups of 48 to 51 memory elements, the first to the fourth of groups 52 to 55 of the calculation blocks, the calculation block 56, the group of 57 drivers, the AND-OR 58 element,
Блок 37 определени числа страничных сбоев (фиг, 15) содержит первый 59 и второй 60 элементы И, первый - третий счетчики 61 - 63, элемент ИЛИ 64,The block 37 for determining the number of page faults (FIG. 15) contains the first 59 and second 60 AND elements, the first - third counters 61 - 63, OR element 64,
Первый блок- 40 сравнени (фиг, 17) содержит первый 65 и второй 66 регистры , блок 67 поразр дного сравнени , коммутатор 68, группу 69 триггеров , элемент 70 задержки, группу 71 элементов И, элемент И 72.The first block of comparison 40 (FIG. 17) contains the first 65 and second 66 registers, block 67 of bitwise comparison, switch 68, trigger group 69, delay element 70, AND group 71, And 72 element.
Первый 38 и второй 39 блоки расстановки имеют одинаковую конструкцию (фиг. 16) и содержат группу 73 регистров, группу 74 блоков поразр дного сравнени , группу 75 элементов И, группу 76 элементов ИЛИ, группу 77 регистров перезаписи, дещифра- тор 78, коммутатор 79, группу 80 регистров пам ти.The first 38 and second 39 placement blocks have the same construction (Fig. 16) and contain a group of 73 registers, a group of 74 comparison blocks, a group of 75 And elements, a group of 76 OR elements, a group of 77 rewriting registers, a decipher 78, a switch 79 , a group of 80 memory registers.
Второй блок 41 сравнени (фиг, 18) содержит блок 81 пам ти, группу 82 регистров пам ти, группу блоков 83 сравнени , группу 84 И элементов, группу элементов 85 И.The second comparison unit 41 (FIG. 18) contains a memory block 81, a group of 82 memory registers, a group of comparison blocks 83, a group 84 of elements, a group of elements 85 I.
Формирователь 57 группы (фиг,19) содержит первый 86 и второй 87 входные регистры, блок 88 поразр дного :сравнени , первый 89 и второй 90 элементы И, выходные регистры 91 н 92, элемент ИЛИ 93,The group shaper 57 (FIG. 19) contains the first 86 and second 87 input registers, bit unit 88: a comparison, the first 89 and the second 90 And elements, the output registers 91 and 92, and OR element 93,
Блок I входных регистров (фиг, 2) содержит регистр 94 логического адреса , вычитатель 95, группу 96 элементов И, выходы 97-99 регистра 94 логического адреса, выходы 100-104 управл ющего регистра 3,Block I of the input registers (FIG. 2) contains the logical address register 94, the subtractor 95, the group of 96 elements And, the outputs 97-99 of the register 94 of the logical address, the outputs 100-104 of the control register 3,
Блок 7 пам ти страниц (фиг, 8) содержит группы 105-115 элементов пам ти , регистры 116 и 117, дешифратор 118, элементы И 119 - 134, элементы Ю1И 135 - 138.Page memory unit 7 (FIG. 8) contains groups 105-115 of memory elements, registers 116 and 117, a decoder 118, elements 119 and 134, elements J1I 135-138.
313313
Блок 5 сравнени (фиг. 5) содержит компаратар 139, регистр 1ДО, элементы И А1 и 142.Comparison unit 5 (Fig. 5) contains comparator 139, register 1ДО, elements AND А1 and 142.
Генератор 8 расстановки (фиг. 0) содержит группу 143 элементов ИСКЛЮЧАЮЩЕЕ ИЛИ, коммутатор 144 и дешифратор 145.The generator 8 arrangement (Fig. 0) contains a group of 143 elements EXCLUSIVE OR, the switch 144 and the decoder 145.
Блок 9 управлени замещением (фиг. П) содержит элементы ИЛИ 146, дешифратор 147, коммутаторы 148 и узел 149 приоритета.Replacement control unit 9 (FIG. P) contains OR elements 146, a decoder 147, switches 148, and a priority node 149.
Блок 10 коррекции (фиг. 13) содержит дешифратор 1 50,элементы И 151 - 154 и элементы ИЛИ 155.Correction block 10 (Fig. 13) contains a decoder 1 50, elements AND 151 - 154 and elements OR 155.
Блок 2 выходных регистров (фиг. 3) содержит регистр 156 физического адреса , регистр 157 замещаемой страницы , регистр 158 флажков, коммутаторы 159. и 160, формирователи 161 и 162 и элемент ИЛИ 163,Block 2 of the output registers (Fig. 3) contains the register 156 of the physical address, the register 157 of the replaced page, the register of flags 158, switches 159. and 160, drivers 161 and 162, and OR element 163,
Элемент пам ти групп 105-115 блока 7 пам ти страниц (фиг. 9) содержит дешифратор 164 адреса, информационный регистр 165, группу 166 эле- ментов И и коммутатор 167.The memory element of the groups 105-115 of the page memory unit 7 (FIG. 9) contains the address decoder 164, the information register 165, the AND group 166, and the switch 167.
Компаратор 139 (фиг.6) содержит элемент ШШ-НЕ 168 и в каждом разр де элемент ИСКЛЮЧАЮЩЕЕ ИЛИ 169.The comparator 139 (FIG. 6) contains an element WL-NOT 168 and in each bit an element EXCLUSIVE OR 169.
Узел 149 приоритета (фиг. 12) бло- ка 9 управлени замещением содержит элементы И 170 и элементы ИЛИ 171.The priority node 149 (FIG. 12) of the replacement control block 9 contains AND elements 170 and OR elements 171.
Формирователи 161 и 162 (фиг, 4) содержат элементы ИЛИ 172 (предполагаетс , что устройство содержит два блока пам ти страниц),The formers 161 and 162 (FIG. 4) contain the elements OR 172 (it is assumed that the device contains two memory blocks of pages),
Блок 6 местного управлени (фиг.7) содержит второй - седьмой 173 - 178, тринадцатый - п тнадцатый 179 - 181, восьмой - двенадцатый 182 - 186 и первый 187 элементы И и шестой 188, п тый 189, первый - четвертый 190 - 193 элементы ИЛИ и триггеры 194 и 195.The local control unit 6 (Fig. 7) contains the second - the seventh 173 - 178, the thirteenth - the fifteenth 179 - 181, the eighth - the twelfth 182 - 186 and the first 187 elements And the sixth 188, the fifth 189, the first - the fourth 190 - 193 OR elements and triggers 194 and 195.
Устройство дл управлени виртуальной пам тью работает следующим образом.The device for managing the virtual memory works as follows.
Режимы работы устройства определ ютс путем возбуждени устройством управлени процессора соответствующего входа блока 6 местного управле- ни .The modes of operation of the device are determined by the control device of the processor driving the corresponding input of the local control unit 6.
Во врем выполнени операции, св занной с обращением к СП, устройство управлени процессора возбуждает вход 17 блока 6. Если бит слова сое- то ни программы, определ ющий режим преобразовани адресов, не установлен , то во врем действи импульса СО открываетс элемент И 81, сигнал сDuring the operation associated with addressing the AS, the processor control unit excites input 17 of block 6. If the word bit of the program's interface, which determines the address translation mode, is not set, then, during the pulse CO, the element 81, signal with
1313
выхода которого через элемент ИЛИ 189 производит запись в регистр 156 физического адреса, поступающего на вход регистра I56 через коммутатор 159 блока 2 выходных регистров. Если процессор работает в режиме преобразовани адреса, то устанавливаетс соответствующий бит слова состо ни программы и указанна вьппе информаци загружаетс в управл ющий регистр 3, сюда же передаетс информаци о количестве страниц, минимально необходимых дл выполнени каждой активной задачи,а также информаци о длине задачи в страницах, определ емой значением параметра REGION оператора EXEC, Во врем выполнени операции, св занной с обращением к оперативной пам ти, устройство управлени возбуждает вход 17 блока 6 местного управлени . Тогда во врем действи импульса СО открываетс элемент И 185, по сигналу с выхода 27. которого логический адрес записываетс в регистр 94 логического адреса блока 1 входных регистров, В блоке 1 адрес виртуальной страницы формируетс так же, как в устройстве-прототипе . Разр ды адреса виртуальной страницы , кроме смещени , поступают на входы группы 143 элементов ИСКЛЮЧАЮЩЕЕ ИЛИ генератора 8 расстановки, результат с выхода которой через ком-- мутатор 144 поступает на адресные входы групп 105-115 элементов пам ти каждого из блоков 7 пам ти страниц . Информаци i прочитанна с выбранной чейки групп 105 - 107, 113 и 1I5 элементов пам ти поступает в соответствующий блок 5 сравнени . Одновременно информаци с выбранной чейки групп 105 - 107 элементов пам ти каждого из блоков 7 поступает на соответствующие входы блока 40 сравнени входных адресов блока 11 управлени страничным обменом, В блоке 40 по информации из группы 105- 107 элементов пам ти определ етс количество страниц оперативной пам ти,the output of which through the OR element 189 writes to the register 156 of the physical address, which enters the input of the register I56 through the switch 159 of the block 2 output registers. If the processor is operating in the address translation mode, the corresponding bit of the program status word is set and the specified information is loaded into the control register 3, the information about the number of pages minimum required for the execution of each active task, as well as the information about the task length is transferred to pages, determined by the value of the REGION parameter of the EXEC operator. During the operation associated with accessing the main memory, the control device initiates the input 17 of the local control unit 6 and Then, during the operation of the pulse CO, the element 185 is opened, according to the signal from output 27. which logical address is recorded in the register 94 of the logical address of block 1 of the input registers. In block 1, the virtual page address is formed in the same way as in the prototype device. The bits of the virtual page address, except for the offset, are fed to the inputs of a group of 143 elements EXCLUSIVE OR generator 8 of the arrangement, the result of which through the commutator 144 enters the address inputs of groups 105-115 memory elements of each of the 7 page memory blocks. The information i read from the selected cell of groups 105-107, 113 and 1I5 of the memory elements is fed to the corresponding comparison unit 5. At the same time, information from the selected cell of groups 105–107 of memory elements of each of blocks 7 is fed to the corresponding inputs of block 40 comparing the input addresses of block 11 of the page exchange control. In block 40, the number of pages of RAM is determined from information from group 105–107 of memory elements ti
относ щихс к каждой активной задаче . Услови удалени страииц из оперативной пам ти, сформированные элементами И 121 -125 блока 7, и соответствующа информаци из групп 108, 110 - 113 элементов пам ти записываетс в регистры 116 и 117 соответственно сигналом с выхода 30 блока 6 местного управлени , поступающим че 5 related to each active task. The conditions for deleting pages from RAM, formed by elements AND 121 -125 of block 7, and the corresponding information from groups 108, 110 - 113 of memory elements are written to registers 116 and 117, respectively, by a signal from the output 30 of local control 6, coming through 5
рез открытый элемент И 179 во врем действи импульса С1. В блоке 5 производитс сравнение адресов виртуальных страниц, поступающих с блоков 1 входных регистров и блоков 7 пам ти страниц.cut open element And 179 during the action of the pulse C1. Block 5 compares the addresses of virtual pages coming from blocks 1 of the input registers and blocks 7 of the page memories.
Если сравнение произошло| выбранна строка групп 105-115 элементов пам ти загружена и данна страница не используетс в операци х ввода- вывода, то это указывает на то, что требуема виртуальна страница находитс в оперативной пам ти и доступна . Эта ситуаци запоминаетс в регистрах 140 каждого из блоков 5 по сигналам, поступающим с выхода 29 открытого элемента И 179 во врем действи импульса С1, и характеризует успешное обращение к странице оперативной пам ти. Эта информаци с выхода коммутатора 76 блока 5 поступает на первый вход соответствующего блока 37 определени числа страничных сбоев. Сигналы с выходов элементов И 141 поступают в блок 2 на эле мент ИЛИ 163j с помощью которого определ етс , находитс ли требуема страница в оперативной пам ти и раз .решено ли к ней обращение. Эта ситуаци запоминаетс в триггере 194 во врем действи импульса С1 по сигналу , поступающему на вход синхронизации триггера 194 через открытый элемент И 79.If a comparison has occurred | The selected row of groups 105-115 of the memory elements is loaded and this page is not used in I / O operations, this indicates that the required virtual page is in the main memory and is accessible. This situation is stored in the registers 140 of each of the blocks 5 according to the signals received from the output 29 of the open element AND 179 during the action of the pulse C1, and characterizes the successful access to the main memory page. This information from the output of the switch 76 of block 5 is fed to the first input of the corresponding block 37 for determining the number of page faults. The signals from the outputs of the AND elements 141 arrive at block 2 at the element OR 163j by means of which it is determined whether the required page is found in the operational memory and whether it is allowed to be accessed. This situation is remembered in trigger 194 during the action of pulse C1 on a signal received at the trigger input of trigger 194 through an open element 79.
Если сравнение произошло, выбран- на строка групп 05-115 элементов пам ти загружена, но данна страница используетс в операци х ввода-вывода , то это указывает на тоэ что требуема виртуальна страница нахо- дитс в оперативной пам ти, но недоступна дл обрашений со стороны процессора . Эта ситуаци запоминаетс в триггере 195 (единичное состо ние) во врем действи импульса С1 по сиг налу, поступающему на вход синхронизации триггера 195 через открытый элемент И 79. Это условие формируетс элементами И блоков 5 и злемен - том и 190 блока 6. If a comparison has occurred, selected on the row of groups 05-115 memory elements loaded, but this page is used in I / O operations, this indicates that the required virtual page is in RAM, but is not available for access side of the processor. This situation is remembered in trigger 195 (single state) during the action of pulse C1 by a signal received at the trigger input of trigger 195 through an open element AND 79. This condition is formed by elements AND blocks 5 and element and 190 block 6.
Если с помощью элемента ИЛИ 63 установлено, что доступ к виртуально странице возможен ( единившее состо ние триггера 194 , то ее сформированный физический адрес записываетс в регистр 156 физического адреса по сигналу с выхода 28 блока 6 местного управлени , поступающему на управл ющий вход регистра 156 физичес3 -6If using the OR element 63 it is established that access to the virtual page is possible (single state of flip-flop 194, then its generated physical address is recorded in physical address register 156 by the output from the 28 output of local control 6, which is fed to the control input of physical register 156 -6
кого адреса через элемент НИИ 184 и открытый элемент И 180 во врем действи импульса С1, Физический адрес поступает на вход регистра 155 через коммутатор 159. Физический адрес формируетс как совокупность номера блока 5 сравнени , где произошло опознание виртуальных адресов , кода, поступающего с выхода ком1-1утатора 144 генератора 8 расстановки , и смещени , поступающего с выхода 99 регистра 94 логического адреса . Двоичный код номера блока 5 . сравнени формируетс формирователем 161, После этого производитс коррекци страничной таблицы, заключающа с в установлении битов обращени и битов изменени , если обращение в оперативную пам ть производилось дл записи информации. Дл этого во врем де.йстви импульса С2 открываетс элемент И 178, сигнал с выхода 30 которого поступает на элемент И 132 каждого из блоков 7 пам ти страниц. Содержимое регистров 140 блоков 5 сравнени поступает на вторые входы элементов И i 32 соответствующих блоков 7 пам ти страниц, Так как опознание виртуального адреса возможно только в одном из блоков 5 сравнени то открываютс элементы И 119, 120, 132 и 134 соответствующего блока 7 пам ти страниц. Элементы И 119 и 120 определ ют установку информации на входы групп 108 и 109 элементов пам ти соответствующего блока 7 пам ти страниц, а открытый элемент И 132 разрешает прохождение сигнала записи на управл ющие входы групп 100 и 109 элементов пам ти. Запись в группу 109 элементов пам ти производитс только при установке триггером кода, операции определ ющего запись информации Е оперативную пам ть, В этом случае открыт элемент И 134,Whose address through the element of the NII 184 and the open element And 180 during the pulse C1, the Physical address is fed to the input of the register 155 through the switch 159. The physical address is formed as a combination of the number of the unit 5 of the comparison, where the virtual address has been recognized, the code coming from the output of the com1 The luminator 144 of the generator 8 arrangement, and the offset coming from the output 99 of the register 94 of the logical address. Binary code of block number 5. The comparison is formed by the shaper 161. After that, the paging table is corrected, which involves setting the reference bits and change bits, if the RAM was accessed to record information. For this, during the operation of the pulse C2, the element AND 178 is opened, the signal from the output 30 of which goes to the element 132 of each of the blocks of the 7 page memories. The contents of the registers 140 of the comparison units 5 are fed to the second inputs of the And elements i 32 of the respective blocks of the 7 page memories, since the recognition of the virtual address is possible only in one of the 5 blocks of the comparison, And the elements 119, 120, 132 and 134 of the corresponding block of the memory 7 are opened pages. Elements 119 and 120 determine the installation of information at the inputs of groups 108 and 109 of memory elements of the corresponding page memory block 7, and open element 132 allows the recording signal to pass to the control inputs of groups 100 and 109 of memory elements. Writing to the memory elements group 109 is performed only when the trigger code sets the operation defining the recording of information E to the operational memory. In this case, the AND 134 element is open.
После формировани условий дл определени свободной или возможно замещаемой страницы они анализируютс блоком 9 управлени замещением. Сфор- мированный адрес возможно замещаемой страницы и способ ее замещени помещаютс в регистр 157 замещаемой страницы и в регистр 158 флажков соответственно по сигналам с выхода 28 злемента И 182 во врем действи им- йульса С2,After forming the conditions for determining a free or possibly replaced page, they are analyzed by the substitution control unit 9. The formed address of the possibly replaced page and the method of its replacement are placed into the register 157 of the replaced page and into the register of 158 flags, respectively, according to the signals from the output 28 of the And 182 element during the action of the C2 impulse
Если триггеры 194 и 195 наход тс S нулавсм состо нии, то это определ ет, что требуемой виртуальной страницыIf the triggers 194 and 195 are S state zeroes, then it determines that the desired virtual page
713713
нет в оперативной пам ти, что соответствует страничному сбою. Эта информаци через элемент И 186 поступает на второй вход соответствующего блока 37 определени числа странич- ных сбоев. Если хот Сы в двух блоках 37 число успешных обращений К к оперативной пам ти или число страничных сбоев D достигают своих критических значений К или , которые выбираютс с учетом специфических характеристик потока задач, решаемых в данной вычислительной системе, или могут быть получены в результате имитационного моделировани вычислительного процесса, то информаци об этом с первых выходов соответствующих блоков 37 через элемент Н-ИЛИ 58 поступает на дополнительньй вход 25 блока 6 и открывает элемент И 187, сигнал с выхода 26 блока 6 вызывает прерывание , определ ющее, что необходимо провести перераспределение страниц оперативной памАти между активными задачами. После обработки этих прерываний операционна система передает в блок 11 управлени страничным обменом-че;рез блок входных регистров дл каждой задачи, участвующей в страничном обмене, минимально ; допустимое число страниц оперативной пам ти , необходимое дл решени каждой задачи, и длину задачи в страницах оперативной пам ти.В блоке 1 определ ютс пары задач,наход щиес одновременно в оперативной пам ти,например задаче , имеющей наибольшее избыточное- число страниц,ставитс в соответствие задача,требующа наибольшего числа страниц оперативной пам ти дл успешного завершени . В блоке П определ етс количество страниц, которые будут участвовать в обмене, и формируютс адреса обмена в группе блоков 57, которые с выхода блока 11 поступают на вход дешифратора 150 блока 10 коррекции, в котором анализируютс адреса задач, участвующих в обмене, и услови обмена. В резуль тате такого анализа по сигналу дешиф ратора 150 производитс смена номера задачи в группе 106 элементов пам ти блоков 7 путем передачи в группу 106 блоков 7 пам ти страниц дающих задач , номеров берущих задач. При действии импульса С1 открьшаетс элемент И 173 6, сигнал с выхода 30 которого и сигнал с выхода элеnot in RAM, which corresponds to a page fault. This information, through element 186, goes to the second input of the corresponding block 37 for determining the number of page faults. If, although Sy in two blocks 37, the number of successful accesses to RAM or the number of page faults D reach their critical values K or, which are selected taking into account the specific characteristics of the flow of problems solved in this computing system, or can be obtained as a result of simulation modeling computational process, then the information about this from the first outputs of the corresponding blocks 37 through the element H-OR 58 goes to the additional input 25 of block 6 and opens the element And 187, the signal from the output 26 of block 6 calls There is an interruption, which determines that it is necessary to redistribute pages of RAM between active tasks. After processing these interruptions, the operating system transmits to the paging exchange control unit-che; the input registers for each task involved in the paging exchange are minimal; the allowable number of pages of RAM required to solve each task, and the length of the problem in the pages of RAM. In block 1, pairs of tasks that are simultaneously in the RAM, for example the task with the largest excess number of pages, are put in Compliance is the task that requires the most pages of RAM to complete successfully. In block P, the number of pages that will participate in the exchange is determined, and the addresses of the exchange are formed in the group of blocks 57, which from the output of block 11 arrive at the input of the decoder 150 of the correction block 10, which analyzes the addresses of the tasks participating in the exchange and the conditions of the exchange . As a result of such an analysis, the signal of the decoder 150 is used to change the number of the task in the group of 106 memory elements of blocks 7 by transferring to the group 106 of blocks 7 of the memory pages of the giving tasks, the numbers of the taking tasks. Under the action of the pulse C1, the element And 173 6 is unlocked, the signal from the output 30 of which and the signal from the output
10ten
1515
2020
2525
30thirty
3535
4040
4545
5050
5555
мен-|,-э ИЛИ 188 открывают :элем1;нт И 126 того блока 7, ко-т-орый выбран дешифратором 145 генератора 8. Сигнал с выхода открытогсч элемента И 126 поступает на управл ющие входы группы 106 элементов пам ти, разреша запись нового номера активной задачи, участ- вуюпгей в страничном обмене, с выхода дешифратора 150 блока 10 коррекции. После завершени цикла страничных обменов между задачами, одновременно наход щимис в оперативной пам ти, устройство продолжает работать в режиме динамического преобразовани адресов до тех пор, пока не будут снова достигнуты значени или D„р хот бы дл двух активных задач. При обращении к внешней пам ти блок 10 коррекции анализирует условие, сформированное дешифратором 147, которое определ ет, возможно ли осуществить замещение или ввод требуемой страницы . Если это возможно, то в соответствующей строке страничной таблицы устанавливаетс бит-указатель ожидани ввода-вывода. Дл этого сигнал с выхода открытого элемента И 154 блока 10 коррекции поступает на элементы И 130 каждого из блоков 7 пам ти страниц. В выбранном узлом 149 приоритета блоке 7 пам ти страниц открываетс элемент И 130 при наличии CHI- нала с выхода 30 элемента И 177 блока -6 местного управлени , и во врем действи импульса С2 осуществл етс запись в группу 113 элементов пам ти. Информаци на входе группы I13 элементов пам ти каждого из блоков 7 пам ти страниц устанавливаетс с выхода элемента ИЛИ 155 блока 10 коррекции .men- |, -e OR 188 open: element1; nt AND 126 of that block 7, which is selected by generator 8 decoder 145. The signal from the output of the open element AND 126 enters the control inputs of the group of 106 memory elements, allowing the recording The new number of the active task, which participates in page exchange, from the output of the decoder 150 of the correction block 10. After completing the cycle of paging between tasks that are simultaneously in RAM, the device continues to work in the mode of dynamic address translation until the values or D "p at least for two active tasks are reached again. When accessing the external memory, the correction unit 10 analyzes the condition formed by the decoder 147, which determines whether it is possible to replace or input the required page. If possible, an I / O wait bit is set in the corresponding row of the page table. For this, the signal from the output of the open element AND 154 of the correction unit 10 is supplied to the elements 130 of each of the blocks of the 7 page memories. In the page memory unit 7 selected by the priority node 149, the AND 130 element is opened in the presence of CHI from the output 30 of the AND 177 block of the local control unit-6, and during the action of the C2 pulse, the memory elements are written to the group 113. Information at the input of a group of I13 memory elements of each of the page memory units 7 is established from the output of the OR element 155 of the correction unit 10.
Если при анализе условий блоком 10 коррекции установленоi что ввести требуемую страницу невозможно, то , бит-указатель ожидани ввода-вывода страничной таблицы не помечаетс ,If, when analyzing the conditions by the correction block 10, it is determined that it is not possible to enter the desired page, then the input-output wait bit indicator of the page table is not marked,
Если- требуемой виртуальной страницы нет в оперативной пам тн, то во врем действи импульса С2 открываетс элемент И 183,, сигнал с выхода 26 которого вызывает прерывание, определ ющее , что требуемой виртуальной страницы нет в оперативной пам тн.If the required virtual page is not in the RAM, then during the action of the pulse C2, the element AND 183 ,, opens a signal from the output 26 of which causes an interruption, indicating that the required virtual page is not in the RAM.
Если триггер 194 находитс в нулевом состо нии, а триггер 195 - в единичном , то это означает, что требуема виртуальна страница находитс в оперативной пам ти, но использует .9132If trigger 194 is in the zero state, and trigger 195 is in the single state, this means that the required virtual page is in the RAM, but uses .9132
с системой ввода-вывода. Поэтому никака строка страничной таблицы не помечаетс , так как сигнал с выхода триггера 195 закрывает элемент И 177 а в момент действи импульса С2 от- крываетск элемент И 184, что вызыва ет прерьюание, определ ющее, что процессору разрешено обращатьс к странице , котора используетс системой ввода-вывода,with I / O system. Therefore, no row of the page table is marked, since the signal from the output of the trigger 195 closes the element AND 177 and at the time of the action of the impulse C2 opens the element AND 184, which causes an interrupt, indicating that the processor is allowed to access the page used by the system I / O,
При вьшолиении операций ввода-вывода необходимо установить бит-указатель ожидани ввода- вывода в страничной таблице дл реальных физических страниц опеоативной п;1м ти, к ко- Topbfri производитс обращение при выполнении этих операций. После окончани операции ввода-вывода бит-указатель ожидани ввода-вывода сбрасываетс .When executing I / O operations, it is necessary to set the I / O wait bit in the page table for real physical pages of the operative p; 1 m tee, to which the Topbfri is accessed during these operations. Upon completion of the I / O operation, the I / O wait bit is reset.
Дл выполнени таких действий процессором в младшие разр ды регистра 4 общего назначе1 и устанавливаетс адрес реальной физической страницы, в соответствующий старший разр д - код, определ ющий установку или сброс бита-указател ожидани ввода-вывода, а устройство управлени процессора возбуждает вход 18 блока 6 местного- управлени . Таким образом, младша часть физического адреса страницы с выхода регистра 4 общего назначени через коммутатор 144 генератора 8 расстановки поступает на адресный вход групп 105-115 элементов пам ти каждого из блоков 7 пам ти страниц. Старша часть физического адреса страницы дешифруетс дешифратором 145 генератора 8 расстановки, что позвол ет выбрать один из блоков 7 пам ти страниц, т.е. соответствующа часть страничной таблицы. Код установки или сброса бита-указател ожидани ввода-вывода поступает на- вход группы 113 элементов пам ти каждого из блоков 7 пам ти страниц через элементы ИЛИ 155 и И 151. В момент действи импульса С1 открываетс элемент И, сигнал с выхода 30 которого открывает элемент И 129 того блока 7 пам ти страниц, который выбран дешифратором 145 генератора 8 расстановки. Сигнал с выхода открытого элемента И 129 через элемент ИЛИ 36 поступает на управл ющий вход группы 113 элементов пам ти, вызыва запись,информации , поступающей на вход эле0To perform such actions, the processor lowers the register 4 of general purpose1 and sets the address of the real physical page, the corresponding most significant bit — the code defining the setting or clearing of the I / O wait bit, and the processor control device excites input 18 of block 6 local government Thus, the younger part of the physical address of the page from the output of general register 4 through the switch 144 of the generator 8 of the arrangement arrives at the address input of groups 105-115 of memory elements of each of the blocks of page memory 7. The older part of the physical address of the page is decrypted by the decoder 145 of the generator 8 arrangement, which allows you to select one of the blocks of 7 page memories, i.e. the corresponding part of the page table. The set or reset code for the I / O wait bit is input to a group of 113 memory elements of each of the 7 page memory blocks via the OR 155 and I 151 elements. At the time of the C1 pulse, the AND element opens, the output signal of which opens 30 the AND 129 element of that block of page memory 7, which is selected by the decoder 145 of the generator 8 arrangement. The signal from the output of an open element AND 129 through the element OR 36 is fed to the control input of a group of 113 memory elements, causing a recording, of information arriving at the input of the elec
00
1131011310
ментов 115 пам ти, с гплходл элемента Ш1И 155 блока 10 коррекции.cops 115 of memory, with gpkhodl Sh1I 155 element of the correction unit 10.
При первоначалыкчй загрузке физической страницы р о терлтивргую пам ть шш очистке onepaTj BHon пам ти необходимо установить или сбросить бит- указатель запреше)1н удалени страниц и бит-указатель действительности строки страничной таблицы. Дл вьтол- нени таких действий процессор устанавливает в младших разр дах регистра 4 общего назначени адрес реальной физической страницы, в соответствуюg щих старших разр дах - биты, определ ющие действительность строки страничной таблицы, и код, определ ющий запрещение удалени страниц из оперативной .пам ти, а устройство управлени процессора возбуждает вход 19 блока 6 местного управлени .When initially loading a physical page with a memory memory, onepaTj BHon memory must be set or reset (forbidden pointer) 1n to delete pages and the row pointer of the page table. To accomplish such actions, the processor sets in the lower bits of general register 4 the address of the real physical page, in the corresponding higher bits - the bits that determine the validity of the row of the page table, and the code that determines the prohibition of deleting pages from RAM. and the processor control unit drives the input 19 of the local control unit 6.
Таким образом, младща часть физи- ческого адреса страницы с выхода регистра 4 общего назначени через ком5 мутатор 144 генератора 8 расстановки поступает на адресные входы групп 105- 115 элементов пам ти каждого из блоков 7 пам ти страниц. Старша часть физического адреса дешифрируетс деQ щифратором 145 генератора 8 расстановки , что позвол ет выбрать один иэ блоков 7 .пам ти страниц, т.е. соответствующую часть страничной таблицы. Коды установки битов-указателей запрещени удалени и действительности строки страничной таблицы поступают на входы групп 114 и- элементов пам ти каждого из блоков 7 пам ти страниц через элементы И 152 и 153 блока 10 коррекции. В момент действи импульса С1 открываетс элемент И 175 и через элемент Ш1И 188 сигнал с выхода 28 элемента ИЛИ 188 открывает элемент И 28 того блока 7 пам ти страниц, который выбран дешифратором 145 генератора 8 расстановки. Сигнал с выхода открытого элемента И 128, поступающий на управл ющие входы групп 114 и 115 злементов пам ти , вызывает запись информации, поступающей ка входы групп 114 и 15 элементов пам ти с выхода элементов И 152 и 153 блока Ю коррекции соответствекно.Thus, the younger part of the physical address of the page from the output of general register 4 through the commutator 144 of the generator 8 of the arrangement goes to the address inputs of groups 105-115 memory elements of each of the blocks 7 of the page memories. The older part of the physical address is decrypted by the descriptor 145 of the arrangement 8 generator, which allows you to select one of the blocks 7 of these pages, i.e. The corresponding part of the page table. The installation codes of the pointer bits to prohibit deletion and the validity of the row of the page table are fed to the inputs of the groups 114 and the memory elements of each of the page memory blocks 7 through the And elements 152 and 153 of the correction block 10. At the moment of action of the pulse C1, the element 175 opens and, through the element S1I 188, the signal from the output 28 of the element OR 188 opens the element 28 of that block 7 of the page memory, which is selected by the decoder 145 of the generator 8. The signal from the output of the open element AND 128, which arrives at the control inputs of the groups 114 and 115 of the memory elements, causes the recording of information arriving at the inputs of the groups 114 and 15 of the memory elements from the output of the elements 152 and 153 of the correction unit Yu.
5 При первоначальной загрузке виртуальной страни1 ы в оперативную пам ть информаци об э.той странице записываетс в соответств тощую строку страничной таблицы. При этом уст55 When the virtual page is initially loaded, the information about this page is written into the corresponding row of the page table. With this, mouth5
00
5five
00
11131113
ройство управлени процессора возбуждает вход 20 блока 6. Так как страница вводитс в оперативную пам ть только в том случае, если к ней бьшо обращение, то физический адрес оперативной пам ти, куда будет загружатьс виртуальна страница, находитс в регистре 157 замещаемой страницы. Процессор помещает адрес физической страницы из соответствующих разр дов регистра 157 замещаемой страницы в младшие разр ды регистра 4 общего назначени , в соответствующих старших разр дах которого размещаютс информаци о запрещении удалени страницы из оперативной пам ти и бит действительности строки страничной таблицы. Адрес виртуальной страницы размещаетс в регистре 94 логичес- кого адреса блока 1 входных регистров , куда записываетс по сигналам с выхода 27 блока 6 местного управлени через открытый элемент И 185.The processor control function excites input 20 of block 6. Since the page is inserted into the RAM, only if it is accessed, the physical address of the RAM, where the virtual page will be loaded, is in the register 157 of the page being replaced. The processor places the address of the physical page from the corresponding bits of the register 157 of the replaced page into the lower bits of general register 4, in the corresponding high bits of which the information about the prohibition of deleting the page from the main memory and the validity of the page table row is placed. The virtual page address is located in the register 94 of the logical address of the block 1 of the input registers, where it is recorded from the signals from the output 27 of the block 6 of the local control through the open element 185.
Таким образом, младща часть фи- зического адреса с выходов регистра 4 общего назначени через коммутатор 144 генератора 8 расстановки поступает на адресный вход групп 105 115 элементов пам ти каждого из бло- ков 7 пам ти страниц. Старша часть физического адреса дешифрируетс дешифратором 145 генератора 8 расстановки , что позвол ет выбрать один изThus, the younger part of the physical address from the outputs of general register 4 through the switch 144 of the generator 8 of the arrangement arrives at the address input of the groups 105 115 of the memory elements of each of the blocks of the 7 page memories. The older part of the physical address is decrypted by the decoder generator 145 of the 8 arrangement, which allows you to choose one of
блоков 7 пам ти страниц, т.е. соотblocks of 7 pages of memory, i.e. soot
ветствующую часть страничной таблицы В момент действи импульса С1 открываетс элемент И 173 блока 6, сигнал с выхода 30 которого и сигнал с выхода элемента ИЛИ 188 открывают эле- менты И 126 - 128, 131 и 133 того блока 7 пам ти страниц, который выбран дешифратором 145 генератора 8 расстановки. Сигналы с выходов открытых элементов И 126 - 128, 131 и 133 поступают на управл к ше входы групп 105 - 112, 114 и 115 элементов пам ти , вызыва запись информации, по- ступаюшей на входы групп 105 П 2, П4 и 115 элементов. На входах групп 105 - 107 элементов пам ти устанавливаетс номер виртуйльной страницы с выхода блока 1 входных регистров . На входах групп 108 и 109 элементов пам ти устанавливаетс логический нуль, так как элементы группы 119 и 120 закрыты. На входах группы 110 элементов пам ти дешифратором 11 8 устанавливаетс значение ло the corresponding part of the page table. At the time of the pulse C1, the element AND 173 of block 6 opens, the signal from output 30 of which and the signal from the output of element OR 188 open the elements AND 126 - 128, 128 and 131 of that block 7 of page memory, which is selected by the decoder 145 generator 8 arrangement. The signals from the outputs of open elements I 126 - 128, 131 and 133 are fed to the control inputs of groups 105 - 112, 114 and 115 of memory elements, causing the recording of information entering the inputs of groups 105 P 2, P4 and 115 elements. The number of the virtual page from the output of the block 1 of the input registers is set at the inputs of groups 105-107 memory elements. A logical zero is set at the inputs of the groups 108 and 109 of the memory elements, since the elements of the groups 119 and 120 are closed. At the inputs of the group of 110 memory elements, the decoder 11 8 is set to the value
g g
5 о 5 o
5five
Q g Q g
3 23 2
гической едини1Ц51, а на входах групп 111 и 112 элементов пам ти - значение логического нул (загружаема страница включаетс в множество наиболее часто используемых страниц. Информаци на входах групп 114 и 11 5 элементов пам ти определ етс содержимым соответствующих старших разр дов регистра 4 общего назначени . Эта информаци через элементы И 152 и I53 блока 10 коррекции поступает на входы групп 114 и 115 элементов пам ти.the logical unit is 51, and the inputs of the groups 111 and 112 of the memory elements are the logical zero value (the loading page is included in many of the most frequently used pages. The information on the inputs of the groups 114 and 11 5 memory elements is determined by the contents of the corresponding high-order bits 4 of the general purpose This information through the elements 152 and I53 of the correction unit 10 is fed to the inputs of the groups 114 and 115 of the memory elements.
Математическое обоснование оптимального страничного обмена в ОП между активными задачами таково.The mathematical justification for the optimal page exchange in the OP between the active tasks is as follows.
Пространство состо ни задачи (фиг. 21), наход щейс в оперативной пам ти, может быть охарактеризовано следующими параметрами:The space of the task state (Fig. 21) in the RAM can be characterized by the following parameters:
L- - число страниц, необходимое дл решени i-й задачи, длина задачи в страницах (определ етс параметром REGION в операторе EXEC);L- is the number of pages required to solve the i-th problem, the length of the problem in pages (determined by the REGION parameter in the EXEC statement);
D - число текущих сбоев;D is the number of current failures;
N и - число различных страниц i-й задачи, к которым произошло обращение за врем накоплени D сбоев;N and - the number of different pages of the i-th task, which was addressed during the accumulation of D failures;
X; - число страниц ОП, выделенных дл i-й задачи на момент D сбоев;X; - the number of OP pages allocated for the i-th task at the time D of failures;
.L. - минимально требуемое число страниц дл решени i-й задачи;.L. - the minimum required number of pages for solving the i-th task;
Кд - число успешных обращений к страницам i-й задачи.Cd - the number of successful hits to the pages of the i-th task.
.Алгоритм оптимального управлени страничным обменом в ОП между активными задачами.. The algorithm of optimal control of page exchange in the OP between active tasks.
При достижении в процессе решени i-й задачи D,, сбоев или успешных обращений к ОП ( и вл ютс посто нными коэффициентами дл всех активных задач) вычисл ютс дл этой задачи коэффициенты:When the i-th problem D is reached during the process of solving, the failures or successful calls to the PD (and are constant coefficients for all active tasks), the coefficients for this task are calculated:
(1)(one)
л Njrsl Njrs
А . ----- X,BUT . ----- X,
,п DT д. . -f-,, n dt d. -f-,
LiLi
а такжеand
«А"BUT
(2)(2)
1Л11Л1
рГ- й / WG-th /
где N - общее число активных задач. Затем общее количество активных задач в ОП разбиваетс на два подмножества: подмножество задач с избытком страниц ОП - дающее I. и подмножество задач с недостатком стра- : ниц ОП - берущее 1 путем проверки условий:where N is the total number of active tasks. Then the total number of active tasks in the OP is divided into two subsets: a subset of tasks with an excess of OP pages — giving I. and a subset of tasks with a lack of OP pages — taking 1 by checking the conditions:
15- (3)15- (3)
ij. {i/r. л,pVij. {i / r. l, pV
(4)(four)
1313 1313
Дающее подмножество по А. упор дочиваетс путем расстановки элементов I,. от Д. до А;The giving subset according to A. is ordered by arranging the elements I ,. from D. to A;
о . м«х ( „about . m "x ("
Дл элементов берущего подмножества Ij определ ютс коэффициенты Aj . , и элементы 1 упор дочиваютс For the elements of the taker subset Ij, the coefficients Aj are determined. , and elements 1 are arranged
от J до /1 Г . Далее производ тfrom J to / 1G. Next, produce
тсс I min; sss I min;
лерераспределение страниц ОП междуredistribution of OD pages between
активными задачами, учитыва тот факт, что задача с min А j может отдать максимальное число страниц, а задача с шах Л; может прин ть макси- мальное число страниц ОП:active tasks, taking into account the fact that the task with min A j can give the maximum number of pages, and the task with check L; can receive the maximum number of pages OP:
K-min L.-X. ,X.-Ljj ,i€ly,jelj. (5) K-min L.-X. , X.-Ljj, i € ly, jelj. (five)
При этом обмен между i-й и j-й задачами производитс таким образом, чтобы полностью удовлетворить i-ю задачу , еслиIn this case, the exchange between the i-th and j-th tasks is performed in such a way as to fully satisfy the i-th task, if
L. -X, Xj -L°.L. -X, Xj -L °.
(6)(6)
либо полностью освободить j-ю задачу от избыточных страниц ОП, еслиor completely free the jth task from the redundant pages of the OP, if
L. - X. 7/ X. - L°..(7) L. - X. 7 / X. - L ° .. (7)
Вместе с тем при A j удовлетворить задачи из множества 1 за счет задач из множества 1„ не представл етс возможным. Это условие также может служить основанием дл выбора величин К р и D р .At the same time, for A j, it is impossible to satisfy problems from set 1 by means of tasks from set 1n. This condition can also serve as a basis for choosing the values of K p and D p.
Блок 11 управлени страничным обменом (фиг. 2-) работает следующим образом.The paging control unit 11 (FIG. 2-) operates as follows.
При первоначальной загрузке виртуальной страницы оперативной пам ти информаци об этой странице записываетс в соответствующую строку страничной таблицы в группы 105 - П5 элементов пам ти блока 7. Одновременно из групп 105 - 107 элементов информаци : номер виртуальной машины и номер виртуальной пам ти (группа элементов 105); номер задачи (группа элементов 106); номер сегмента и номер страницы (группа элементов 107) поступает в блок 40 сравнени входных адресов страниц. В блоке 40 сравниваютс адреса, записанные в груп- пах 105 - 107 элементов, и определ етс , сколько страниц оперативной пам ти - Х| относитс к каждой задаче,, поступившей на выполнение. Эта информаци из блока 40 поступает в первый- п-й блоки пам ти, причем в первый блок каждой группы поступает информаци о первой задаче, во второй - о ВТОРОЙ и т.д. Количество блоков паWhen the virtual memory page is initially loaded, information about this page is recorded in the corresponding row of the page table in groups 105 - P5 of the memory elements of block 7. At the same time, from groups 105 - 107 information elements: virtual machine number and virtual memory number (group of elements 105 ); task number (element group 106); the segment number and the page number (group of elements 107) are fed to block 40 comparing the input page addresses. In block 40, the addresses recorded in groups of 105-107 elements are compared, and it is determined how many pages of RAM - X | refers to every task that has been submitted. This information from block 40 enters the first or nth memory block, and the first block of each group receives information about the first task, the second about the second, and so on. Number of blocks na
2020
3535
2525
зо zo
Q g j-n 3UQ g j-n 3U
м ти соответствует числу страниц оперативной пам ти. На другой вход блоков пам ти группы 48 через дешифратор 42 поступает из группы 109 элементов блока 7 число обращений к страницам данной задачи - N, Первый выход каждого блов:а пам ти группы 48 подключен на вход сумматора 46, в котором производитс подсчет обшего количества задач, од-новременно наход щихс в оперативной пам ти, по числу блоков пам ти группы 48, в которые поступила информаци . Вторые и третьи выходы указанных блоков 48 пам ти подключены на входы блоков вычислени у1 j группы 52, выходы которых подключены на входы блока 38 расстановки и на входы сумматора 47, в котором производитс вычисление Z А - .The mi corresponds to the number of pages of RAM. To the other input of the memory blocks of group 48 through the decoder 42 comes from a group of 109 elements of block 7 the number of references to the pages of this task is N, the first output of each BL: the memory of group 48 is connected to the input of the adder 46, in which the total number of tasks is calculated at the same time in memory, according to the number of memory blocks of group 48, which received information. The second and third outputs of the said memory blocks 48 are connected to the inputs of the computing blocks y1j of the group 52, the outputs of which are connected to the inputs of the spreading unit 38 and to the inputs of the adder 47, in which the calculation of Z A - is performed.
1-11-1
В блоке 38 рас становки производитс определение максимального коэффициента и последующих Л ДО ( „;„ при этом на первый вход блока 38 расстановки .поступает АIn block 38 of the installation, the maximum coefficient is determined and the subsequent L TO (";" at the same time, the A input
|Т1С(Х| T1C (X
, а на последний - А ; , с выходов сумматоров 46 и 47 информаци поступает на входы блока 56, в котором производитс вычисление среднего значени Д по формуле N, and on the last - A; , from the outputs of adders 46 and 47, information is fed to the inputs of block 56, in which the average value of D is calculated by the formula N
л :. л:.l:. l :.
5555
Д : D:
f N Выход блока 56 подключен на первый вход блока 41 сравнени с ip., на остальные входы которого поступают значени коэффициентов от Д доf N The output of block 56 is connected to the first input of block 41 of comparison with ip., the remaining inputs of which receive the values of the coefficients from D to
тоthat
Д . С ВЫХОДОВ блока 38 расстановки ,, при этом , поступает на второй вход блока 41, на третий и т.д., на последний вход бло- ка 41 поступает 1,, с последнегоD. From the OUTPUTS of the arrangement block 38, in this case, it enters the second input of the block 41, the third, etc., the last input of the block 41 enters 1, from the last
Г| 11R | eleven
выхода блока 38. В блоке 41 сравнени с множество i раздел етс на два подмножества: подмножество задач с избытком страниц оперативной пам ти (1а 1 f подмножество задач , испытывающих недостаток страниц, оперативной пам ти (I, сД ). Номера задач из множества la. поступают на первую группу входов дешифратора 44, на вторую группу входов которого поступают из блока 1 входных регистров значени L J дл всех активных задач, на третью группу входов дешифратора 44 поступают значени Х из блоков 48 пам ти группы, при этом на выход дешифратора 44 проход т значени X, и L, соответствующие , таким образом,, что на первую паруoutput of block 38. In block 41, the comparison with set i is divided into two subsets: a subset of tasks with an excess of pages of RAM (1a 1 f a subset of tasks that lack pages, RAM (I, CD). The numbers of tasks from the set la The first group of inputs of the decoder 44 is received, the second group of inputs is received from block 1 of the input registers of LJ values for all active tasks, the third group of inputs of the decoder 44 receives the values of X from blocks 48 of the group memory, while the output of the decoder 44 passes t zn tim X, and L, corresponding to so ,, that the first pair of
15131513
входов дешифратора поступают X, и L , соответствующие /1 из мно1 Ч « 1the inputs of the decoder are X, and L, corresponding to / 1 of the many H «1
жества I , на последнюю пару выходов - Х и L°, соответствуюшие ,, Перва пара выходов дешифратора 44 подключена на входы первого блока 50 пам ти группы, в который записываютс значени X. и L, соответствующие задаче с ,„д, из 1, а последн группа выходов дешифратора 44 - к последнему блоку пам ти группы 50, в которой записываютс значени Х, L°, соответствующие А . из 1„, ВылШ1 О3The first pair of outputs of the decoder 44 is connected to the inputs of the first memory block 50 of the group, into which the values of X are written. And L corresponding to task c, d, out of 1, and the last group of outputs of the decoder 44 to the last memory block of group 50, in which the values X, L °, corresponding to A, are recorded. of 1 „, VYSH1 O3
ходы блоков 50 пам ти группы подклю- чены на входы блоков 54 вычислени группы, в которых дл каждой задачи из множества 1 производитс вычисление выражении X -Lj, j I а, и этот результат с номером задачи, к кото- рой он относитс , передаетс с выхода соответствующего блока пам ти : группы 54 на первый вход соответствующего формировател адреса страничного обмена группы 57. Номера задач из множества Ij поступают на первую группу входов дешифратора 43, на вторую группу входов .которого из блока 1 поступают значени L., на третью группу - сигналы с выходов бло- ков 37 определени текущего числа сбоев страниц оперативной пам ти. Дешифратор 43 пропускает значени d. , Lj дл каждой задачи из множества Ig на входы соответствующих блоков пам ти группы 49, выходы которых подключены на входы соответствующих блоков группы 53, в которых производитс вычисление по формуле Д the moves of the memory blocks of the group 50 are connected to the inputs of the blocks of the calculation 54 of the group, in which for each task from set 1 the calculation of the expression X -Lj, j I a is performed, and this result with the number of the task to which it belongs is transmitted from the output of the corresponding memory block: group 54 to the first input of the corresponding shaper of the page exchange address of group 57. Task numbers from the set Ij are sent to the first group of inputs of the decoder 43, to the second group of inputs which of block 1 receives the values L., to the third group - signals from the output s Bloch Cove 37 for determining the current number of operational failures of pages of memory. The decoder 43 skips the values of d. , Lj for each task from the set Ig to the inputs of the corresponding memory blocks of group 49, the outputs of which are connected to the inputs of the corresponding blocks of group 53, in which the calculation is performed using the formula D
---- дл каждой задачи из множест ---- for each task from the set
ва If. Значени А, с выходов соответ0чva If. Values of A, from the outputs, respectively
ствующих блоков группы 53 поступают на входы блока 39 расстановки, который функционирует так же, как . блок 38 расстановки. На первом выходе блока 39 расстановки формируетс номер задачи, дл которой , последнем - номер задачи, у которой min Указанные номера поступают на первую группу входов дешифратора 43, на вторую группу входов которого поступают значени L. из блока 1, на третью - значени X. из блоков пам ти группы 48. На первую пару выходов дешифратора 45 поступают значени X.,L,, соответствующие задаче из множества Ig, дл которой °block 53 of the group arrive at the inputs of the block 39 of the arrangement, which functions the same as. block 38 arrangement. At the first output of block 39, a task number is formed, for which, the last is a task number for which min. The given numbers go to the first group of inputs of the decoder 43, the second group of inputs of which receive the values L. from block 1, the third - the values X. from memory blocks of group 48. The first pair of outputs of the decoder 45 receives the values X., L ,, corresponding to the task from the set Ig, for which
следнюю пару дешифратор 45 пропуска3the last pair of decoder 45 passes3
16sixteen
ет значени X , L задачи из множества Т, дл которой Д J . Перва пара выходов дешифратора 45 подключена на вход первого блока пам ти группы 51, в который поступают значени X., L. дл задачи X е 1, у которой no(f т.д., последн пара выходов подключена на входы последнего блока пам ти группы 51, в которьй записываютс значени Х, L, дл задачи I-, у которой . Выходы блоков пам ти группы 51 подключены на входы соответствующих блоков вычислени группы 55, в которых производ тс вычислени величин К дл каждой задачи из множества Ig, результаты вычислений с выходов блоков группы 55 поступают на вторые входы формирователей адресов группы 57 страничного обмена, выходы которых подключены к первой группе входов дешифратора 150 блока 10 коррекции . При этом на входе каждого формировател адреса группы 57 формируетс адрес страничного обмена, включающий в себ номер задачи, отдающей страницы Njj, номер задачи, берущей страницы N-j, и число страниц, участвующих в обмене. Kg или Ко. Сформированные адреса поступают на первую группу входов дешифратора 150 блока 10, на вторую группу входов которого из блока 116 поступают адреса страниц, наименее используемых и принадлежащих задачам, между которыми производитс страничный обмен. Страничный обмен между активными задачами фактически заключаетс в замене в группе элементов 106 пам ти блока 7 номера задачи, отдающей страницы, на номер задачи, берущей страницы, при этом количество страниц в которых будет проведена смена номеров задач, определ етс в соответствующем формирователе 57 адреса группы из выра жени There are values X, L of the task from the set T, for which D J. The first pair of outputs of the decoder 45 is connected to the input of the first memory block of group 51, into which the values X., L. are received for task X e 1, which has no (f etc., the last pair of outputs is connected to the inputs of the last memory block groups 51, in which X, L values are written, for task I-, in which. The memory blocks of group 51 are connected to the inputs of the corresponding calculation blocks of group 55, in which the K values for each task from the set Ig are calculated, the results of calculations from the outputs of the blocks of group 55 are fed to the second inputs of the forms The address exchange groups of the page exchange group 57 whose outputs are connected to the first group of inputs of the decoder 150 of the correction block 10. At the input of each shaper of the group 57 address, a page exchange address is formed that includes the number of the task, the giving page Njj, the number of the task taking the page Nj and the number of pages participating in the exchange. Kg or Co. The formed addresses are sent to the first group of inputs of the decoder 150 of block 10, the second group of inputs of which from block 116 receives the addresses of the pages that are least used and ezhaschih tasks between which paging is performed. The page exchange between active tasks actually consists in replacing in block group 106 of memory block 7 the number of the task giving pages to the number of the task taking the page, and the number of pages in which the numbers of the tasks will be changed is determined in the corresponding driver 57 group address from expression
.-Х-,X.-Lj ,iel5,jel..-X-, X.-Lj, iel5, jel.
Задача из множества Ig, у которой mof берет максимальное число страниц , задача из множества In, у которой . , отдает максимальное число страниц. .Дл таких пар задач величины , их характеризующие - Х, L. (icij), X,, L (jelj), поступают через соответствукшие блоки вычислени группы 54,в которых определ ютс значени К X -, - L J , на входы одногоA task from the set Ig, in which mof takes the maximum number of pages, a task from the set In, in which. , gives the maximum number of pages. For such pairs of tasks, the quantities that characterize them are X, L. (icij), X, L (jelj) are passed through the corresponding calculation blocks of group 54, in which the values of K X -, - L J are determined, to the inputs of one
i7i7
формировател г руппы 57, и именно между такими задачами производитс страничный обмен таким образом, что ибо дающа задача полностью освобождаетс от избыточных страниц, либо беруща задача полностью удоветвор етс недостающими страницами Блок 11 управлени страничным обменом начинает функционировать, если хот чд бы дл двух задач достигнуты значени или К , которые форкируготс о информации, поступающей на входы блоков 37 определени числа страничных сбоев с выхода компаратора 139 5 блока 5 и выхода триггера i 94 блока 6. Сигналы о достижении К р или p с вторых вьгходов блока 37 постуают на входы элемента И-ИЛИ 58, с ыхода которого поступает сигнал на 2о ополнительный вход 25 блока 6, по оторому формируетс прерывание, поступающее на выход 26 блока 6 и обабатывающеес в операционной систее . За врем обработки этого прерыва- 25 ни по сигналам от операционной системы блок 11 .производитс перераспрееление страниц оперативной пам ти между активными задачами. Блок 37 определени числа странич- Q ньгх сбоев (фиГе 15) включает элемент И 59, элемент И 60 с первьм инверсным входом, на входы которых поступают сигналы с выходов компаратора 139 блока 5 и триггера 194 блока 6.Если страница,к которой происходит обращение,находитс в оперативной пам ти, то оба сигнала присутствуют на входе элемента И 59, что свидетельствует об успешном обращении к оперативной пам ти. Импульс с выхода элемента И 59 поступает на вход счетчика 61 успешных обращений К, нй другой вход которого предварительно подаетс код числа К| , который первоначально устанавливаетс в счетчике 61, Если с выхода триггера 194 сигнал не поступил, это свидетельствует об отсутствии требуемой страницы в оперативной пам ти и наступает страничный сбой - обращение к внешней пам ти, В этом случае сигнал не поступает на первый инверсный вход элемента И 60, а на второй вход поступает сигнал с выхода компаратора 39 блока 5, Импульс с выхода эле ментй И 60, свидетельствующий о страничном сбое, поступает на вход счет- чика 62, в котором предварительно ус35grouper 57, and it is precisely between such tasks that the page exchange is performed in such a way that for the giving task is completely freed from redundant pages, or taking the task fully satisfies the missing pages the page exchange control unit 11 begins to function if even for two tasks are achieved values or K, which are forkyrugots about information received at the inputs of blocks 37 determining the number of page faults from the output of comparator 139 5 of block 5 and the output of trigger i 94 of block 6. Reach signals The Kp or p from the second inputs of block 37 is placed at the inputs of the AND-OR element 58, from the output of which a signal is fed to the 2o additional input 25 of block 6, an interrupt is generated, which arrives at the output 26 of block 6 and is processed in the operating system. During the processing of this interrupt 25, according to the signals from the operating system, block 11. Realizes the redistribution of pages of the main memory between active tasks. The block 37 for determining the number of pages Q q of faults (FIG 15) includes an element AND 59, an element 60 AND with a first inverse input, the inputs of which receive signals from the outputs of comparator 139 of block 5 and trigger 194 of block 6. If the page being accessed is in the RAM, then both signals are present at the input of the And 59 element, which indicates successful access to the RAM. The impulse from the output of the element 59 is fed to the input of the counter 61 successful calls K, whose other input is previously fed the code number K | , which is initially installed in the counter 61, If the signal from the trigger output 194 is not received, this indicates the absence of the required page in the RAM and a page failure occurs - access to the external memory. In this case, the signal does not arrive at the first inverse input of the AND element 60, and the second input receives a signal from the output of the comparator 39 of block 5, the impulse from the output of the elements I 60, indicating a page fault, is fed to the input of the counter 62, in which
4040
5050
.„ 55. „55
чд 5 2о 25 Q 35Chd 5 2 25 Q 35
4040
5050
13181318
тановлен код числа , и одновременно на вход 63, в котором подсчитываетс текущее число страничных сбоев Dy. При переполнении (до- стиженки D или К.,р ) одного из счетчиков 6i или 62 импульс переполнени с выхода элемента ИЛИ 64 поступает на дополнительный вход 25 блока 6 и одновременно по этому импульсу происхо-, дит считывание велзгчины D счетчика 63 на вторую группу входов дешифратора 43, а также обнуление счетчиков 61 и 62.The code of the number is set, and simultaneously at input 63, in which the current number of page faults Dy is calculated. At overflow (dostizhenki D or K., p) of one of the counters 6i or 62, the overflow pulse from the output of the OR 64 element is fed to the additional input 25 of block 6 and simultaneously with this pulse the counter 63 reads to the second group inputs of the decoder 43, as well as resetting the counters 61 and 62.
Блок 40 сравнени входных адресов (фкг. 17) работает следующим образом.The input address comparison unit 40 (fkg. 17) operates as follows.
В регистр 65 пам ти поступает информаци от первой страницы с элементов пам ти групп 105 - 107 блока 7 и запоминаетс в нем. Информаци от последующих страниц поступает через элемент 71 И, инверсный вход которого подключен к нулево1чу выходу первого триггера группы 69, Все другие адреса страниц поступают через соответствующие элементы И группы 71 в блок 67 поразр дного сравнени , в котором происходит сравнение содержимого элементов пам ти групп 105-107 ка;кдой последующей страницы с инфор- ччацией, хран щейс - в регистре 65. Выход блока 67 поразр дного сравнени подключен на вход регистра 66 пам ти числа страниц относ щихс к i-й задаче , в данном случае к той, номер которой в этот момент хранитс в регистре 65. После сравнени последней страницы с кодом в регистре 65 по сигналу, поступившему на первый вход последнего элемента И группы 71 через линию 70 задержки производитс считывание числа страниц оперативной пам ти, ; относ щихс к данной задаче., которое поступает на вход коммутатора 68 а последний пересылает число страниц первой задачиJ полученное в результате сравнени первого страничного адреса со всеми адресами, на вход первого блока пам ти группы 48, Результат каждого сравнени s случае совпадени адресов дает ннпульс на выходе блока 67 который суг мируетс в блокеMemory register 65 receives information from the first page from the memory elements of groups 105-107 of block 7 and is stored in it. The information from the subsequent pages comes through element 71 And, the inverse input of which is connected to the zero output of the first trigger of group 69, all other page addresses are received through the corresponding elements AND of group 71 in block 67, which compares the contents of the memory elements of groups 105 -107 ka; kda of the next page with information stored in register 65. The output of block 67 of one-by-one comparison is connected to the input of register 66 of memory of the number of pages relating to the i-th task, in this case to that number Ora at this moment is stored in register 65. After the comparison with the last page code in register 65 by the signal received on the first input of the last element of group 71 and 70 through the delay line the number of pages read is performed operational memory; related to this task., which goes to the input of the switch 68 and the latter sends the number of pages of the first taskJ obtained as a result of comparing the first page address with all addresses to the input of the first memory block of group 48, the result of each comparison is the case of address matching gives a pulse the output of block 67 which sug is modeled in block
а также служит дл and also serves for
чд 5 2о 25 Q 55CH 5 2 25 Q 55
установки состзетствующего триггера группы 69 из единичного состо ни в нулевое и таким образом запирает соответствующий элемент И группы 71, что позвол ет исключить подвергшийс сравнению адрес страницы из обще19 ,327113 20setting the triggered trigger of group 69 from one state to zero and thus locking the corresponding AND element of group 71, which makes it possible to exclude the compared page address from the general 19, 327113 20
го числа страниц, поступающих- дл элементов Д. до тех пор, пока всеof the number of pages arriving for elements D. until all
сравнени с другими адресами на входони не будут записаны по убыванию вcomparisons with other addresses on entry will not be recorded descending in
блока 40 сравнени . Процедура выпол-выходных регистрах группы 80. н етс до тех пор, пока не будет про- . , Блок 41 сравнени с А (фиг. 1 8)block 40 comparison. The procedure for executing the output registers of the group 80. until it is pro- , Block 41 Comparison with A (Fig. 1 8)
ведено сравнение всех адресов. работает следующим образом.All addresses are compared. works as follows.
Блоки 38 и 39 расстановки (фиг.16) В первый входной регистр 81 поработают следующим образом.ступает значение с выхода блоВычисленные значени А в блокахка 56 вычислени , во входные регист- групп 52 или 53 поступают во вход- юР группы 82 поступают значени от ные регистры группы 73 со своими но-Л „ до Л,. соответственно с выхо- мерами задач. В первой части каждогодов блока 38 расстановки, с выхода регистра хранитс значение Д, , а ворегистра 81 Л .р поступает на первый второй - номер соответствующей зада-вход всех блоков поразр дного срав- чи. Значение Д., записанное в первом igнени группы 83, на вторые входы ко- входном регистре группы 73, поступа-торых поступают значени от Д д до ет на первый вход первого блока по- /(т1л выходов регистров группы 82, разр дного сравнени группы 74, напервые выходы блоков поразр дного второй вход которого поступает А j ссравнени группы 83 подключены на выхода второго регистра группы 73; соответствующих элементов И если первое значение больше второго,группы 84, на вторые входы которых то импульс по вл етс на первом вы-подключены вторые выходы соответст- ходе блока сравиени группы 74, ввутощих регистров группы 82, с кото- противном случае - на втором. Первыйрых поступают номера задачj соответ- выход первого блока сравнени груп- 25ствующие д . Второй выход блока срав- пы 74 подключен к первому входу пер-нени группы 83 подключен на вход вого элемента И группы 75, а второй-соответствующего элемента И груп- на вход второго -элемента И группы 75,пы 85, на второй вход которого также на второй и третий входы первого зле-подаетс номер задачи, которой соот- мента И группы 75 подключены второй Qветствует/1 ; сравниваетс в бло- и третий выходы первого регистра .ке сравнени группы 83 с Аср« ВСе но- группы 73, с которых поступают, хра-мера задач, дл которых /l. ° н щиес в нем значени Д и номераступают с выходов соответствующих задачи. Аналогична информаци посту-злёментов группы 85 на первую группу пает на входы второго элемента И -входов дещифратора 43, а все номера группы 75 с выходов второго регистразадач, дл которых Дс/ через группы 73. После сравнени больша соответствующие злементы И группы 84 величина А. со своим номером черезпоступают на первую группу входов де- соответствующий элемент И группы 75шифратора 44. Таким образом, в бло- и элемент ИЛИ группы 76 поступает вке 41 сравнени происходит разбиение первый регистр группы 77, содержимоевсего множества активных задач на которого таким же образом сравнивает-множества дающих I и берупщх с со значением Д. , хран щимс , в тре-1 задач.Blocks 38 and 39 of the arrangement (Fig. 16) The first input register 81 will be operated as follows. Blocked calculated A values from the output in calculating block 56 are calculated, output values from input groups 52 or 53 are received from the input-rap group 82 registers of group 73 with their no-L „to L ,. according to the outputs of the tasks. In the first part of the yearly block 38 of the arrangement, the output of the register stores the value D, and in the register 81 L .r enters the first second — the number of the corresponding task-input of all units of a bit comparison. The value of D., recorded in the first section of group 83, on the second inputs to the input to the register of group 73, the incoming values are from D D to the first input of the first block of / (T1l outputs of the registers of group 82, bit comparison group 74, for the first time the outputs of the blocks of the second second input of which are supplied And j compared to the group 83 are connected to the output of the second register of the group 73; the corresponding elements And if the first value is greater than the second, group 84, the second inputs of which then the pulse appears on the first you are connected the second outputs are corresponding during the comparison block of group 74, into the second register of group 82, which is otherwise on the second. The first is the task number corresponding to the output of the first comparison block grouped. The second output of the block 74 is connected to the first input of the group 83 is connected to the input of the element I of group 75, and the second, the corresponding element AND of the group, the input of the second, element I of group 75, py 85, to the second input of which also the second and third inputs of the first evil element are given the task number, which ment and group 75 are connected to the second Q corresponds to / 1; compared to the block and third outputs of the first register. Comparison of group 83 with Asr "All non-groups 73 from which they receive the store of tasks for which / l. ° The values of D and numbers in it are from the outputs of the corresponding task. Similar information of the post 85 of the group 85 to the first group goes to the inputs of the second element AND inputs of the decryptor 43, and all the numbers 75 from the outputs of the second registrar task for which Dc / through group 73. After comparison, the large corresponding elements And group 84 have the value A. with its number through the input to the first group of inputs, the corresponding element AND of the group 75 of the encoder 44. Thus, the first register of group 77, the contents of the whole set of active tasks, is divided into block OR element 76 of the group 76. and which compares the same set-giving and I with berupschh with AD value stored in the tre-1 task.
тьем входном регистре группы 7i. Та- Формирюватели адреса обмена стракое сравнение производитс до тех ниц группы 57 (фиг. 19) работают слепор , пока не будет найдет максималь-дующим образом.The input register of group 7i. Ta-Formers of the address of the exchange of rapid comparison are made before the group 57 (Fig. 19) work blind, until it finds the maximum-blowing way.
ный элемент f , который с выхода В первый входной регистр 86 поступоследнего регистра группы 77 черезпают число страниц K«, отдаваемоеelement f, which is from the output In the first input register 86 of the last register of the group 77, the number of pages K «given by
соответствующие элементы групп 75i-й задачей и вычисленное в соответи 76 поступает на вход коммутатора 79,ствующем блоке группы 54 по формулеthe corresponding elements of the groups of the 75i-th task and calculated in the corresponding 76 are fed to the input of the switch 79, the unit of the group 54 according to the formula
который пересылает первый А j,, в пер-К Xj- LJ , j е Ij, и номер задачиwhich sends the first A j ,, to the per-K Xj-LJ, j e Ij, and the number of the task
вый выходной регистр пам ти группы 80.берущей страницы. Во второй входнойThe left output memory register of the group of the 80.browser page. In the second entrance
Номер найденного максимального эле-регистр 87 поступает число страницThe number of found maximum register 87 comes the number of pages
мента поступает в дещифратор 78 ад-Kg, принимаемое j-й задачей и вычисреса , сигнал с выхода которого обну-ленное в соответствующем блоке вычисл ет соответствующий входной регистрлёни группы 55 по формуле Kg L. группы 73, в который первоначально sJElg, и номер отдающей задачи.The copier enters ad-Kg decryptor 78, received by the jth task and computed, the signal from the output of which zeroed out in the corresponding block calculates the corresponding input register of group 55 using the formula Kg L. of group 73, in which initially sJElg, and the number tasks.
поступил , Далее процедура по-С выходов регистров 86 и 87 значени entered, then the procedure on-C outputs of registers 86 and 87 values
иска , првтор етс дл оставшихс Kg и К поступают на первый и второйfor the remaining Kg and K are received on the first and second
2113271121132711
ходы блока 88 поразр дного сравнеи . Если K,j Kg, то на первом выхое блока 88 по вл етс сигнал, если g К,, то сигнал по вл етс на втоом выходе блока 88 сравнени , первый выход которого подключен на вход элеента И 89, на другие входы которогоthe moves of block 88 are comparable. If K, j Kg, then a signal appears at the first output of the block 88, if g K ,, then the signal appears at the second output of the comparator block 88, the first output of which is connected to the input of the element And 89, to the other inputs of which
одаютс номер задачи, отдающей страницы , Nj номер задачи, берущей стра- ницы, N,r и значение К, Второй выход блока 88 сравнени подключен на первый вход элемента И 90, на другиеThe number of the task is given, the page is given, Nj is the number of the task that takes the page, N, r and the value K, the second output of the comparison block 88 is connected to the first input of the element I 90, to the others
входы которого подаютс с выходов регистров 86 и 87 Nj, N 36 и Kg, Выхо- g ды элементов И 89 и 90 подключены соответственно на входы регистров 91 и 92 пам ти, выходы которых подключены на соответствующие входы элемента ИЛИ 93, выход которого подключен о к одному из входов первой группы входов деЫифратора 150 блока 10, ., Если Ка больше Kg, то обмен осуществл етс таким образом, чтобы задача, беруща страницы, бьша полностью 25 удовлетворена. В этом случае на первом выходе блока 88 сравнени по вл етс импульс, по которому в регистр 9i через элемент И 89 записываетс адрее обмена в виде ,К, Если зо Kf KQ, ТО ВЫСОКИЙ потенциал по вл етс на втором выходе блока 88 сравнени , и в регистр 92 через элемент И 90 записываетс адрес страничного обмена в виде N. NjjK-, реали-. зующий вариант, когда задача, отдающа страницы, полностью от них освобождаетс ,the inputs of which are supplied from the outputs of registers 86 and 87 Nj, N 36 and Kg, the outputs g of elements AND 89 and 90 are connected respectively to the inputs of memory registers 91 and 92, the outputs of which are connected to the corresponding inputs of the element OR 93, the output of which is connected to one of the inputs of the first group of inputs of the DESIGNER 150 of the block 10,., If Ka is greater than Kg, then the exchange is carried out in such a way that the task, taking the page, is completely 25 satisfied. In this case, a pulse appears at the first output of the comparator 88, which registers the exchange address in the register 9i through the element 89 and the form, K, If kf KQ, THEN the high potential appears at the second output of the comparator 88, and register 92 through the element And 90 writes the address of the page exchange in the form of N. NjjK-, real-. a variant, when a task giving pages is completely free from them,
Блок 1 входных регистров (фиг. 2) предназначен дл формировани полно- го виртуального адреса, работает так же, как и аналогичный блок в устройстве-прототипе , в него дополнитель- но введены выходы 103 и 04 управл ющего регистра 3 дл г аредачи из операционной систе 1ы значений L. (длина i-й задачи в страницах оперативной пам ти), и L, (минима,пьное число страниц дл выполнени i-й задачи).Block 1 of the input registers (Fig. 2) is designed to form a complete virtual address, works in the same way as the similar block in the prototype device, and additionally outputs 103 and 04 of the control register 3 for the switchboard from the operating room are entered into it. a system of L. values (the length of the i-th task in the pages of the RAM), and L, (the minimum number of pages for the i-th task).
Блоки 7 пам ти страниц (фиг. 8) предназначены дл хранени страничной таблицы и обеспечивают возможность ее модификации, каждый из блоков 7 содержит часть этой таблицы, Все блоки пам ти со держат полную страничную таблицу, число строк которой равно числу страниц, которое можно расположить в оперативной пам ти. Строка страничной таблицы описывает единст35Blocks 7 of page memories (Fig. 8) are designed to store a page table and provide the possibility of its modification, each of blocks 7 contains part of this table. All memory blocks contain a full page table, the number of lines of which is equal to the number of pages that can be arranged in RAM. The row of the page table describes the single
4040
4545
5050
5555
5 five
о about
5five
00
5five
00
5five
322322
венную страницу оперативной пам ти. Блоки 7 работают так же, как и соответствующие блоки в устройстве-прототипе . В строку страничной таблицы дополнительно введена группа 106 элементов пам ти, в которых хран тс номера задачS определ ющие прина шеж ность.данной страницы оперативной пам ти к конкретной активной задаче.memory page. Blocks 7 operate in the same way as the corresponding blocks in the prototype device. In the row of the page table, a group of 106 memory elements is additionally introduced, in which task numbers are stored that determine the perfomance of this memory page for a specific active task.
Элемент 106 (фиг, 9) содержит де- шис1)рйтор 164, информационный регистр 165, группу 166 элементов пам ти , коммутатор 167 и работает так же, как и группы элементов пам ти строки страничной таблицы в устройстве-прототипе , В блок 7 введен дополнительный вход, вл ющийс информационным входом элемента пам ти группы 106, подключенный к одному из выходов первой группы выходов.дешифра- тор)а S 50 блока 10 коррекции, дл перезаписи номеров активных задач. Кроме того, введены дополнительные выходы , с элементов пам ти групп 105- 107, подключенные на третий вход блока П управлени страничным обменом, которые служат дл передачи адреса виртуальной машины и виртуальной па- . м ти с элемента 105, адреса номера активной задачиJ к которой относитс страница оперативной пам ти, с элементов группы 106, адреса номера сегмента и номера страницы элементов группы 107, вс перечисленна информаци поступает на вход блока 40 сравнени входных адресов.Element 106 (FIG. 9) contains descis1) rytor 164, information register 165, group 166 of memory elements, switch 167 and works in the same way as groups of memory elements of the row of the page table in the device-prototype. In block 7 is entered an auxiliary input, which is the information input of the memory element of group 106, connected to one of the outputs of the first group of outputs (a decoder) and S 50 of the correction unit 10, for overwriting the numbers of active tasks. In addition, additional outputs have been introduced from the memory elements of the 105-107 groups connected to the third input of the page exchange control unit P, which are used to transmit the address of the virtual machine and the virtual unit. The data from element 105, the address of the active task number to which the operational memory page belongs, from elements of group 106, addresses of segment number and page number of elements of group 107, all the listed information is fed to the input of unit 40 for comparing input addresses.
Блок 5 сравнени (фиг, 5) предназначен дл сравнени виртуальных адресов страниц, постзшающих с вьгходов блока 1 входных регистров, с номерами виртуальных страниц, хран щихс в соответствующих блоках 7 пам ти страниц , и работает так же, как и соот- Бстствующий блок в устройстве-прототипе , в нем дополнительно вьгход компа- - ратора 139 подключён на первый вход блока 11,Comparison unit 5 (FIG. 5) is designed to compare virtual addresses of pages post-entry from block 1 of input registers with virtual page numbers stored in the corresponding blocks of page memory 7, and works in the same way as the corresponding block in device prototype, it additionally has a compiler 139 input connected to the first input of block 11,
Блок 10 коррекции (фиг, 13) предназначен дл занесени информации в элементы пам ти группы 106, 113-115 каждого блока 7 и работает так же как и соответствующий блок в устройстве-прототипе j в него дополнительно введен дешифратор 150 адреса, перва группа входов которого подключена к второму выходу блока 11, а на вторую группу вводов поступает информаци об услови х удалени страниц и частотеCorrection block 10 (FIG. 13) is intended for storing information in the memory elements of groups 106, 113-115 of each block 7 and works in the same way as the corresponding block in device-prototype j, the address decoder 150 is additionally inserted, the first group of inputs of which connected to the second output of block 11, and the second group of inputs receives information about page removal conditions and frequency
их использовани из регистра 116, Выходы дешифратора 150 подключены к соответствующим входам элементов группы 106 номеров задач.using them from register 116, the outputs of the decoder 150 are connected to the corresponding inputs of elements of the group 106 of the numbers of tasks.
Блок 6 местного управлени (фиг, 7 предназначен дл выработки управл ющих сигналов и работает так же, как и соответствующий блок в устройстве- прототипе, в него дополнительно вве- дены элемент И 187, первый пр мой вход которого вл етс дополнительны входом 25 блока 6, второй вход которого вл етс входом 17 блока 6, третий вход которого вл етс входом 22 блока 6, а также элемент И 186 к первому входу которого подключен выход триггера 195, а к второму - выход триггера 194, выход элемента И 186 вл етс дополнительным выходом 32 блока 6.The local control unit 6 (FIG. 7 is designed to generate control signals and operates in the same way as the corresponding block in the prototype device; the element 187 is additionally inserted in it, the first direct input of which is the additional input 25 of block 6 The second input of which is input 17 of block 6, the third input of which is input 22 of block 6, and the element 186 to the first input of which the output of the trigger 195 is connected, and the second of the output of the trigger 194, the output of the element 186 is additional output 32 of block 6.
Генератор 8 расстановки (фиг,10), блок 9 управлени замещением (фиг.11), блок 2 выходных регистров (фиг.З), формирователи 161 и 162 (фиг.4) выполнены так же, как и соответствующие блоки в устройстве-прототипе , и выполн ют те же функции,The arrangement generator 8 (FIG. 10), the replacement control block 9 (FIG. 11), the output registers block 2 (FIG. 3), the drivers 161 and 162 (FIG. 4) are made in the same way as the corresponding blocks in the prototype device , and perform the same functions
Таким образом, при вводе страницы в оперативную пам ть устройство дл управлени виртуальной пам тью реализует следующий алгоритм: при установленном бите ожидани ввода-вывода устанавливаетс адрес требуемой страницы, вводитс требуема виртуальна страница, а затем сбрасываетс бит ожидани ввода-вывода,Thus, when inserting a page into RAM, the device for managing virtual memory implements the following algorithm: with the I / O wait bit set, the address of the required page is entered, the required virtual page is entered, and then the I / O wait bit is cleared
При замещении страницы оперативной пам ти предлагаемое устройство реализует следующий алгоритм: при ус- тановленном бите ожидани ввода-вывода удал етс виртуальна страница из требуемой физической страниць опера- тивной пам ти, устанавливаетс адрес вводимой виртуальной страницы, а затем сбрасываетс бит ввода-вывода.When replacing the RAM page, the proposed device implements the following algorithm: when the I / O wait bit is set, the virtual page is removed from the required physical page of the RAM, the address of the input virtual page is set, and then the I / O bit is reset.
Через определенные промежутки времени под управлением операционной системы выполн етс корректировка битов частоты использовани страниц. Во врем одного цикла вьшолнени процедуры одновременно корректируютс биты частоты использовани страниц в соотЕетствующих строках каждой части страничной таблицы в каждом блоке 7 пам ти страниц.After a certain period of time under the control of the operating system, the bits of the page frequency are adjusted. During one cycle of the procedure, the frequency of use of pages is corrected simultaneously in the corresponding rows of each part of the page table in each block of 7 page memories.
При достижении критического числа сбоев или успешных обращений к оперативной пам ти блок 1I управлени Upon reaching a critical number of failures or successful access to the RAM, control unit 1I
-SQ g o -SQ g o
25 25
gQ gQ
.,, . ,,
о gg about gg
3535
4545
324324
страничным обменом через блок 6 местного управлени формирует прерывание, которое обрабатываетс в операционной системе, при этом в блоке 11 формируютс адреса задач, участвующих в обмене страниц. Сформированные адреса вбмена с выходов соответствующих формирователей адреса группы 57 поступают на первую группу входов дещифра- тора 150 блока 10, на другую группу входов которого поступает информаци об услови х удалени страниц и частоте их использовани из регистра 116. С выхода дешифратора 150 сигналы поступают на входы элементов пам ти группы 106 блока 7, мен ют в них номера задач, к которым принадлежат соответствующие страницы, одновременно обнул ютс счетчик 61 страничных сбоев и счетчик 62 успещных обращений к оперативной пам ти. После окончани одного цикла оптимального перераспределени страниц оперативной пам ти между активными задачами устройство продолжает работать в режиме динамической трансл ции и преобразовани адреса до тех пор, пока снова не будут достигнуты критические значени числа страничных сбоев или успешных обращений к оперативной пам ти .page exchange via block 6, the local control generates an interrupt that is processed in the operating system, while in block 11 addresses of the tasks involved in the exchange of pages are formed. The generated addresses from the outputs of the corresponding shapers of the address of the group 57 are sent to the first group of inputs of the decipher 150 of the block 10, to another group of inputs of which information about the page removal conditions and their frequency of use from the register 116 comes. the memory elements of group 106 of block 7, change in them the numbers of the tasks to which the respective pages belong, simultaneously the counter 61 of page faults and the counter 62 of successive recourses to the main memory are reset. After the end of one cycle of optimal redistribution of pages of RAM between active tasks, the device continues to work in the mode of dynamic translation and address translation until the critical values of the number of page faults or successful access to the RAM memory are reached again.
Таким образом, предлагаемое устройство дл управлени виртуальной пам тью реализует процесс преобразовани адресов с помощью аппаратных средств, а также посто нный учет числа успешных обращений и числа страничных сбоев при обращении к страницам оперативной пам ти, принадлежа- { щим каждой активной задаче, и по этой информации оптимально перераспредел ет страницы оперативной пам ти между активными задачами, что позвол ет в целом сократить число стра- Ничньпс обменов с внешней пам тью и значительно повысить производительность вычислительной системы.Thus, the proposed device for managing virtual memory implements the process of address conversion using hardware, as well as a constant record of the number of successful hits and the number of page failures when accessing the memory pages belonging to each active task, and for this purpose information optimally redistributes memory pages between active tasks, which makes it possible in general to reduce the number of country exchanges with external memory and significantly improve the performance of to computational systems.
Claims (1)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| SU864029267A SU1327113A2 (en) | 1986-02-25 | 1986-02-25 | Apparatus for controlling virtual memory |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| SU864029267A SU1327113A2 (en) | 1986-02-25 | 1986-02-25 | Apparatus for controlling virtual memory |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| SU955076 Addition |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| SU1327113A2 true SU1327113A2 (en) | 1987-07-30 |
Family
ID=21223476
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| SU864029267A SU1327113A2 (en) | 1986-02-25 | 1986-02-25 | Apparatus for controlling virtual memory |
Country Status (1)
| Country | Link |
|---|---|
| SU (1) | SU1327113A2 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| RU2259582C2 (en) * | 2000-12-27 | 2005-08-27 | Интел Корпорейшн | Method for solving conflicts concerning address space between virtual machines monitor and guest operation system |
| RU2263343C2 (en) * | 2002-12-11 | 2005-10-27 | Интел Корпорейшн | Mechanism for controlling external interruptions in virtual machines system |
-
1986
- 1986-02-25 SU SU864029267A patent/SU1327113A2/en active
Non-Patent Citations (1)
| Title |
|---|
| Авторское свидетельство СССР № 955076, кл. G .06 F 12/08, 1980. * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| RU2259582C2 (en) * | 2000-12-27 | 2005-08-27 | Интел Корпорейшн | Method for solving conflicts concerning address space between virtual machines monitor and guest operation system |
| RU2263343C2 (en) * | 2002-12-11 | 2005-10-27 | Интел Корпорейшн | Mechanism for controlling external interruptions in virtual machines system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5204956A (en) | Method and apparatus for monitoring the execution time of a computer program | |
| KR100382395B1 (en) | Methods and devices for storing information in computer memory | |
| EP0284199B1 (en) | Gate processor arrangement for simulation processor system | |
| US5377339A (en) | Computer for simultaneously executing instructions temporarily stored in a cache memory with a corresponding decision result | |
| US4916604A (en) | Cache storage apparatus | |
| SE411404B (en) | INTERIM MEMORY UNIT | |
| CA2549453A1 (en) | Method and apparatus for synchronizing an industrial controller with a redundant controller | |
| EP0223551A2 (en) | Main storage access control system for virtual computing function system | |
| JPH0661068B2 (en) | Memory relocation method and hierarchical storage system | |
| Kohli et al. | A characterization of scalable shared memories | |
| NO810079L (en) | TRANSIT MACHINE - A COMPUTER FOR UNIVERSAL USE | |
| US4385365A (en) | Data shunting and recovering device | |
| EP0077045A2 (en) | Bit pattern generator | |
| SU1327113A2 (en) | Apparatus for controlling virtual memory | |
| DE69323477T2 (en) | Vector processor | |
| Harr et al. | Organization of no. 1 ESS central processor | |
| CN1030654A (en) | Utilize the equipment and the method for access and fault logic signals protection main storage unit | |
| US5737753A (en) | Least recently used block replacement for four block cache logic system | |
| DE68928013T2 (en) | Addressing a microinstruction memory from different sources | |
| Brigh | A Philco multiprocessing system | |
| JPH02308349A (en) | Buffer storage control system | |
| JP3491379B2 (en) | Information processing apparatus and trace information storage method | |
| JPS6233626B2 (en) | ||
| Lee et al. | Rollback propagation detection and performance evaluation of FTMR2M—A Fault-Tolerant Multiprocessor | |
| Boyle | Program behavior and virtual memory management in time-shared computer systems. |