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

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

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

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

There is often specialspace, called virtual memory, on the backing store allocated for this kindof page replacement. Virtual memory extends actual memory onto thechosen backing store. Because of the number of executing processes ona computer system, the size of virtual memory is often several times thatof actual memory.1As pages are replaced in memory, the criteria that are used toselect which pages get replaced often affect a computer’s performance.1It is interesting to note here that even virtual memory is limited by a computer’s memoryword size. Virtual memory is referenced through addresses stored in memory words, so thesize of memory words determine the amount of addressable virtual memory. For a 32-bitmemory work, that number is approximately 4 GB.152MEMORY MANAGEMENTExcessive page swapping – a condition called thrashing – is very bad forperformance: the entire time slice devoted to a process can be taken upwith disk I/O.

The choice of page to be replaced can be done many ways,including the few examples below:• oldest first : the page that has been in memory the longest is chosenfor replacement; while this may make some intuitive sense, this isoften a poor choice because it ignores how often memory in the pageused; often the oldest pages in memory are those of shared librariesthat are used by all processes• least frequently used (LFU) : a page that has not had much use ischosen for replacement; the assumption is that the page will continuenot to get much use; the operating system must also keep track of thelength of time that a page has been in memory and be careful not toselect pages that have just been added• least recently used (LRU) : the page that was used longest ago ischosen for replacement; this assumes that a page that has not beenused for a long time will continue not to be used.Hardware can be relied on in many ways to assist with paging andvirtual memory.

First, while the page table is usually kept in memory, theMMU usually keeps a pointer to the page table in a special register calledthe page-table base register. Maintaining this register allows the operatingsystem to place the page table anywhere in memory (in keeping withpaging) and the MMU to track the page table. With paging hardware,memory is accessed as shown in Figure 7.6. The logical-page portion isreplaced by the physical-page portion from the page table. Even withhardware assistance, the sequence shown in Figure 7.6 requires twophysical-memory accesses for every one logical-memory reference. Thisdoubles the memory access time.Translation look-aside bufferAs a solution to this problem, MMUs often employ the use of a translationlook-aside buffer (TLB). The TLB is a piece of very fast, associativememory, capable of searching many areas of memory simultaneously.This means that many table entries can be searched at the same time fora logical-page entry.

This type of memory is very expensive which meansthat not much of it is used; MMUs usually use TLBs with between 64 andSWAPPING AND PAGING153MemoryCPUPageOffsetPageOffsetPage tablePhysicalpageFigure 7.6Paging hardware assembling a physical address1024 entries.

The TLB fills up with recent searches; when a search is notsuccessful, the entries are added. Note that TLBs store only part of a pagetable’s entries, because the memory is expensive and limited.A new page table causes all the entries stored in the TLB to becomeuseless. When a new page table is used – for example, on a contextswitch – the TLB entries must be erased to make sure the new process’s logical-address space maps to the old process’s physical-addressspace.Swap-space configurationThe configuration of swap space and how big it should be are challengingissues.

In Unix systems, it is typical to set up an entire partition of the diskfor virtual memory. In addition, should the initial partition not be enough,Unix allows files to be added as swap space. Microsoft Windows sets upan area (like a file) on a disk drive and constantly monitors the space forthe user. If that space needs to be increased, Microsoft Windows does itautomatically – up to a certain boundary.While it is hard to set rules for swap-space size, system administratorstypically use a rule of thumb that swap space should be at least threetimes the size of memory.ProtectionWith all the paging and replacing that goes on, it might be easy to forgetthat there needs to be protective barriers thrown up around memory154MEMORY MANAGEMENTpages.

We need to prevent code from straying beyond the boundaries ofits pages. Our scheme must embrace the swapping and paging ideas wehave developed.Protection in a paged environment must focus on physical-memoryframes. Since every memory reference goes through the page table toreference frames, we can add protection bits for frames and store themin the page table. These bits can give certain properties for frames: readonly or read–write. For further protection, we can add an execute bit.To support paging, we can add a valid–invalid bit, which indicates if thepage being accessed is actually in memory.Note that these protection schemes are focused on the page table.Property bits are the easiest way to provide protection.

When logical-tophysical translation is taking place, the nature and owner of the requestis also analyzed. If the process that issues the address is not the processthat owns the page or if the requested operation is something that is notpermitted by the access bits, the attempt is ruled illegal and the operatingsystem is notified.The valid–invalid bit is set when paging occurs. If the bit is set toinvalid, this means the page has been swapped to virtual memory and apage fault should be triggered.7.3 Systems Without Virtual MemoryMany computer systems do not have the facilities to provide virtualmemory. Consider a smartphone.

The only storage available to theoperating system is memory; most phones do not come with a disk drive.Because of this, most smaller systems – from PDAs to smartphones tohigher-level handheld devices – do not utilize virtual memory in theirmemory-management strategy.Consider the memory space used in most small-platform devices.Typically, these systems have two types of storage: RAM and flashmemory. RAM stores the operating system code (to be used when thesystem boots); flash memory is used for both operating memory andpermanent storage.

Often, it is permissible to add extra flash memory toa device – such as a Secure Digital card, for example – and this memoryis used exclusively for permanent storage.In most cases, the absence of virtual memory does not mean theabsence of memory management. In fact, most smaller platforms arebuilt on hardware that includes many of the management features ofSYSTEMS WITHOUT VIRTUAL MEMORY155larger systems. This includes features such as paging, address translation,and logical–physical address abstraction.

The absence of virtual memorysimply means that pages cannot be swapped. The abstraction of memorypages is still used; pages are replaced, but the page being replaced isdiscarded and not recorded.Because of this, the absence of virtual memory does mean that caremust be taken to preserve memory and to optimize its use. There are stepsthat smaller systems take to ensure that memory is efficiently managed.• Management of application size : memory management begins withapplications.

The size of an application – from the code that theapplication needs to the memory areas that must be allocated for theiruse – have a strong effect on how memory is used. It requires skilland discipline to create small software and the attitude of developersis an obstacle. The push to use object-oriented design can also be anobstacle here (more objects means more dynamic-memory allocationwhich means larger heap sizes).

Most operating systems for smallerplatforms heavily discourage static linking of modules.• Heap management : the heap – the space for dynamic memory allocation – must be managed very tightly on a smaller platform. Heapspace is typically bounded on smaller platforms to force programmersto reclaim and reuse heap space as much as possible. Venturingbeyond the boundaries results in errors in memory allocation.• Execution in-place : platforms with no disk drives usually supportexecution in-place. Applications execute in memory without beingmoved from storage to operating memory. Since permanent storage ismemory, this can be accomplished easily.

Performance benefits fromzero loading time, but also from the contiguousness of memory pages.In addition, there is no need to swap or replace memory pages.• Loading of DLLs : the choice of when to load DLLs can affect the perception of system performance. Loading all DLLs when an applicationis first loaded into memory, for example, is more acceptable thanloading them at sporadic times during execution. Users better acceptlag time in loading an application than delays in execution.

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

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

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

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