Journal04 - maxinepopov/sys-140 GitHub Wiki

Contiguous Allocation

A method in which the computer’s file system uses to place logical file blocks onto physical medium.

Linked-List Allocation

File blocks on disk are associated with pointer to next block. Example: MS-DOS file system that uses file attribute table (FAT) to implement the linked list files. Files can grow with incremental allocation of blocks. Sequential access may suffer since the blocks may not be contiguous. Random access is bad and linked-list allocation is unreliable.

Segment-Based Allocation

Uses segment table and it will allocate multiple regions of contiguous blocks. Able to break allocation into number of contiguous disk regions, while permitting contiguous allocation to reduce disk seek time.

Indexed Allocation

Uses index to track file block locations. The user will declare a maximum file size, then the file system allocations file header with an array of pointers.

Multilevel Indexed Allocation

Linux uses this. Index entries point to index blocks instead of data blocks. File header holds 15 index pointers, and first 12 point to data blocks. 13th points to single indirect block, 14th points to double indirect block, 15th points to triple indirect block.

Inverted Allocation

Allocates disk block by hashing file block contents to disk block location. The different same content file blocks will share the same disk block for storage.

Secondary Source Main memory is too small to store all needed programs and data (perm). Main memory is also a volatile storage device that may lose its data when the power gets turned off. Secondary storage needs to be able to hold large amount of data (perm).

Disk structure Comes in multi-platter disk packs. Characteristics: each platter divided into several tracks, several sectors, two surfaces, cylinder is set of tracks at same track position on all surfaces, numbers of bytes/sectors, tracks/platter and sectors/track vary among the different disk types, accessing a sector should be able to know drive number, track/cylinder, surface, and sector, the sector is the smallest data section able to be read/written to block device.

Disk performance parameters

Disk bandwidth is total amount of bytes transferred. It is divided by total time between first request of service and completion of last transfer. Access Activities: Read and write heads moved to correct track Electronically switched to correct surface Wait for correct sector to rotate beneath heads No seek time required when accessing the tracks in same cylinder.

Calculating access time

Seek time is when time gets taken to move the read or write head to required track/cylinder. Latency time is taken for the disk to spin around so required sector is under head. Transfer time is when time is taken to perform data transfer between the disk and main memory.

Disk Space Management The disks have a set block size and file system allocates disk space by block. This will result in internal fragmentation.

Free space list When files are deleted and created, different areas of disk are occupied or freed. Disk manager keeps track of free space list.

Bit map/Bit vector Each disk block represented by one bit. 1 = occupied, 0 = free Bitmaps make finding contiguous blocks of free memory easy.

Linked list Pointer is kept to first free block, will point to next free block and so on, until last free block which it then points to NULL.

Free sequence list Free disk blocks are in contiguous chunks. There is only a need for a pointer to be on the first free block of each of the sequences and recording the number of blocks in sequence.

Chained (linked) allocation is achieved by allowing disk space to be allocated randomly.

First come first serve – I/O requests are served in order in which they reach Shortest Seek Time First – Selects request with minimum seek time from current head position

SCAN scheduling – Disk arm starts at one end of disk, moves towards other end, services requests until it gets to other end of disk, and then the head movement is reversed, and the servicing gets continued.

Circular-Scan – Head moves from other end of disk to other, while it services requests.

Circular Look – Arm goes as far as last request in each direction, then it will reverse direction, without going first all the way to end of disk.

Storage overview

Storage devices hold data including photos, PDFs, movies, word documents, spreadsheets, and more. Data can be stored on flash, hard drives, optical media, etc.

Hard drive overview

They are popular devices for storing data. Hard drives store more data than flash drives. Their capacities also can extend to terabytes. They can also come in different physical sizes. They can be placed inside an external enclosure.

SSD overview

Storage devices that use DRAM for the most part. They eliminate number one cause of hard drive failure. They typically use flash memory as well, installed in laptops and desktops as internal and external units, and many other uses including the medical industry, IT, industrial, and automotive. Write amplification is minimum amount of memory storage space by a write request. Wear leveling erases and writes data using memory blocks instead of same memory blocks repeatedly. NAND flash memory retains the data even if device is powered off. The SLC stores one bit in each memory cell and lasts longer than MLCs. MLCs have more than one bit in each memory cell. SSD provides mechanical and flash tech.

Hard drive interfaces include the IDE or AT attachment, the enhanced IDE standard, and small computer system interface (SCSI). Parallel IDE/Parallel ATA (PATA) supports two devices, meanwhile parallel SCSI supports more. ATA serial device is known as ATA (SATA) device, and SCSI device is known as serial attached SCSI (SAS) device.

Cluster is smallest amount of space that is ready for one file, also made up of a certain number of sectors. A sector is the smallest amount of storage space on disks & platters. A cylinder is a stack on hard drive platters, they are the same number of concentric tracks in all platters.

• Have you used cloud storage in the past? Do you prefer local or cloud storage of your data? Explain your answer. Yes, I have. I prefer cloud storage because it feels more secure. It limits the people that have the capability of accessing the cloud files. There is also less risk of data loss, since the cloud can be accessed on multiple devices.

• Have you encountered RAID in the past? Based on the resilience/performance tradeoffs, which level of RAID do you prefer? I have not encountered RAID in the past. I prefer raid 0 (striping) since it is simple and has good performance. All the storage capacity is used as well. One driver failing doesn’t impact the data of second disk.