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

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

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

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

It is, rather, more prudent toplace pieces of a file wherever they may fit and link the pieces togethersomehow so the file-system implementation can put them together whilereading data from the pieces.Working with linked file space requires having access to the linkageinformation. In some systems, the linkage information can be kept withthe file table.

Other systems store link information with each piece of afile on a storage medium. In these cases, the file looks like a linked list,and working through the contents of a file means traversing a linked listfrom front to back.Sometimes a compromise is made between contiguous allocation andlinked allocation. File blocks can be put contiguously together in clustersand the clusters can be strung together to allow flexibility in file growthand allocation.

A cluster is usually a group of disk sectors, which containthe file blocks. The size of a cluster is determined when the file system iscreated and remains constant over that file system.A slight variation on the method of keeping link information in a fileis the indexed approach. In the indexed approach, the address of thefirst pieces of a file is stored in the file table.

The address on the storagemedium of each piece of a file is stored in the file table as an index, anaddress relative to the base address of the file. Sometimes, if the file islarge, the index entries are stored as the first file block on the storagemedium and the entry in the FCB points to this block.We must deal with fragmentation issues when we split the storage into fixed-size blocks. All the above schemes suffer from internal182FILE SYSTEMS AND STORAGEfragmentation: files are seldom exactly the size that fits into a specificnumber of fixed blocks.

There is usually space within a block that iswasted. External fragmentation is the space wasted outside the collection of blocks. If a fixed-block scheme is used, external fragmentation iseliminated as the storage medium is carved up into blocks that fit exactly.From time to time, it is a good idea to defragment storage media.Defragmenting has nothing to do with internal or external fragmentation;it is focused on the wide dispersion of the blocks belonging to filecontent across a storage medium. The closer a file’s blocks are, the lessmechanical wear occurs from trying to move all over a medium to readthe blocks.

Defragmentation moves the blocks of all files so that they areas close to each other as possible, hopefully adjacent to one another.Free space and bad blocksIn addition to file content, there are two other types of blocks on astorage medium. Free space is space available for allocation to files andis made available when files are deleted.

Because of block-allocationpatterns, free space comes available in blocks that are scattered all overthe medium. These blocks must be accessible when space is needed andtherefore are usually linked together using the same methods used to linkfile blocks together. Contiguous or linked methods apply to free blocksas well.Occasionally, a block ‘goes bad’ – becomes damaged in some wayso that it is unusable. A bad block can simply be avoided on a storagemedium. As with file blocks and free space, bad blocks are usually linkedtogether so they can be found and avoided.FAT and VFAT File SystemsWhen Microsoft developed the first operating system to run on IBMhardware, it needed to invent a file system for the computer’s hard drives.In 1977, the FAT file system debuted on IBM PCs using the MicrosoftDisk Basic system.

This first file system – called the FAT file system forits use of a file-allocation table – is still in use, in more evolved forms, inmodern versions of Microsoft Windows. The FAT file system is also usefor most mobile media storage (for example, compact flash or multimediacards).The initial version of the FAT file system is called FAT12. This firstversion was very simple and restricted: no support for hierarchical directories, disk addresses were 12 bits long and the disk size was stored asIMPLEMENTATION OF A FILE SYSTEM183a 16-bit count of disk sectors, which limited the size to 32 MB.

Themaximum size of a partition was 32 MB.The release of MS-DOS 2.0 occurred at the beginning of 1983.This version of FAT12 introduced hierarchical directories. The use ofdirectories allowed FAT12 to store many more files on the hard disk,as the maximum number of files was no longer constrained by the rootdirectory size. This number could now be equal to the number of clusters(or even greater, using zero-sized files).

The format of the FAT itself didnot change. The 10 MB hard disk on the PC XT had 4 KB clusters. If a20 MB hard disk was later installed and formatted with MS-DOS 2.0, theresultant cluster size would be 8 KB, the boundary at 15.9 MB.In 1988, with the release of MS-DOS 4.0, the FAT16 file system wasfinalized. In this file system, the disk address was now 16 bits and themaximum partition size jumped to 2 GB. The maximum cluster size in aFAT16 file system is 32 KB.FAT12 and FAT16 file systems had what is known as the 8.3 limitation.Filenames on the system were limited to eight characters with a threecharacter suffix.

A variant of the FAT16 file system allowed longerfilenames to be used. This variant was known as the VFAT file systemafter the Microsoft Windows 95 VxD device driver.The FAT32 file system was introduced in 1996 and is still in usetoday. The FAT32 file system uses 32 bits for disk addressing and forclusters. Only 28 of the 32 bits are used to address clusters, but even thisallows for 228 clusters, which allows FAT32 to support media sizes up to2 TB.

Unfortunately, limitations in other Microsoft utilities mean that thefile-allocation table is not allowed to grow beyond 222 clusters, whichsupports media sizes up to 124 GB. Because of the 32-bit disk address,files can grow to a maximum size of 4 GB. Also the long filenames fromVFAT were implemented.Each of the FAT file-system variants shares common characteristics.They are implemented using a file-allocation table with file pieces puttogether using a linked list of clusters.

There is one file-allocationtable per disk volume. The FAT has a common structure, illustratedby Figure 8.4.Boot sectorOptional extraboot sectorspaceFigure 8.4FileallocationtableDuplicatefileallocationtableRoot filedirectoryThe generic format of a FAT file systemFile blockstorage184FILE SYSTEMS AND STORAGEThe first section of the FAT is known as the boot sector. This section ofthe file system contains the operating system’s boot-loader implementation. This is the place that the computer goes to retrieve code that bootsthe operating system.

In some implementations, this is code that initializesthe system for operating system execution. In others, the operating systemcode is stored elsewhere on the disk and the boot sector only contains anaddress where this code can be found.There is a section of this format that is made up of optional reservedsectors. This section of the file system is usually used by extensionsof the basic boot-sector format. Other versions of the operating systemthat expand upon Microsoft Windows but are compatible with it usethis optional section for an expanded boot sector. The boot sector forMicrosoft Windows NT is bigger than that for FAT16, for instance, butsince it uses this optional section, the rest of the format can be the same.The next two areas are identical copies of the file-allocation table forthe partition.

These tables are maps of the file-block storage areas of thestorage medium. They contain one table entry per disk block and eachentry holds the address of the next disk block of the file. This chain isstarted by a directory entry, which indexes filenames and the blocks theystart at. The chain is terminated with a special end-of-file value. Freeblocks have a 0 value in the table.

File-allocation tables also use specialvalues to indicate bad or reserved clusters.The next area was used by FAT12 and FAT16 file systems and containedthe root directory, used as starting point for all traversals through the filesystem. In FAT32, this directory was located on the disk and an addressto it was stored in the FAT.Finally, the rest of the storage medium is used for file block storage.Blocks are simply laid next to each other and adjacent blocks couldeasily be from different files. The only way to connect blocks is throughthe FAT.Let’s take an example.

A user wants to open a file and read the first1000 bytes from a file called \book\readme.txt. If we were using aFAT16 file system, we would start our journey by accessing the rootdirectory, which is stored in the boot sector, and we would look upthe directory name book. This entry would have the block number inthe block-storage region of the disk. We would read that block andassume it contained directory information.

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

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

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

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