- •Введение
- •Методические рекомендации студентам для работы с техническим текстом
- •Методические рекомендации студентам для работы со словарём
- •Урок №1 Текст I
- •Текст II
- •Текст III
- •Текст IV
- •Урок №2 Текст I
- •Текст II
- •Текст III
- •Текст V
- •Текст VI
- •Текст VII
- •Урок №3 Текст I
- •Урок №4 Текст I
- •Текст II
- •Текст III
- •Текст IV
- •Урок №5 Текст I
- •Урок №6 Текст I
- •Урок №7 Текст I
- •Текст II
- •Урок №8 Текст I
- •Текст II
- •Урок №9 Текст I
- •Текст II
- •Текст III
- •Урок №10 Текст I
- •Текст II
- •Урок №11 Текст I
- •Содержание
Урок №5 Текст I
Feature |
Черта, характеристика |
Acquisition |
Приобретение, сбор |
To allow |
Позволять |
To implement |
Воплощать, реализовывать, вводить |
Implementation |
_______________________________ |
To insert |
Вводить, вставлять |
Insertion |
_______________________________ |
Exception |
Исключение |
Exceptionally |
_______________________________ |
To terminate |
Завершать (цикл), выходить (из цикла) |
Terminal |
_______________________________ |
Terminating |
_______________________________ |
To debug |
Налаживать, отлаживать, устранять (неполадки) |
Debugging |
_______________________________ |
Bug |
Ошибка, дефект, помеха |
Buggy |
_______________________________ |
To attempt |
Пытаться, пробовать, делать попытку |
Attempt |
_______________________________ |
To restrict |
Ограничивать |
Unrestricted |
_______________________________ |
Interrupt |
Прерывать, прерывание |
Trash |
Хлам, мусор, отбросы |
To trash |
_______________________________ |
Intention |
Намерение |
Unintentionally |
_______________________________ |
Via |
Через |
To trust |
Доверять(ся), полагать(ся0 |
Trusted |
Проверенный |
Piece |
Кусок, участок |
Entire |
Целый, весь |
Blessing |
Благо, благословение |
Curse |
Проклятие, ругательство, бич |
Generally |
В целом |
To shake |
Трясти(сь), поколебать |
Adversely |
Враждебно, неблагоприятно, вредно |
Adverse |
_______________________________ |
To prevent |
Препятствовать, предотвращать |
Sprinkling |
Разбрасывающий |
To verify |
Контролировать |
To consume |
Контролировать, проверять, сличать |
Consuming |
Потреблять |
Costly time-consuming |
Дорогостоящий по затратам времени |
Задание №1. Просмотрите Текст, подчеркните и отметьте цифрами перевод данных сочетаний, которые могут использоваться в профессиональном разговоре:
позволяют вам читать из или записывать в
вы не получаете исключения
работать таким (подобным) образом
(это) было бы слишком рискованно позволить
вся системная память
с одной стороны
с другой стороны
целый (весь) день напролет
без неблагоприятного воздействия одного на другое
предохраняет (оберегает) вас от
относительно большое количество времени
когда бы вы ни захотели (сделать что-то)
это может занять
зачем вам вообще нужно (делать что-то)
это могло бы облегчить дело
один из моих любимых
чтобы сделать это, вам нужно установить
приемлемый (принятый) способ достигнуть этого
быстрый просмотр (через)
это было бесполезно для
мне нужен был лучший способ
Задание №2. Просмотрите Текст и определите, какой из планов ему соответствует. Планы сначала переведите:
I. Possibilities of port I/O instructions. The way NT is supposed to work. The restriction on I/O port access. The way to put I/O instructions. An accepted way to achieve direct, user-mode port I/O in NT. |
II. Debugging the offending applications The NT architects. Exceptionally stable NT. Writing a device driver. Using PORTIO. |
Direct Port I/O and Windows NT
Undocumented features fo direct control of hardware devices.
|
By Dale Roberts. Dale works with data acquisition and con trol software at the Vestibu lar Laboratory of the Johns Hopkins University School of Medicine. He can be reached at roberts@ishtar.med.jhu.edu. |
Port 1/0 instructions allow all 80x86 CPUs to communicate with other hardware devices in the system. For low-level, direct control of a hardware device, the С functions _inp() and _out() (implemented using the 80x86 processor's IN arid OUT instructions let you read from or write to and I/O port. However, inserting _inp () or _out() in a Windows NT application gives you a privileged-instruction exception message and the option of terminating or debugging the offending app. If you attempt port I/O from a 16-bit DOS app in an NT console window, the I/O is either ignored or emulated by NT's virtual device drivers -you don't get an exception.
But you don't get the direct I/O either.
This isn't a bug, NT is supposed to work this way. The NT architects decided that it would be too risky to allow applications to directly access the system hardware. With unrestricted I/O access an application could turn off all interrupts, take over the system, and trash the display or the hard drive. A buggy program could unintentionally do the same. NT's architecture requires that all hardware be accessed via kernel-mode device drivers - special, trusted pieces of software that essentially become part of the operating system when loaded. These device drivers have complete access to entire system memory a11 hardware devices, and all privileged processor instructions. In contrast, applications run in user mode, where they have restricted access to memory - and where the' CPU can't execute certain privileged operating-system instructions, including I/O instructions.!
The restriction on I/O port access is both a blessing and a curse. .On one hand, it makes NT exceptionally stable. Generally, application programmers can write and crash and debug programs all day long without shaking NT. Several applications can run without adversely affecting one another. On the other hand, I/O restrictions prevent you from, communicating directly and quickly with the hardware without taking the relatively large amount of time required for a call to a device driver. Whenever you want to communicate with a device driver, you must seлd a request through NT's I/O subsystem. This can take about 30 clock cycles.
Why would you ever need to put I/O instructions in user mode code? When writing a device driver it might make things easier if you could write a quick program to interact with the device, sprinkling printt()s and getchar()s among port I/O instructions so that you could verify that you are driving the device correctly before you put the code into an actual device driver and chance a system lockup. Or you may want to write a portion of a driver in a user-mode DLL (as with video drivers, for instance) to achieve a desired level of performance. One of my favorite uses of I/O is for using an oscilloscope to debug programs and time sections of code. To do this, you need to set and clear a bit in a digital output port and monitor the voltage on a scope.
Since-direct, user-mode port I/O in NT seems so user ful, you'd think there would be an accepted way to achieve it. A quick look through the sample source code in the Windows NT Device Driver Kit (DDK) reveals a program called «PORTIO». Initially, I thought this would provide direct port I/O from an app. However, PORTIO is merely an example showing how to use Win32 DeviceloControl() calls to kernel-mode device driver, which implements the actual I/O. Using PORTIO, each I/O operation requires a costly, time-consuming call to the device driver. This was useless for my oscilloscope timings. l needed a "better way.