Главная » Просмотр файлов » Smartphone Operating System

Smartphone Operating System (779883), страница 43

Файл №779883 Smartphone Operating System (Symbian Books) 43 страницаSmartphone Operating System (779883) страница 432018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 43)

Protocols are the language of request and service,providing methods to communicate that provide for accurate and errorcontrolled delivery of data. A protocol can be seen as an agreementbetween two parties: when one side does something, the other sideknows how to respond because both are abiding by a set of rules.The Small Computer Systems Interface (SCSI) bus in a computer systemis a good example here. The SCSI bus is connected to several SCSI devicesat the same time.

Each device has a SCSI controller that knows how touse the SCSI protocol to communicate with the SCSI device driver forthe operating system. This SCSI protocol is very complicated. The SCSIbus has a certain type of design that accommodates this complexity.

Thisdesign differentiates it from the other buses in a computer system.It is interesting to note that, as with the SCSI example, some devicedrivers are tuned to the bus protocol rather than the device they arecontrolling. In the SCSI example, all devices that connect to the SCSI buswork with the SCSI protocol. This means that device drivers can workwith that protocol too, rather than with each individual device. This canbe called a physical-device abstraction to logical device.1Sometimes the operating system provides the driver. This happens when standardsare clear and devices adhere to these standards.

The USB mass storage driver of MicrosoftWindows is an example of this.I/O HARDWARE ISSUES2019.2 I/O Hardware IssuesA computer works with a large number of devices. These generally fit intoseveral categories: storage devices, communication devices, interfacedevices and display devices. Devices that do not fit into these categoriestend to be specialized, such as data-gathering equipment or automobilemonitoring devices. It is typical of a computer to control these devicesusing a standard interface and a set of generalized commands.

Even withall this variety in hardware, just a few hardware concepts are needed tounderstand how hardware interacts with an operating system.General Device CommunicationAs discussed in Section 9.1, operating systems communicate with devicesthrough buses that connect components from device driver to devicecontroller. A general bus structure is shown in Figure 9.2.A device is connected to a computer system through a bus, but canbe connected to that bus in several ways. A device could be connectedUSB busDeviceScreen displayDeviceCPUDeviceCacheGraphicscontrollerBridge/memorycontrollerMemoryUSB controllerPCI BusIDE controllerExpansion businterfaceexpansion busDiskDiskCD-ROMParallel portSerial portFigure 9.2 Generic I/O bus structureKeyboard202INPUT AND OUTPUTdirectly by being plugged into the bus through a slot on the computer’smotherboard.

This is typical of desktop and server systems. Other devicesare connected through a cable, plugged into a port, or open receiver,on the computer. Others are connected wirelessly, for example, throughBluetooth technology. Sometimes devices can even be daisy-chainedtogether, when one device is connected to another, which is connectedto a third and so forth. Eventually one device in the chain must beconnected to a computer.Communication is initiated by a controller and destined for the operating system or by the operating system and destined for a device througha controller.

A simple way that these communications are passed on isthrough registers. Communication bits and bytes are passed through avariety of registers:• the status register contains a set of bits that are read by both thecomputer and the bus controller; the bits indicate states such aswhether a data transfer is completed or whether there has been adevice error• the control register is used to control the data exchange process; whenit contains data, that data is in the form of a command which usuallyamounts to ‘read’ or ‘status’, but bits can also be set to indicate howdata is to be transferred• the data-in register is read by the operating system to get input datafrom devices• the data-out register is written to by the operating system to pass datato a device.Data registers are typically between one and four bytes long.

Somedevice controllers can hold buffers full of data waiting to be sent throughthese registers to the operating system. The registers are situated eitherin dedicated I/O space in the CPU or in the main memory. This lattersituation is called memory-mapped I/O. In this implementation, the CPUwrites or reads data to or from the dedicated address or range of addressesof the main memory space.Device controllers also send data to operating systems throughmemory-mapped I/O. Memory-mapped I/O uses the register idea but,instead of registers, memory on the processor is used.

When the CPUsends an I/O request, it uses standard registers to issue the request but thedata ends up in main memory.I/O HARDWARE ISSUES203These two methods are adequate for small amounts of data but, forlarger amounts of data, they require too much movement of data oncethe data has left the bus. The direct-memory access (DMA) approachallows the bus controller to access memory directly and to signal to theoperating system when the I/O operation is complete. All I/O functionshappen through memory: from initiation of an I/O operation to the arrivalof data and the signaling of operation completion. DMA allows theoperating system to service other needs and only attend to data when itis signaled.DMA works with system resources and shares them with the CPU. Itaccesses main memory just as the processor does.

Occasionally, DMAdata transfer takes over a resource – for data transfer over the bus, forexample, or for depositing data in memory. In these cases, the CPU cannotuse the resource while it is in use for DMA. This artifact of DMA is calledcycle stealing and it can slow down access to computer resources.

In thefirst, conventional DMA cycle, the data transfer uses the bus to transferall data from or to memory without CPU attention. Since the system busis in use, the CPU does no external operations. In the cycle-stealing DMAtransfer, the system can use those CPU cycles where the CPU does nottransfer any data to or from the memory on the system bus. The bus cyclesare stolen from the CPU and used by the DMA controller to transfer data.PollingTo facilitate the transfer of data, the operating system must pay attentionto the transfer system. For systems using registers and memory access, thisattention amounts to a constant monitoring, a checking that continuallywatches components in the system and reacts to changes in system states.This constant monitoring is called polling.Polling happens with the register method of data transfer by monitoringthe bits in the status register.

There is usually a bit, called the busy bit,that indicates that data is in the process of being transferred. When thatbit clears, the data is completely transferred. Note that, because theprocessor operates at a speed faster than the data transfer, it is likely thatthe operating system does a lot of checking before the data transfer iscomplete. Polling happens on both sides with the register method.

Thebus controller polls the status register and reacts to various settings. Forexample, there is typically a command-ready bit that indicates that acommand is waiting in the control register for the bus controller to use.In the memory-mapped I/O method, polling still takes place. Onemight think that the use of memory would mean that registers are not204INPUT AND OUTPUTused.

However, only the data itself is placed in memory, not the commandand status registers. Therefore, the operating system must continually pollthe register set.Polling is usually detrimental to system performance. The constantchecking of the operating system must be woven into cycles that the operating system goes through to switch the context of processes. Checking isdone regardless of the state of the registers and regardless of whether a datatransfer is actually taking place. This constant checking, including uselesschecking of empty registers, drags down the performance of a system.Direct-memory access avoids the polling penalty.

An operating systemusing DMA does not have to poll but instead waits on devices to inform itwhen data is ready. This frees up the operating system to attend to otherthings and operations such as context switching get more attention and,hence, run faster. Data transfer is attended to when the bus controllersignals that data is ready.InterruptsSeveral of the operations mentioned above rely on some sort of signalingbetween devices and the operating system. This interrupt mechanism isan important part of operating system implementation.Interrupts usually work through a dedicated hardware wire calledthe interrupt-request line.

Характеристики

Тип файла
PDF-файл
Размер
1,2 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6358
Авторов
на СтудИзбе
311
Средний доход
с одного платного файла
Обучение Подробнее