資源描述:
《ch11-file-system interface》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在教育資源-天天文庫。
1、Chapter11:File-SystemInterfaceFileConceptAccessMethodsDirectoryStructureFileSystemMountingFileSharingProtectionOperatingSystemConceptsFileConceptContiguouslogicaladdressspaceTypes:DatanumericcharacterbinaryProgramOperatingSystemConceptsFileStructureNone-seq
2、uenceofwords,bytesSimplerecordstructureLinesFixedlengthVariablelengthComplexStructuresFormatteddocumentRelocatableloadfileCansimulatelasttwowithfirstmethodbyinsertingappropriatecontrolcharacters.Whodecides:OperatingsystemProgramOperatingSystemConceptsFileAt
3、tributesName–onlyinformationkeptinhuman-readableform.Type–neededforsystemsthatsupportdifferenttypes.Location–pointertofilelocationondevice.Size–currentfilesize.Protection–controlswhocandoreading,writing,executing.Time,date,anduseridentification–dataforprote
4、ction,security,andusagemonitoring.Informationaboutfilesarekeptinthedirectorystructure,whichismaintainedonthedisk.OperatingSystemConceptsFileOperationsCreateWriteReadRepositionwithinfile–fileseekDeleteTruncateOpen(Fi)–searchthedirectorystructureondiskforentr
5、yFi,andmovethecontentofentrytomemory.Close(Fi)–movethecontentofentryFiinmemorytodirectorystructureondisk.OperatingSystemConceptsFileTypes–Name,ExtensionOperatingSystemConceptsAccessMethodsSequentialAccessreadnextwritenextresetnoreadafterlastwrite(rewrite)Di
6、rectAccessreadnwritenpositiontonreadnextwritenextrewritenn=relativeblocknumberOperatingSystemConceptsSequential-accessFileOperatingSystemConceptsSimulationofSequentialAccessonaDirect-accessFileOperatingSystemConceptsExampleofIndexandRelativeFilesOperatingSy
7、stemConceptsDirectoryStructureAcollectionofnodescontaininginformationaboutallfiles.F1F2F3F4FnDirectoryFilesBoththedirectorystructureandthefilesresideondisk.Backupsofthesetwostructuresarekeptontapes.OperatingSystemConceptsATypicalFile-systemOrganizationOpera
8、tingSystemConceptsInformationinaDeviceDirectoryNameTypeAddressCurrentlengthMaximumlengthDatelastaccessed(forarchival)Datelastupdated(fordump)OwnerID(whopays)Protectioninformation(discusslater)Operating