Главная » Просмотр файлов » Concepts with Symbian OS

Concepts with Symbian OS (779878), страница 45

Файл №779878 Concepts with Symbian OS (Symbian Books) 45 страницаConcepts with Symbian OS (779878) страница 452018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

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

DMA hardware consists of a controllerthat controls a set of DMA channels. Each channel provides a singledirection of communication between memory and a device. Using theDMA hardware, bidirectional transmission of data requires two DMAchannels. At least one pair of DMA channels is dedicated to the screenLCD controller. In addition, most platforms provide a certain numberof general DMA channels.

Once data has been transferred, a systeminterrupt is triggered.The DMA service provided by DMA hardware is used by the PDD – thepart of the device driver that interfaces with the hardware. Between thePDD and the DMA controller, Symbian OS implements two layers ofsoftware. There is the software DMA layer and a kernel extension thatinterfaces with the DMA hardware. The DMA layer is itself split into aplatform-independent layer and a platform-dependent layer.

As a kernelextension, the DMA layer is one of the first device drivers to be startedby the kernel during the boot procedure.Support for DMA is complicated for a special reason. Symbian OSsupports many different hardware configurations and no single DMAconfiguration can be assumed. The interface to the DMA hardware is standardized across platforms, and is supplied in the platform-independentlayer. The platform-dependent layer and the kernel extension are suppliedby the manufacturer, thus treating the DMA hardware in the same waythat Symbian OS treats any other device: with a device driver in LDDand PDD components. Since the DMA hardware is viewed as a devicein its own right, this way of implementing support makes sense becauseit parallels the way Symbian OS supports all devices.Storage MediaMedia drivers are a special form of PDD that are used exclusively bythe file server to implement access to storage media devices.

Becausesmartphones can contain both fixed and removable media, the mediadrivers must recognize and support a variety of storage. Symbian OS212INPUT AND OUTPUTsupport for storage media includes a standard LDD and an interface APIfor users. The file server in Symbian OS can support up to 26 differentdrives at the same time. Local drives are distinguished by their driveletter.Some Last NotesSymbian OS deals with blocking I/O in an interesting way. The designersrealized that the weight of all threads waiting on I/O events affects theother threads in the system. To alleviate this, and to enable other things tobe done, Symbian OS provides active objects. These specialized threads,covered in detail in Chapter 4, allow blocking I/O calls to be handledby the operating system, rather than the process itself.

Active objects canbe coordinated by a single scheduler implemented in a single thread.By combining code, which would otherwise be implemented as multiplethreads, into one thread, by building fixed entry points into the code, andby using a single scheduler to coordinate their execution, active objectsform an efficient and lightweight version of standard threads.When the active object uses a blocking I/O call, it signals the operatingsystem and suspends itself. When the blocking call completes, the operating system ‘wakes up’ the suspended process and that process continuesexecution as if a function had returned with data. The difference is oneof perspective for the active object.

It cannot call a function and expecta return value. It must call a special function and let that function setup the blocking I/O, but return immediately. The operating system takesover the waiting.Removable media poses an interesting dilemma for operating systemdesigners. When a Secure Digital card is inserted in its reader slot, it is adevice just like all others. It needs a controller, a driver, a bus structure,and probably communicates with the CPU through DMA. However, thefact that the user can remove the card is a serious problem to this devicemodel: how does the operating system detect insertion and removal andhow should the model accommodate the absence of a media card? Toget even more complicated, some device slots can accommodate morethan one kind of device (e.g., an SD card, a miniSD card (with an adapter)and a MultiMediaCard all use the same kind of slot).Symbian OS starts its implementation of removable media with theirsimilarities:• all removable media can be inserted and removedSUMMARY213• all removable media can be removed ‘hot’, that is, while it is beingused• each medium can report its capabilities• incompatible cards must be rejected• each card needs power.To support removable media, Symbian OS provides software controllers that control each supported card.

The controllers talk to devicedrivers for each card, also in software. A socket object is created when acard is inserted and this object forms the channel over which data flows.To accommodate the changes in the card’s state, Symbian OS providesa series of events that occur when state changes happen. Figure 9.3shows the states that are possible with media cards. Device drivers areconfigured like active objects to listen for and respond to these events.9.5 SummaryThis chapter has provided an overview of issues for operating systemsregarding input and output. We started by looking at three basic units:controllers, device drivers and buses. We took a hard look at hardwareissues, then software issues.

