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

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

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

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

Then we coverseveral different file-system implementations.A Generic ViewIt is useful to review the components of a file system and the ways thatwe use those components to build the file-system abstraction. There aresome assumptions we make about file systems and some file and directory176FILE SYSTEMS AND STORAGEApplicationsLogical file systemLogical-to-physical translatorFile systemDevice driversHardware storage deviceFigure 8.2 Generic file-system implementation layerscomponents that we can describe so that we can better discuss specificimplementations later.The file-system abstraction is built up in layers.

Each layer adds somefunctionality and represents an area for implementation. Consider thediagram in Figure 8.2 as a depiction of the layers of a file system.Storage devicesAt the lowest layer lies the storage device. Physical storage can be viewedas a linear sequence of bits or bytes, usually organized into larger unitscalled blocks. Blocks are typically the unit of transfer between a storagedevice and the operating system. There are many different types of storagedevice that are supported by operating systems and each communicatesin a different way.

The I/O-interface controller communicates effectivelywith the bus to which it is connected, but it also has its own commandinterface.IMPLEMENTATION OF A FILE SYSTEM177Storage devices, like memory, give addresses to their data space.For some devices, addresses can be as simple as block number. Forthese devices, a read request must be accompanied by a single number,indicating the block to read. Other devices can have a more complicatedaddressing method. Hard disk drives, for example, are usually organizedin three dimensions.

Disks are made of concentric rings of magneticmedia; one of these rings is called a track. Tracks are usually divided intosmaller storage portions called sectors. Cylinders are formed by mappingthe same track of each disk platter vertically. A read request for a hard diskdrive, then, must be accompanied by three numbers: cylinder, track andsector. Some file-system implementations group several sectors into onesingle logical unit called a cluster, so a request to read data from a diskcan address only a cluster, but not an individual sector.

This techniqueallows manipulation of the size of the smallest addressable storage blockon big storage devices.By virtue of their size and their functionality, smartphones have somespecific requirements when it comes to storage media. These devices allcome with onboard flash memory, which is used by the operating systemas operating memory and by users to store files. Other storage is eitherbuilt-in or removable; built-in secondary storage usually takes the form ofa hard disk drive and removable storage is usually a form of flash memoryin a small form factor.

Flash memory can be accessed faster, but wearsout more quickly; hard-disk space can be greater.Device driversThe level above physical hardware is the device-driver level. Devicedrivers act as translators. They communicate with both the operatingsystem and the storage device, translating operating system requests intothe command interface of the storage device. In addition, device driversinclude interrupt handlers that implement various methods of readingfrom the device – from real-time, byte-level access to direct-memoryaccess. Device drivers can access the hardware of both the storagemedium and the computer’s CPU to transfer data and commands.File systemsThe next level is the file-system layer.

This layer implements the basicsof a file system. It knows hardware information such as block sizes onstorage media but it also knows the logical addressing system used byupper layers. This layer receives logical addresses and translates into the178FILE SYSTEMS AND STORAGEphysical addresses of the storage medium. This layer usually tracks thefree-space on a storage medium and runs space management algorithms.This layer will implement file system management methods that aregeneric enough to be used by any higher-level implementation.Logical file systemsThe logical file-system layer implements specific types of file systems.Concepts such as security, access control, and file typing are different fromfile system to file system and these implementations would be built on topof a generic file system.

Implementations from this layer provide the APIsfor operations common to files: opening, reading, writing, closing, etc.This layer keeps track of files via a file table that uses file control blocks(FCBs) as entries. Like process control blocks, FCBs record informationabout files in use. The information recorded in an FCB is dependent onthe file-system implementation.ApplicationsApplications interface with the logical file system either through theAPIs provided by it or by communicating with file servers.

Even whenapplications need raw, byte-level access to storage, they must workthrough these methods, which pass system calls through the hierarchy. Itis important to remember that system calls are the way that applicationsget kernel-level access to system resources and file systems are a resourcethat must be coordinated by the kernel.Storage Medium StructureThere is a generic structure to the space on a storage medium. In general,there are four components that organize the bits on a storage medium toproduce a file system.The first area on a storage medium is typically the master boot record(MBR).

This is an area that contains information necessary to boot theoperating system and get the computer up and running. Early on, operatingsystem kernel code used to occupy the MBR, but as operating systemsgrew in size and the need to change operating systems became moreobvious, this code was kept somewhere on the storage medium and theaddress of this location was stored in the MBR. On most computingsystems, the MBR is the first set of bytes on the storage medium; thisassumption is made by many operating systems.IMPLEMENTATION OF A FILE SYSTEM179The next area of the storage medium is called the partition-label controlblock (PLCB).

This area contains information about storage mediumpartitions. Such information can include the size of each partition, theposition at which each partition starts and ends on the storage medium,and the number and location of free blocks of storage. Most partitions aredefined here; there can be special partitions (areas of the disk) that aredefined elsewhere.The next area on a storage medium is the directory structure. This areacontains information to organize and find files; we detail this structure inthe next section.The next area is used for file storage. Both FCBs and actual file contentsare stored in this area.

We detail the structure of this space in a latersection.In addition to the structure of the storage media, the operating systemalso keeps track of information for each file system. The structuresmaintained in this way reflect and augment the storage structures onthe storage medium. The operating system usually maintains a partitiontable, a table defining the directory structure, and open-file tables. Thislast structure records where open files are in the operating system byplacing FCBs in a table, kept in memory.

Tables of open files are usuallyalso kept on a per-process basis.Directory structureIn general, a directory must maintain several pieces of information. Adirectory is the central point of file-system information and is the onlyway to find where a file begins on a storage medium. Therefore, it mustmaintain information on all files and where to find them. Sometimes thisinformation is resident in the directory and sometimes directories simplypoint to this information on a storage medium.Directories are really just files of data stored in a file system. A directoryusually holds the following information:• directory name : directories have names, just like files, and thesenames need to be stored with the directory• directory size : the number of files and directories must be stored• FCB information : each file and directory has a control block andthese control blocks are accessible through the directory.

Either thecomplete FCB is stored with the directory structure or the address ofwhere the FCB resides is stored.180FILE SYSTEMS AND STORAGEAs we stated previously, each directory is accessed by other directories.The chain of directories forms a tree. There is, therefore, a root to thedirectory tree, a single directory at which paths to all others start. Thisroot directory is not accessible from other directories, because it is at thetop.

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

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

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

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