1 / 21

Wince

Wince . File systems. File system on embedded. File system choice on embedded is important File system size can be an issue Different media are used – i.e. Flash May not have users May need special security – i.e. encryption Requirements are likely to change. Microsoft file systems.

asasia
Download Presentation

Wince

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. Wince File systems

  2. File system on embedded • File system choice on embedded is important • File system size can be an issue • Different media are used – i.e. Flash • May not have users • May need special security – i.e. encryption • Requirements are likely to change

  3. Microsoft file systems • Generally Microsoft systems have 4 file system choices • CDFS • For cd roms • UDF • For dvds • FAT12, FAT16 and FAT32 • NTFS

  4. Parts of a FAT32 Volume • Boot Sector - first sector of partition - contains file system info, pointers to other sections and boot loader code • FAT - two copies of File Allocation Table – show clusters (blocks) allocation • Root Folder - The root folder contains an entry for each file and folder at the root • Data - file and directory data

  5. FAT • File Allocation Table contains entry for each cluster on the disk • FAT12, FAT16, and FAT32 - refer to the number of bits used for the cluster entries in the table • Number of entries in FAT is limited by number of bits used for describing the location of a cluster - FAT16 can only hold < 216 or 65,526 cluster entries

  6. The File Allocation Table • Entry for each cluster on the partition – contains the: • address of the next cluster in chain • end of file (EOF) character that indicates the end of a chain (0xFFFF) • character to mark bad cluster (0xFFF7) • character to mark reserved cluster • zero to note the cluster is unused • FAT16 - 16 bits/FAT32 - 32 bits (28 Bits)

  7. File Allocation Tableone entry for each cluster

  8. Slack • Fixed number of clusters available • Cluster size increased in order to fill the available space as disks get bigger • FAT32 uses 16 KB clusters for 16-32 GB disks • 20 KB file uses two 16 KB clusters - 32 KB of space –12K of slack • 1 KB file uses 16 KB – 15K of slack

  9. Folder Entry • Set of 32-byte Folder Entries for each file and subfolder in the folder • Name (eight-plus-three characters) • Attribute byte (8 bits/archive, directory, hidden, read-only, system and volume) • Create time (24 bits)/date (16 bits) • Last access date (16 bits) • Last modified time (16 bits)/date (16 bits) • Starting cluster in the FAT (16 bits) • File size (32 bits)

  10. Creating a File • No organization to FAT folder structure • Files are given the first available location on the volume • Starting cluster number is the address of the first cluster used by the file • Each cluster contains a pointer to the next cluster in the file, or an indication (0xFFFF) that this cluster is the end of the file

  11. File Allocation Table Figure 4-2 Example of File Allocation Table

  12. Windows NTFS Hierarchical file system (similar to UNIX) Hard and symbolic links are supported Highly complex and sophisticated FS Uses B+ trees Has ACLs Can encrypt Different from FAT file systems 9/15/2014 12

  13. Fundamental Concepts • NFTS file – not just a linear sequence of bytes • File – consists of multiple streams • Multiple attributes, each represented by a stream of bytes • Each stream has its own name foo:stream1; • Idea of multiple streams in a file – Apple Macintosh • Used to allow Windows machines to read Apple files 9/15/2014 13

  14. Principal Win32 APIs for File I/O 9/15/2014 14

  15. Open File Issues To create and open a file, one must use CreateFile There is no FileOpen API CreateFile system call has 7 parameters Pointer to the name of the file to create or open Flags telling whether the file can be read, written, or both Flags telling whether multiple processes can open the file at once A pointer to the security descriptor Flags telling what to do if the file exists/does not exist Flags dealing with attributes such as archiving, compression,; Handle of a file whose attributes should be cloned for the new file Example: Inhandle=CreateFile(“data”, GENERIC_READ,0,NULL,OPEN_EXISTING, 0, NULL) 9/15/2014 15

  16. NFTS Structure NTFS is divided into volumes (aka partitions) Each NTFS includes files, directories, other data structures Each volume is organized as a linear sequence of blocks (block size between 512 and 4KB) Main data structure in each volume is Master File Table (MFT) Bitmap keeps track which MFT entries are free 9/15/2014 16

  17. MFT for NTFS Organization • Boot-block has information • about the first block of MFT 9/15/2014 17

  18. MFT Record (Example for 3-Run, 9-Block File) 9/15/2014 18

  19. Space • NTFS supports disk quotas & file compression • NTFS handles space management for partitions > 8G more efficiently than FAT32 - smaller cluster sizes and less disk space waste than FAT32 • FAT32 maximum partition size is 32GB • NTFS maximum partition size is 16TB

  20. Reliability • FAT32 more susceptible to disk errors • NTFS has ability to recover from errors better than similar FAT32 volumes • Log files are created under NTFS - can be used for automatic file system repair • NTFS supports dynamic cluster remapping for bad sectors and prevent them from being used in the future

  21. Security • FAT32 - user with access to a drive using FAT32 has access to the files on that drive • NTFS allows NTFS Permissions - folder and file access can be controlled individually - chance for error is greatly magnified • Windows XP Professional supports file encryption

More Related