We wrapped up the chapter by looking athow Symbian OS deals with devices.Power-off event(standby, low batteryturned off)No cardpresentCard is insertedPower-off event(standby, low batteryturned off)Card is off(no power)Power-up happenswhen computeris in standbyPower-upoccursPower ispendingCard is on(powered)Power-upsuccessfulCard ispowering upComputer leavesstandby modeExcessive orincompatiblepower consumptionFaultFigure 9.3 Possible power states of removable media on Symbian OS214INPUT AND OUTPUTExercises1.Evaluate the advantages of using the three-part structure we discussed: device driver, controller and bus.

Give at least two advantages and two disadvantages.2.Consider the following I/O scenarios and describe the role ofbuffering, caching and spooling in each of them:• mouse with a graphical user interface• keyboard• hard disk drive with user files• USB flash drive• graphics card directly plugged into a bus.3.Describe the sequence that takes place when an operating systemwants to write one 1024-byte block to a disk drive. Use the threemethods we discussed: direct, memory-mapped and direct-memoryaccess.4.Give three specific scenarios when blocking I/O should be used.5.Give three specific scenarios when blocking I/O should not be used.6.Why would you not want to use polling to manage a keyboard?7.We mentioned in the chapter that interrupts are polled in thefetch–execute cycle of the processor.

Is this the only place forthem? Could you poll for interrupts after context switching?8.What would be the advantage of ignoring interrupts from devices?Would we ever want to do this?9.Does DMA increase or decrease system concurrency? Why?10.In Symbian OS, kernel extensions are special device drivers.

Whatis special about them? Why must they be treated specially?10NetworksCommunication is a powerful tool. People who seem very productivealone are empowered when they communicate with others. Communication enhances and expands the ways people work. The ability to talkand interact with others is a very effective tool.It is like this with computers and networks. By themselves, computersare powerful and can do many effective tasks. When they communicatewith other computers over a network, however, the potential of computersgrows and communication enhances and extends their effectiveness.Operating systems that embrace networking extend their reach andenable users to use more resources to their advantage.In this chapter, we examine how networks extend the effectiveness ofoperating systems with respect to CPU processing, memory, file systems,and I/O.

We conclude the chapter by taking a specific example fromSymbian OS.10.1Opening a Closed EnvironmentIn a closed environment, with no network, computers depend only ontheir own components and have no opportunities to use or cooperatewith other computers.The components that a computer uses are the ones we have discussedin this book as needing management by an operating system. The CPUand execution capability, memory, data storage media, and I/O all needmanagement if they are to be shared between users and processes that216NETWORKSeach want exclusive access. We have spent much time so far in this bookon describing ways to adequately share these resources.Let’s review the needs that we have seen for these components.Managing the CPU has required us to invent the concept of a processand to build the idea of movement through process states.

We havediscussed various features of processes, including the ability to communicate between processes and the need for processes to share the CPUthrough the use of a scheduler.The use of memory has brought us ideas of how to share that memorywith processes. Concepts of logical and physical memory, memory pages,and demand-driven virtual-memory paging are all attempts to share memory appropriately and fairly. We have discussed the protection of memoryareas as necessary when more than one process leaves its data in memory.The need for and use of data storage has caused designers to inventconcepts for its management.

Files were invented as the basic unitof storage; directories were invented to organize files on a storagemedium. File systems have evolved as ways to organize and maintain theinformation about files and directories and to manage access to those filesand directories. File systems are implemented by enabling direct accessto the storage medium.Input/output concepts have developed to address the need for computers to accept, produce and display data. The sheer number of I/O devicesand the speed differential between these devices and the CPU has madeabstraction a necessary tool in the handling of I/O. Device drivers anddevice controllers allow us to isolate the important workings of a deviceinto a standardized interface while implementing that interface in waystailored to each device.As we have developed ways for operating systems to address thesecomponents, there are several common threads that have stood out.Abstraction is a concept used on many levels in an operating system.The presentation of only those details that are needed, coupled with thehiding of implementations that do not address the user’s needs has beena hallmark of operating system design.

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

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

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

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