html5-img
1 / 35

FILE MANAGEMENT SYSTEM

FILE MANAGEMENT SYSTEM. Supervisor M. TIMSIT Claude. Group Members RAMOLY Nathan HEMMI Florent AZANGUE Roméo CHOUIKH Jaouher JRIDI Bayrem NINTIDEM Estelle Olivia. Academic year 2011-2012. INTRODUCTION. PLAN. MATERIAL AND DIFFERENTS STAGES.

london
Download Presentation

FILE MANAGEMENT SYSTEM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FILE MANAGEMENT SYSTEM SupervisorM. TIMSIT Claude Group Members RAMOLY Nathan HEMMI Florent AZANGUE Roméo CHOUIKH Jaouher JRIDI Bayrem NINTIDEM Estelle Olivia Academic year 2011-2012

  2. INTRODUCTION PLAN MATERIAL AND DIFFERENTS STAGES II. METHODS AND SYSTEM DESIGN III. PROBLEMS AND SOLUTIONS IV. DEMONSTRATION CONCLUSION Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  3. INTRODUCTION • The file management system • Software that manages data files • Create, enter, change and query files • EXT2, HFS PLUS , FAT RAMOLY Nathan, HEMMI Florent, AZANGUE Roméo, CHOUIKH Jaouher, JRIDI Bayrem, NINTIDEM Estelle

  4. INTRODUCTION Requirements • Functional Requirements • Management module • Execution module • Documentation module • Non-Functional Requirements • Convenient GUI • Clear errors messages RAMOLY Nathan, HEMMI Florent, AZANGUE Roméo, CHOUIKH Jaouher, JRIDI Bayrem, NINTIDEM Estelle

  5. INTRODUCTION Use Case Diagram RAMOLY Nathan, HEMMI Florent, AZANGUE Roméo, CHOUIKH Jaouher, JRIDI Bayrem, NINTIDEM Estelle

  6. I. MATERIAL AND DIFFERENTS STAGES Material • Software • Code blocks • QT • Turtoise SVN (Subversion) • Libraries • Standard libraries RAMOLY Nathan, HEMMI Florent, AZANGUE Roméo, CHOUIKH Jaouher, JRIDI Bayrem, NINTIDEM Estelle

  7. I. MATERIAL AND DIFFERENTS STAGES Differents Stages • The Theory • Realisation • Debug RAMOLY Nathan, HEMMI Florent, AZANGUE Roméo, CHOUIKH Jaouher, JRIDI Bayrem, NINTIDEM Estelle

  8. II. METHODS AND SYSTEM DESIGN The Theory Simulation of the disk RAMOLY Nathan, HEMMI Florent, AZANGUE Roméo, CHOUIKH Jaouher, JRIDI Bayrem, NINTIDEM Estelle

  9. II. METHODS AND SYSTEM DESIGN Handling of the disk • disk_access • disk_ptr • disk_set_block • disk_get_block • load_disk_hard_drive • save_disk_hard_drive… RAMOLY Nathan, HEMMI Florent, AZANGUE Roméo, CHOUIKH Jaouher, JRIDI Bayrem, NINTIDEM Estelle

  10. II. METHODS AND SYSTEM DESIGN Bitmaps Bitmap Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  11. II. METHODS AND SYSTEM DESIGN Bitmaps Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  12. II. METHODS AND SYSTEM DESIGN Bitmaps Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  13. II. METHODS AND SYSTEM DESIGN Bitmaps • Bitmap Inode • int8_t bitmap_inode_init() • int8_t bitmap_inode_get_status(int numInode) • int8_t bitmap_inode_set_status(int numInode, int status) • int32_t bitmap_first_free_inode() • int32_t bitmap_nb_free_inode() Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  14. II. METHODS AND SYSTEM DESIGN Bitmaps • Bitmap Bloc • int8_t bitmap_block_init(). • int8_t bitmap_block_get_status(int nBlock) • int8_t bitmap_block_set_status(int nBlock, int status) • int32_t bitmap_first_free_block() • int32_t bitmap_nb_free_block() • int32_t bitmap_nb_occupied_block() Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  15. II. METHODS AND SYSTEM DESIGN Inodes • The structure • Size (in bytes) • The last access time • Type (file or folder) • 10 addresses blocks • An address for the single indirection block • An address for the double indirection block Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  16. II. METHODS AND SYSTEM DESIGN Inodes • Indirections Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  17. II. METHODS AND SYSTEM DESIGN Inodes • Indirections • 1 block = N bytes • 10 blocks: 10*N bytes • Single indirection: N²/4 • Double indirection: N3/16 • Total: [10 + N/4 + (N/4)²]*N Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  18. II. METHODS AND SYSTEM DESIGN Inodes • Navigation functions • Inode_get_next_block:next adress block • Inode_get_pos_block_from_byte:block adress which contains the byte number Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  19. II. METHODS AND SYSTEM DESIGN Inodes • Inode low level function • Function in charge allocating and freeing blocks • Two choices: • Allocate and stop (no more free space) • Don’t allocate if there is not enough space • Take two parameters: • A pointer to an inode • A new size for the inode Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  20. II. METHODS AND SYSTEM DESIGN Inodes • Allocating a block • Allocated an indirection block if necessary • Asked to the bitmap the address of the first free block • Added it to the inode by selecting the correspond block (10 blocks or indirections) • Indicated that the block in now occupied Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  21. II. METHODS AND SYSTEM DESIGN Inodes • Freeing a block • Flagged the address block to -1 • Removed indirection block from the inode if necessary(memory leak possible if it is not done) • Indicated that the block in now free so it can be used by another Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  22. II. METHODS AND SYSTEM DESIGN Inodes • Basic functions • Initialization: • Size: 0 • Type: 1 for a file (by default) • Last access time: system time • Addresses: -1 • Last access time • Inode storage: • Get an inode from the RAM-disk • Save an inode to the RAM-disk Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  23. II. METHODS AND SYSTEM DESIGN Directories • Needed in any file system • Lists all the files • Allows the user to create hierarchy • Travel in the tree • Main directory called root Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  24. II. METHODS AND SYSTEM DESIGN Directories • Directory implementation • A special file (inode, blocks, etc…) • Contains the list with the following forms • 4 bytes for the address • 8+1 bytes for the name • Not sorted • First entry: “..” referring the parent directory • Root corresponds to the first inode • Current directory saved as a global variable Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  25. II. METHODS AND SYSTEM DESIGN Directories • Addition of an element • Two steps • Increase the size • Add the entry at the end RAMOLY Nathan, HEMMI Florent, AZANGUE Roméo, CHOUIKH Jaouher, JRIDI Bayrem, NINTIDEM Estelle

  26. II. METHODS AND SYSTEM DESIGN Directories • Deletion of an element • Four main steps • Save the last element • Find the element to delete • Replace it by the last one • Reduce the size of the directory • No memory is released Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  27. II. METHODS AND SYSTEM DESIGN Directories • Deletion of an element • Schemas of a deletion in the system Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  28. II. METHODS AND SYSTEM DESIGN Directories • Searching a file • Main interest of directory • Simply do a loop • Entry to entry until the directory’s size is reached • Moving inside a block until there is no more space, then go on to the next block • Exit as soon as the file is found Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  29. II. METHODS AND SYSTEM DESIGN Directories • Creation of a directory • Four steps • Check if it doesn’t already exists • Allocate an inode • Create a basic inode and put it in the allocated space • Add the entry “..” Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  30. II. METHODS AND SYSTEM DESIGN Directories • Deletion of directory • Delete all the content • Loop to read all the content • File: call the specified function • Directory: recall this function • Set the size to 0 • Misallocate the inode • Remove the entry from the parent directory Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  31. II. METHODS AND SYSTEM DESIGN Directories • Printing • Extraction of the directory’s content as a linked list • Sorting the list • Using comparison functions (Size, date and name) • Using a bubble sort algorithm • Printing the list • Function ls • Allow user to select simply • The kind of sort • Ascendant or not • Complete or not Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  32. II. METHODS AND SYSTEM DESIGN Directories • Moving in the tree • Move the current directory • Path syntax used: “dir1/dir2/dir3” • Path interpretation by cut_dir • Movement done by mini_cd • Moves the current directory Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  33. II. METHODS AND SYSTEM DESIGN Files HEADER FUNCTIONS mini_format mini_write mini_close mini_ls mini_cp mini_open mini_rm mini_read mini_df mini_cp Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  34. III. PROBLEMS AND SOLUTIONS • Technical problems • Conception • Tests • Errors Handling • Graphical interface • None technical Problems Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

  35. CONCLUSION • FMS with a GUI • UNIX Based • Further improvements • Indirection algorithm • Alias & shortcuts • Improve the block structure • Upper layer applications -> OS Nathan RAMOLY, Florent HEMMI, Roméo AZANGUE, JaouherCHOUIKH, Bayrem JRIDI, Estelle NINTIDEM

More Related