Information Technology Reference
In-Depth Information
-->canusesameAPItoread/writekeyboard/terminalasfile
e.g.,cat/etc/motd|echo
e.g.[code--openfile,opentty,write,write...]
13.2
Files: Placing and finding data
file:setoflogicallyrelateddata;oftenaccessedtogether
e.g.,wordprocessordocument,objectfile,musicfile
notjust"data",programstoo:wordprocessor,compiler,
mp3player
flatfilesystem:
youcanthinkofthissectionasdefininga"flatfilesystem"
open/close/readwrite/seek
need:needFID->blocksoffile
additionalgoals:genericfilesystem(forwiderangeofapplications)
--excellentsequentialaccess
--acceptablerandomaccess
--efficientforbothlargeandsmallfiles
tomeetthesegoals--basicidea:
indexstructure--head+pointerstorestofdat
e.g.,linkedlist[picture],tree[picture]
freeblocklist--tomaximizesequentiallayout
e.g.,bitmap
allocationpolicy/defragmentation--tomaximizesequential
layout
e.g.,attempttolayouteachfilesequentially
Search WWH ::




Custom Search