


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An in-depth exploration of file management and organization in computer systems. It covers various operations such as create, delete, open, close, read, write, append, seek, and renaming files. The document also delves into file structures, file-system organization, file directories, storage device management, and file system layout. Additionally, it discusses concepts like access matrix, protection, security, cryptography, and monoalphabetic substitution.
Typology: Lecture notes
1 / 34
This page cannot be seen from the preview
Don't miss anything!
File Operations Files exist to store information and allow it to be retrieved later. Different systems provide different operations to allow storage and retrieval
the file pointer to a specific place in the file. After this call has completed, data can be read from, or written to, that position.
File-system Organization
Basic File System
Rename .Directories are just like files and can be renamed the same way files can be. Link. Linking is a technique that allows a file to appear in more than one directory. Two-Level Directory Two-Level Scheme
Computer systems must provide mass storage for permanently storing files and data. Modern secondary storage is structured as large one-dimensional arrays of logical block. Drive Formatting, Partitions, and Volumes Before a storage device can store data, it must be divided into sectors that the controller can read and write. NVM pages must be initialized. This process is called low-level formatting, or physical formatting. Low-level formatting fills the device with a special data structure for each storage location. The first step is to partition the device into one or more groups of blocks or pages.
The second step is volume creation and management .. That volume is then ready to be mounted and used. Mounting a file system is making the file system available for use by the system and its users The third step is logical formatting , or creation of a file system. In this step, the operating system stores the initial file-system data structures onto the device. These data structures may include maps of free and allocated space and an initial empty directory. To increase efficiency, most file systems group blocks together into larger chunks, frequently called clusters FILE SYSTEM LAYOUT File systems are stored on disks. Most disks can be divided up into one or more partitions , with independent file systems on each partition. Sector 0 of the disk is called the MBR (Master Boot Record) and is used to boot the computer. The end of the MBR contains the partition table. This table gives the starting and ending addresses of each partition. One of the partitions in the table is marked as active. When the computer is booted, the BIOS reads in and executes the MBR. The first thing the MBR program does is locate the active partition, read in its first block, which is called the boot block, and execute it. The program in the boot block loads the operating system contained in that partition. Method for keeping track of which blocks belong to which file is to associate with each file a data struct ure called an i-node (index-node ), which lists the attributes and disk addresses of the file’s blocks. Caching The most common technique used to reduce disk accesses is the block cache or buffer cache. File allocation table (FAT) – Data structure used to keep track of the portions assigned to a file.
Figure HDD moving-head disk mechanism. The bulk of secondary storage for modern computers is provided by hard disk drives (HDDs ) and nonvolatile memory (NVM ) devices. Each disk platter has a flat circular shape, like a CD. Common platter diameters range from 1.8 to 3.5 inches. The two surfaces of a platter are covered with a magnetic material. We store information by recording it magnetically on the platters, and we read information by detecting the magnetic pattern on the platters. A read – write head “files ” just above each surface of every platter. The heads are attached to a disk arm that moves all the heads as a unit. The surface of a platter is logically divided into circular tracks , which are subdivided into sectors.
The set of tracks at a given arm position make up a cylinder. The transfer rate is the rate at which data flow between the drive and the computer. Another performance aspect, the positioning time, or random-access time , consists of two parts: the time necessary to move the disk arm to the desired cylinder , called the seek time , and the time necessary for the desired sector to rotate to the disk head , called the rotational latency NVM devices are electrical rather than mechanical. Flash-memory-based NVM is frequently used in a disk-drive-like container, in which case it is called a solid-state disk (SSD ). In other instances, it takes the form of a USB drive (also known as a thumb drive or flash drive) or a DRAM stick The simplest form of disk scheduling is, of course, the first-come, first-served (FCFS ) algorithm (or FIFO). This algorithm is intrinsically fair, but it generally does not provide the fastest service. scheduling algorithms with a request queue (0-199) 98, 183, 37, 122, 14, 124, 65, 67 Head pointer 53