Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
методичка английский.doc
Скачиваний:
13
Добавлен:
21.09.2019
Размер:
675.33 Кб
Скачать

Урок №6 Текст I

To figure out

Вычислять, постигать, разгадывать

To trap

Захватывать

To define

Определять

Definition

________________________

Defining

________________________

Level

Уровень, степень

Current

Ток; текущая запись. Текущий

To store

Запоминать, хранить

Storage

________________________

Significant

Значительный, существенный

Significance

________________________

Value

Ценность, стоимость, оценка, значение

Free

Свободный, вольный, добровольный

Freely

________________________

To set

Устанавливать, монтировать

Set, subset

________________________

Offset

________________________

Flexibility

Гибкий

Task

Задача

To accomplish

Совершать, выполнять, достигать

Bitmask

Битовая маска

Array

Матрица, массив, таблица

To correspond to …

Соответствовать, быть аналогичным чему-либо

Particular

Специфический, особый, частный, детальный, тщательный

To encompass

Окружать, заключать

To hold

Удерживать; выполняться (об условии)

To provide

Обеспечивать, снабжать

To choose

Выбирать, избирать, предпочитать

To assume

Принимать (на себя); предполагать

Permission

Разрешение

Main

Главный, основной

Integer

Целое число

Задание. Просмотрите Текст, подчеркните и отметьте в нем соответствующими цифрами перевод следующих словосочетаний, которые могут использоваться профессиональном разговоре:

  1. сам по себе

  2. попытка обращения к порту ввода/вывода

  3. для полного доступа в режиме ядра

  4. текущий уровень привилегий

  5. в числовом отношении больше

  6. при совершении попытки обращения к порту

  7. обращение к порту в пользовательском режиме

  8. достигает этого, используя

  9. исключительная ситуация возникает

  10. когда бы ни предпринималась попытка обращения к соответствующему порту

  11. длиной 8192 байт

  12. существует даже гибкость в том, сколько

  13. вы можете выбрать, не предоставлять

  14. массив, называемый

  15. в специальном сегменте, на который ссылается селектор сегмента

Accomplishing I/O Protection in NT

То figure out how to grant I/O access to a user mode p> you have to understand how I/O protection is imple­mented in Windows NT. NT doesn't actually implement the I/O protection on its own. Since the CPU can tempted I/O port access, NT depends on this feature. The first mechanism that must be understood is the privi­lege-level system used by the 80x86 processors. Four privileged levels are defined by the processor - 0, 1, 2, and 3 - and the CPU always operates at one of these levels. The most privileged level is 0; the least privi­leged, 3. NT uses only levels 0 and 3. Privilege level 0 is used for the full-access kernel mode and 3 for the more-restrictive user mode. The current privilege level (CPL) of the processor is stored in the two least-significant bits of the CS (code segment) register.

Rather than statically defining which privilege rev­els can have I/O access, the CPU defines an I/O privi­lege level (IOPL) value, which is compared against the CPL to determine if I/O instructions can be used freely. The IOPL is stored in two bits, of the processor's EFLAGS register. Any process with a CPL that is numerically greater than the IOPL must go through the I/O protection mechanism when attempting port I/O access. Because the IOPL cannot be less than 0, programs running at privilege level 0 (like kernel-mode device drivers) will always have direct port I/O access. NT sets the IOPL to 0. User-mode code always has a CPL of 3, which is larger than the IOPL. Therefore, user-mode port I/О access attempts must go through the' protection mecha­nism. Determining if CPL>IOPL is the first step in the protection mechanism. I/O protection is not all-or-noth­ing. The processor uses a flexible mechanism that allows the operating system to grant direct access to any sub­set of I/O ports on a task-by-task basis.

The CPU accomplishes this by using a bitmask array, where each bit corresponds to an I/O port. If the bit is a 1, access is disallowed and an exception occurs when-ever access to the corresponding port is attempted. If the bit is a 0, direct and unhampered access is granted to that particular port. The I/O address space of the 80x86 processors encompasses 65,536 8-bit ports. The bitmask array islkl92 (0x2000) bytes long since the bitmask array is packed so that each byte holds eight bits of the array. There is even flexibility in how much of the bitmask array must be provided. You can provide anywhere from 0 to the full 8192 bytes of the table. The table always starts from I/O address 0, but you can choose not to provide the bitmask for upper I/O addresses. Any part of the bitmask that you do not provide is assumed to be 1, and therefore, access is not granted to those ports.

The bitmask array, called the I/O Permission bit Map (IOPM), is stored in the Task State Segment (TSS) struc­ture in main memory, which is contained/Jin a special, segment referenced by the segment selector in the proc­essor's Task Register (TR). The location of the IOPM within the TSS is flexible. The offset of the IOPM within the TSS is stored in a 2-byte integer at location 0x66 in the TSS.