Danh mục

Bài giảng Nhập môn Hệ điều hành: File system (Hard Link - Soft Link) - Nguyễn Xuân Vinh

Số trang: 13      Loại file: pptx      Dung lượng: 173.69 KB      Lượt xem: 13      Lượt tải: 0    
Hoai.2512

Hỗ trợ phí lưu trữ khi tải xuống: 1,000 VND Tải xuống file đầy đủ (13 trang) 0
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Chương này sẽ giới thiệu về hệ thống file trong hệ điều hành. Thông qua chương này người học sẽ nắm bắt được các thành phần của file, về hardlinked và soft link (symbolic link, symlink),... Mời các bạn cùng tham khảo để nắm bắt các nội dung chi tiết.
Nội dung trích xuất từ tài liệu:
Bài giảng Nhập môn Hệ điều hành: File system (Hard Link - Soft Link) - Nguyễn Xuân VinhGV:NGUYỄNXUÂNVINH NHẬP MÔN HỆ ĐIỀU HÀNH INTRODUCTION TO OPERATING SYSTEMS [214242] FILE SYSTEMNHẬPMÔNHỆĐIỀUHÀNH Hard Link - Soft Link Nguyễn Xuân Vinh nguyenxuanvinh@hcmuaf.edu.1/15/16 vn/XX1GV:NGUYỄNXUÂNVINH File Parts • Unixfilesconsistoftwoparts: – Datapart:associatedwithInodewhichcarriesthemapof wherethedatais,thefilepermissions,…NHẬPMÔNHỆĐIỀUHÀNH – Filenamepart:carriesanameandanassociatedinodenumber.1/15/16/XX2GV:NGUYỄNXUÂNVINH Hardlinked • Morethanonefilenamecanreferencethesameinodenumber – Thesefilesaresaidtobe“hardlinked”togetherNHẬPMÔNHỆĐIỀUHÀNH The specific location of physical data.1/15/16/XX3GV:NGUYỄNXUÂNVINH Soft link (symbolic link, symlink) • Specialfiletypewhosedatapartcarriesapathtoanotherfile • OSrecognizesthedataasapath,andredirectsopens,reads,and writessothat,insteadofaccessingthedatawithinthespecialfileNHẬPMÔNHỆĐIỀUHÀNH1/15/16 A symbolic path indicating/XX the abstract location of4GV:NGUYỄNXUÂNVINH Directory • Thedirectory,asafile,isjustanarrayoffilenamepartsofother files • Whenadirectoryisbuilt,itisinitiallypopulatedwiththe filenamepartsoftwospecialfiles:the“.”and“..”files. – Thefilenamepartforthe“.”fileispopulatedwiththeinode#NHẬPMÔNHỆĐIỀUHÀNH ofthedirectoryfileinwhichtheentryhasbeenmade. • “.”isahardlinktothefileofthecurrentdirectory. – Thefilenamepartforthe“..”fileispopulatedwiththeinode# ofthedirectoryfilethatcontainsthefilenamepartofthe currentdirectoryfile. • “..”isahardlinktothefilethatimplementstheimmediate1/15/16 parentofthecurrentdirectory./XX5GV:NGUYỄNXUÂNVINH Restrictions • Hardlinked: – Bothlinksmustresideonthesamefilesystem. – Thesourcefilemustexist. – Hardlinksshouldn’tlinkdirectories.NHẬPMÔNHỆĐIỀUHÀNH q Softlinks: – Sourceandtargetcanbeonseparatefilesystems. – Sourcedoesnothavetoexist. – AdditionalI/Onecessarytocompletefileaccess – Additionalstoragetakenupbysoftlinkfile’sdata1/15/16/XX6GV:NGUYỄNXUÂNVINH Example • Letsstartoffwithanemptydirectory,andcreateafileinitNHẬPMÔNHỆĐIỀUHÀNH q Now,letsmakeahardlinktothefile1/15/16/XX a.hardlink.filesharesthesameinode(73478)asbasic.file7 c.hardlink.filesharesthesamedataasbasic.fileGV:NGUYỄNXUÂNVINH Example • Ifwechangethepermissionsonbasic.file: then the same permissions change on hardlink.file.NHẬPMÔNHỆĐIỀUHÀNH q Letsnowmakeasoftlinktotheoriginalfile: Here, we see that although softlink.file accesses the same data as1/15/16 ...

Tài liệu được xem nhiều: