USB Flash Memory Research – Transfer Rate Dependency on Operating System
Total Page:16
File Type:pdf, Size:1020Kb
International Scientific Conference Computer Science’2015 USB Flash memory research – transfer rate dependency on operating system Sergey Nedev, Vladimir Kamenov Technical University, Sofia, Bulgaria, e-mail: [email protected], Technical University, Sofia, Bulgaria, e-mail: [email protected] Abstract: Flash memory is a type of energy independent reprogrammable computer mem- ory, which can be electrically erased and pre-programmed. Flash memory offers fast read rate and better endurance to kinetic shock than hard drives. The purpose of the current paper is to determine the dependency of the transfer rate of USB flash memories on the used operating system and using different file systems. The tests are made using two of the most popular soft- ware products developed for such tasks - HDTune Pro v5.0 and ATTO Disc Benchmark. Keywords: USB Flash Memory, Operating system, transfer speed, testing. 1. INTRODUCTION - USB FLASH MEMORY TECHNOLOGY Fig.1: General view of a USB flash memory Flash memory (fig.1) stores the information in a group of memory cells, made from transistors with floating gate. In traditional SLC (single-level cell) devices, each cell keeps only one bit of information. Some newer Flash memory, known as MLC (multi- level cell) devices can store more than one bit in a cell, choosing between several levels of electric charge. Flash memory cells can endure vast number of storage cycles (from 100,000 to 1 million) depending upon the design of the cell and the precision of manufacturing qual- ity. The main reason for cell damage is the cumulative damage of the floating gate of the memory cell due to the repeated cycles of high voltages (used to erase the cell). The damage effect is partially compensated using proprietary software, which su- pervises the storage process and dynamically changes the used blocks in order to spread evenly the process upon all sectors. Another technique is checking sectors’ stored data in case of write failure. This method is called “bad block management” (BBM). These anti wear methods usually make the portable flash memory last longer than the device itself. International Scientific Conference Computer Science’2015 2. TYPES OF USB FLASH MEMORY – NOR AND NAND CHIPS NAND types of Flash memory are mainly used in memory cards, USB Flash mem- ory, SSD (Solid State Drives) and similar products, mainly for data storage and transfer of files. NOR memory types, which allow true random access, are used as a substitute of the older EPROM and as an alternative of other types of ROM. 2.1. NAND Flash Fig.2: NAND flash architecture 8 transistors are connected serially (Фиг.2). Reading of the bits is also done serially and is several times slower than the process in NOR. This type of memory works ex- actly like the block devices (hard drives or memory cards). Each block contains a num- ber of pages. Typical block sizes are: • 32 pages containing 512 + 16 bytes for each block size of 16 kB • 64 pages containing 2048 + 64 bytes for each block size of 128 kB • 64 pages containing 4096 + 128 bytes for each block size of 256 kB • 128 pages containing 4096 + 128 bytes for each block size of 512k Programming is done one page at a time and erasing is possible a full block at a time only. NAND devices also need supervision upon faulty blocks – using the manufac- turer’s software or using a separate control chip. When the software enters into the logi- cal block, it connects to a physical block using the devices drivers or controller. The total memory capacity is constantly decreasing as more and more block are marked faulty. The fault correction and detection software will usually detect errors, when one bit of every 256 bytes (2048 bits) is faulty. When this happens, the block is marked faulty in the logical blocks table and the unaffected data is copied onto new block and then the table is updated. If more than one bit of every 2048 bits is faulty, the contents will be partially lost – it can’t be reproduced in its original form. If this happens during writing of a block, the content can still be saved. The first physical block (block 0) is always guaranteed to work without errors. Con- sequently all important parameters and drivers should be stored on this block. If the de- vice is used to boot an operating system, this block must contain the boot record. When given software is started from the NAND memory, virtual memory strategies are used: the content of the memory must first be copied in RAM and then started from it. Memory management unit (MMU) in the system assists this process but it can also International Scientific Conference Computer Science’2015 be done using layering techniques. Because of these factors, some systems utilize a combination of NOR and NAND memory, where the NOR is smaller and is used as ROM, and the bigger NAND memory, which connected to the file system, is used as a random access memory. NAND is better suited for flash devices, requiring large storage capacity. This flash architecture combines large storage capacity with fast read/write and erase rates, sacrificing the random access to each bit advantage of NOR memory. 2.2. Useful life of flash memory The useful life of NAND flash memory is much longer than NOR flash memory (usu- ally 1 000000 cycles against 100 000 cycles). This is so, because programming and erasing of NOR flash depends on various sub-microscopic processes (hot electron in- jection and quantum displacement), which are totally symmetrical in NAND flash mem- ory. 2.3. Firmware storage Regarding the ever growing speed of modern processors, parallel flash devices are often much slower, when executing program codes, stored on them. On the other side, modern SRAM offers access times under 10 ns, while DDR2 SDRAM offers 20 ns. Be- cause of that very often the code, stored on the flash memory, has to be copied on RAM; this is done so the code could work at full speed. Company software (firmware) can be stored in the USB flash device, and then copied onto SDRAM or SRAM, when the device is powered. 3. FLASH FILE SYSTEM Most USB flash devices come preformatted with FAT32 file system. The universal character of this system permits the device to be used on almost any computer with USB slot. Nevertheless, because the USB flash memory is seen as a USB by the sys- tem, it can be reformatted using any file system, supported by the OS. Some file systems are developed as to spread the written data across the entire memory, avoiding clustering data in any particular area (directories for example); this process greatly preserves the lifetime of ordinary devices with flash memory. Some de- vices have this functionality embedded in its own controller, others don’t, thus the cus- tomer has to check the device’s specifications before changing its file system. 4. TYPES OF FILE SYSTEMS There are three types of FAT file systems: FAT12, FAT16 and FAT32. FAT dates from DOS systems. The problem is that it was developed for 16-bit OS, with 16-bit ad- dressing and it is not capable of working with a drive bigger than 32 megabytes. FAT16 is used for the first time in Windows 95. The maximum size of partitions here is 2GB. FAT32 is the successor of the older FAT16. The development of FAT32 is con- nected to Windows 95 OSR2. The difference is that it uses 32-bit addressing and now it is possible to achieve partitions with sizes of 2TB (terabytes). NTFS (New Technology File System) is the standard file system in Windows NT. It replaces FAT file system and is the preferred file system in Microsoft Windows operat- International Scientific Conference Computer Science’2015 ing systems. NTFS is greatly improved compared to FAT. The improvements include support of metadata and more complex structures of data leading to improvement in productivity, security and disc space management. The additions also include Access Control Lists – ACL and file system logging. exFAT is a file system, specially developed by Microsoft for flash memories. It can be used in places, where NTFS file system is not an option. 5. RESEARCH OBJECTIVES AND METHODS The objective of this research is to determine the dependency of transfer rate of USB flash memories on the used operating system, using different file systems in the course of the tests. The tests are made using two of the most popular software products in this field: HDTune Pro v5.0.0 (fig.3, fig.4 and fig.5) and ATTO Disk Benchmark (fig.6). The research is structured in the following manner: • A benchmark test with HDTune Pro v5.0.0 using flash memory data reading, which determines the minimum, average and maximum read transfer rate and proc- essor load. The process is visualized graphically. • Using HDTune Pro v5.0.0 the maximum and average access time is calculated, as well as average rate and operations per second when random reading data blocks placed on random locations on the flash memory (random access test). • Using HDTune Pro v5.0.0 the read and write process of large 500МВ and 64МВ is tested. • Using ATTO Disk Benchmark the transfer rate is tested again, but with 256МВ files. The dependency of transfer rate on the operating system is research, using three USB flash memory devices. The tested operating systems are: Windows 7, Windows Vista and Windows XP. The flash drives are formatted with NTFS, FAT32 and exFAT file systems. The dependency is examined using results from tests with HDTune Pro v5.0.0 and ATTO Disk Benchmark software for NTFS, FAT32 and exFAT file systems (tables.1, 2 and 3).