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
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 ...
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ìm kiếm theo từ khóa liên quan:
Hệ điều hành Nhập môn Hệ điều hành Bài giảng Nhập môn Hệ điều hành File system Hệ thống file Soft linkTài liệu liên quan:
-
Giáo trình Lý thuyết hệ điều hành: Phần 1 - Nguyễn Kim Tuấn
110 trang 455 0 0 -
173 trang 277 2 0
-
175 trang 275 0 0
-
Giáo trình Nguyên lý các hệ điều hành: Phần 2
88 trang 274 0 0 -
Giáo trình Nguyên lý hệ điều hành (In lần thứ ba): Phần 1 - PGS.TS. Hà Quang Thụy
98 trang 252 0 0 -
Đề tài nguyên lý hệ điều hành: Nghiên cứu tìm hiểu về bộ nhớ ngoài trong hệ điều hành Linux
19 trang 247 0 0 -
Bài thảo luận nhóm: Tìm hiểu và phân tích kiến trúc, chức năng và hoạt động của hệ điều hành Android
39 trang 233 0 0 -
Giáo trình Hệ điều hành: Phần 2
53 trang 222 0 0 -
Phần III: Xử lý sự cố Màn hình xanh
3 trang 206 0 0 -
Bài thuyết trình nhóm môn Hệ điều hành: Tìm hiểu về cách quản lý tệp
17 trang 200 0 0