Download presentation
Presentation is loading. Please wait.
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 1.Boot Sector - first sector of partition - contains file system info, pointers to other sections and boot loader code 2.FAT - two copies of File Allocation Table – show clusters (blocks) allocation 3.Root Folder - The root folder contains an entry for each file and folder at the root 4.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 < 2 16 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 Table one 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
6/30/201512 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
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 6/30/201513
14
6/30/201514 Principal Win32 APIs for File I/O
15
6/30/201515 Open File Issues To create and open a file, one must use CreateFile There is no FileOpen API CreateFile system call has 7 parameters 1.Pointer to the name of the file to create or open 2.Flags telling whether the file can be read, written, or both 3.Flags telling whether multiple processes can open the file at once 4.A pointer to the security descriptor 5.Flags telling what to do if the file exists/does not exist 6.Flags dealing with attributes such as archiving, compression,; 7.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)
16
6/30/201516 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
17
6/30/201517 MFT for NTFS Organization Boot-block has information about the first block of MFT
18
6/30/201518 MFT Record (Example for 3-Run, 9-Block File)
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.