Ch11th

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Ch11th - Presentation Transcript

    1. Chapter 10: อินเตอร์เฟสของระบบไฟล์ File-System Interface
      • แนวคิดของระบบไฟล์ File Concept
      • ระเบียบวิธีการเข้าถึงไฟล์ Access Methods
      • โครงสร้างไดเร็กทอรี่ Directory Structure
      • ระบบไฟล์ File System Mounting
      • การแบ่งสรรการใช้งานไฟล์ File Sharing
      • การป้องกันไฟล์ Protection
    2. แนวคิดของระบบไฟล์ File Concept
      • ไฟล์คือชื่อของสารสนเทศที่สัมพันธ์กัน มีพื้นทีแอดเดรสเชิงตรรกที่ต่อเนื่องกัน
      • ชนิดของไฟล์ Types:
      • ไฟล์ข้อมูล Data
        • ตัวเลข numeric
        • ตัวอักษร character
        • ไบนารี่ binary
      • โปรแกรมไฟล์ Program
    3. โครงสร้างไฟล์ F ile Structure
      • ไม่เป็นลำดับของเวิร์ดและไบท์
      • โครงสร้างของเรคคอร์ดอย่างง่าย
        • บรรทัด Lines
        • ขนาดจำกัด Fixed length
        • ขนาดแปรผัน Variable length
      • โครงสร้างซับซ้อน Complex Structures
        • รูปแบบเอกสาร Formatted document
        • สามารถนำกลับมาใช้ใหม่ Relocatable load file
      • ในสองรูปแบบหลังสามารถแทรกข้อมูลเพิ่มเติมได้
      • ผู้จัดการไฟล์ :
        • ระบบปฏิบัติการ Operating system
        • โปรแกรม Program
    4. คุณลักษณะของไฟล์ File Attributes
      • Name – เพื่อให้มุนษย์สามารถอ่านเข้าใจและจดจำได้
      • Type – เพื่อให้ระบบทราบว่าเป็นไฟล์ประเภทใด
      • Location – เพื่อสามารถบ่งชี้ได้ว่าไฟล์ถูกจัดเก็บอยู่ที่ใดและในอุปกรณ์ใด
      • Size – ขนาดของไฟล์ ณ ปัจจุบัน
      • Protection – ข้อมูลเพื่อใช้ในการปกป้องข้อมูล เพื่อการรักษาความปลอดภัย และเพื่อการติดตามตรวจสอบ
      • Time , date , and user identification – สารสนเทศที่บอกถึงรายละเอียดต่างๆ ของไฟล์ ถูกจัดเก็บอยู่ในโครงสร้างไดเร็กทอรี่ ในดิสก์
      • Information about files are kept in the directory structure, which is maintained on the disk.
    5. การดำเนินการใดๆ กับไฟล์ File Operations
      • Create
      • Write
      • Read
      • Reposition within file – file seek
      • Delete
      • Truncate
      • Open( F i ) – ค้นหาจากโครงสร้างของไดเร็กทอรี่บนดิสก์ เพื่อเข้าใช้ Fi และเคลื่อนย้ายเนื้อหาต่างๆ จากไฟล์ไปไว้ยังหน่วยความจำ
      • Close ( F i ) – เคลื่อนย้ายเนื้อหาจาด Fi ที่ใช้งานอยู่บนหน่วยความจำ ไปไว้ยังโครงสร้างไดเร็กทอรี่บนดิสก์
    6. ประเภทของไฟล์ ชื่อและส่วนขยาย File Types – Name, Extension
    7. ระเบียบวิธีการเข้าถึงไฟล์ Access Methods
      • การเข้าถึงไฟล์เชิงลำดับ Sequential Access
      • read next
      • write next
      • reset
      • no read after last write
      • (rewrite)
      • การเข้าถึงไฟล์โดยตรง Direct Access
      • read n
      • write n
      • position to n
      • read next
      • write next
      • rewrite n
      • n = relative block number
    8. Sequential-access File
    9. แบบจำลองของการเข้าถึงเชิงลำดับ บนไฟล์ที่เข้าถึงแบบโดยตรง Simulation of Sequential Access on a Direct-access File
    10. Example of Index and Relative Files
    11. โครงสร้างไดเร็กทอรี่ Directory Structure
      • โหนดแต่ละโหนดประกอบไปด้วยสารสนเทศที่เกี่ยวกับไฟล์ ทุกไฟล์
      F 1 F 2 F 3 F 4 F n Directory Files ทั้งโครงสร้างไดเร็กทอรี่และ ไฟล์ อยู่ในดิสก์ แบคอัพโครงสร้างทั้งสองไว้ในเทป
    12. โครงสร้างระบบไฟล์โดยทั่วไป A Typical File-system Organization
    13. สารสนเทศในไดเร็กทอรี่ของอุปกรณ์ Information in a Device Directory
      • ชื่อ Name
      • ประเภท Type
      • แอดเดรส Address
      • ขนาด ณ ปัจจุบัน Current length
      • ขนาดสูงสุด Maximum length
      • วันที่ใช้งานล่าสุด Date last accessed (for archival)
      • วันที่ปรับปรุงล่าสุด Date last updated (for dump)
      • รหัสเจ้าของ Owner ID (who pays)
      • สารสนเทศเพื่อการป้องกัน Protection information
    14. การทำงานของไดเร็กทอรี่ Operations Performed on Directory
      • ค้นหาไฟล์ Search for a file
      • สร้างไฟล์ Create a file
      • ลบไฟล์ Delete a file
      • รายการของไฟล์ List a directory
      • เปลี่ยนชื่อไฟล์ Rename a file
      • การแปลงไฟล์เพื่อการจัดเก็บไฟล์หรือเพื่อการแบคอัพข้อมูล Traverse the file system
    15. การจัดการโครงสร้างไดเร็กทอรี่ ( ทางตรรก ) Organize the Directory (Logically) to Obtain
      • Efficiency – เพื่อประสิทธิภาพ เพื่อจัดการไฟล์ได้รวดเร็ว
      • Naming – การตั้งชื่อ เพื่อความสะดวกในการจดจำและค้นหาของผู้ใช้
        • ผู้ใช้หลายคนสามารถตั้งชื่อไฟล์เหมือนกันโดยจัดเก็บไว้ต่างไดเร็กทอรี่กัน
        • ไฟล์เดียวกันสามารถมีชื่อที่แตกต่างกันได้ .
      • Grouping – การจัดกลุ่ม การจัดกลุ่มไฟล์เชิงตรรก โดยอาศัยคุณสมบัติของไฟล์
    16. ไดเร็กทอรี่ระดับเดียว Single-Level Directory
      • A single directory for all users.
      การใช้งานไดเร็กทอรี่ระดับเดียวกับ ผู้ใช้ทุกราย เกิดปัญหาการตั้งชื่อ ไม่สามารถซ้ำกันได้ ไม่สามารถจัดกลุ่มได้เนื่องจากชื่อและคุณลักษณะของไฟล์ อาจซ้ำกัน
    17. ไดเร็กทอรี่แบบสองระดับ Two-Level Directory
      • Separate directory for each user.
      จัดสรรโดยการแบ่งส่วนไดเร็คทอรี่ให้กับผู้ใช้แต่ละคน ชื่อพาธหรือเส้นทาง ผู้ใช้แต่ละคนสามารถตั้งชื่อไฟล์ซ้ำกับชื่อไฟล์ของบุคคลอื่น เพิ่มประสิทธิภาพในการค้นหา ไม่ถูกจัดกลุ่ม
    18. ไดเร็กทอรี่แบบสามระดับ Tree-Structured Directories
    19. ไดเร็กทอรี่แบบสามระดับ Tree-Structured Directories (Cont.)
      • ค้นหาอย่างมีประสิทธิภาพ
      • เพิ่มความสามารถในการจัดกลุ่ม
      • ไดเกทอรี่ปัจจุบัน
        • cd /spell/mail/prog
        • type list
    20. Tree-Structured Directories (Cont.)
      • Absolute or relative path name
      • Creating a new file is done in current directory.
      • Delete a file
      • rm <file-name>
      • Creating a new subdirectory is done in current directory.
        • mkdir <dir-name>
      • Example: if in current directory /mail
      • mkdir count
      mail prog copy prt exp count Deleting “mail”  deleting the entire subtree rooted by “mail”.
    21. Acyclic-Graph Directories
      • Have shared subdirectories and files.
    22. Acyclic-Graph Directories (Cont.)
      • Two different names (aliasing)
      • If dict deletes list  dangling pointer.
      • Solutions:
        • Backpointers, so we can delete all pointers. Variable size records a problem.
        • Backpointers using a daisy chain organization.
        • Entry-hold-count solution.
    23. General Graph Directory
    24. General Graph Directory (Cont.)
      • How do we guarantee no cycles?
        • Allow only links to file not subdirectories.
        • Garbage collection.
        • Every time a new link is added use a cycle detection algorithm to determine whether it is OK.
    25. File System Mounting
      • A file system must be mounted before it can be accessed.
      • A unmounted file system (I.e. Fig. 11-11(b)) is mounted at a mount point .
    26. (a) Existing. (b) Unmounted Partition
    27. Mount Point
    28. File Sharing
      • Sharing of files on multi-user systems is desirable.
      • Sharing may be done through a protection scheme.
      • On distributed systems, files may be shared across a network.
      • Network File System (NFS) is a common distributed file-sharing method.
    29. Protection
      • File owner/creator should be able to control:
        • what can be done
        • by whom
      • Types of access
        • Read
        • Write
        • Execute
        • Append
        • Delete
        • List
    30. Access Lists and Groups
      • Mode of access: read, write, execute
      • Three classes of users
      • RWX
      • a) owner access 7  1 1 1 RWX
      • b) group access 6  1 1 0
      • RWX
      • c) public access 1  0 0 1
      • Ask manager to create a group (unique name), say G, and add some users to the group.
      • For a particular file (say game ) or subdirectory, define an appropriate access.
      owner group public chmod 761 game Attach a group to a file chgrp G game

    + Nuttha OtanasapNuttha Otanasap, 6 months ago

    custom

    662 views, 0 favs, 1 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 662
      • 657 on SlideShare
      • 5 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds
    • 5 views on http://learning.sau.ac.th

    more

    All embeds
    • 5 views on http://learning.sau.ac.th

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories