How unit 4 is examined
This unit covers files, disks and tapes, allocation and free-space methods, directories, protection and file systems. Disk scheduling (SCAN, LOOK, SSTF numericals), allocation and free-space management, file concept and disk structure carry the marks.
File Concept
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. <mark>A file is a named collection of related information stored on secondary storage, which the operating system presents as the smallest logical unit of storage.</mark>
Key points.
- A file is a logical unit: the user sees a named stream of bytes or records, while the OS hides the physical disk blocks behind it.
- Attributes are name, type, location, size, protection (read/write/execute permissions), owner, and creation, modification and last-access time.
- Basic operations are create, write, read, reposition (seek), delete and truncate; open and close bracket every use.
- Sequential access reads records one after another from the start, as on tape; direct (random) access jumps to any block number directly.
- Sequential access suits log files, payroll batch runs, backups and video playback, where every record is processed in order.
- Random access suits databases, airline reservation and array files, where one record must be fetched quickly without reading the rest.
- File type tracking: the OS can protect files and map each type to the correct program (for example run only executables), but it makes the system more complex and less flexible.
| Type tracked by OS (Windows, Mac) | Left to user (UNIX) |
|---|---|
| Wrong operations refused, files opened with right program | Any file can be treated as plain bytes, so it is flexible |
| Needs extra code and rigid type rules | Simple OS, but the user can misuse a file |
Answer frame. Open with the definition; list attributes then operations for Q7 and close with "the file system manages these". For the type question give both columns of the table and judge that tracking the type is better for protection, while the UNIX byte-stream style is better for simplicity. For access, define sequential then random, give one example each and justify.
Asked: [7 marks] (Nov 2023) What is a File? Write different file attributes and operations? Asked: [7 marks] (Jun 2024) Why do some systems keep track of the type of file, while others leave it to the user or do not implement multiple file types? Which system is better? Asked: [7 marks] (Jun 2025) Give an example of an application in which data in a file should be accessed (i) sequentially (ii) randomly.
User's and System Programmer's view of File System
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. The user's view is how files and directories appear (names, types, access and folders); the system programmer's view is how they are implemented on the disk.
Key points.
- The user sees files, their names, attributes, operations and the directory tree, and does not care where blocks lie.
- The system programmer sees data structures: allocation of blocks, free-space lists, directory entries and buffers.
- The file system maps the user's logical file to physical disk blocks, hiding the difference.
- The programmer works on performance, reliability and space use of this mapping.
Disk Organization
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. <mark>A disk is organised as circular platters coated with magnetic material, each divided into concentric tracks, each track into sectors, and the same track on all platters forms a cylinder.</mark>
Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u4-01" viewBox="0 0 517 322" width="517" height="322" role="img" aria-label="Disk hierarchy. Cylinder = the same track number on every surface."><style>#dsfig-u4-01 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u4-01 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u4-01 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u4-01 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u4-01 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u4-01 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u4-01 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u4-01 .t{fill:#16181D;font-weight:500}#dsfig-u4-01 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u4-01 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u4-01 .dot{fill:#16181D}#dsfig-u4-01 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u4-01 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u4-01 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u4-01 .ah{fill:#454C5A}#dsfig-u4-01 .ah.hi{fill:#2340B8}#dsfig-u4-01 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u4-01 .wl .t{font-size:12px;font-weight:700}#dsfig-u4-01 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u4-01 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u4-01 .e{stroke:#B1B7C3}html.dark #dsfig-u4-01 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u4-01 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u4-01 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u4-01 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u4-01 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u4-01 .t{fill:#E6E8ED}html.dark #dsfig-u4-01 .t.inv{fill:#0F1115}html.dark #dsfig-u4-01 .kd{stroke:#E6E8ED}html.dark #dsfig-u4-01 .dot{fill:#E6E8ED}html.dark #dsfig-u4-01 .ann{fill:#8FA3FF}html.dark #dsfig-u4-01 .lbl{fill:#858D9C}html.dark #dsfig-u4-01 .ptr{fill:#8FA3FF}html.dark #dsfig-u4-01 .ah{fill:#B1B7C3}html.dark #dsfig-u4-01 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u4-01 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u4-01 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u4-01 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah5" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh5" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><line class="e" x1="432.5" y1="37" x2="339.5" y2="101"/><line class="e" x1="339.5" y1="101" x2="246.5" y2="165"/><line class="e" x1="246.5" y1="165" x2="153.5" y2="229"/><line class="e" x1="153.5" y1="229" x2="60.5" y2="293"/><rect class="n" x="406.5" y="22" width="52" height="30" rx="8"/><text class="t" x="432.5" y="37" dy=".35em" text-anchor="middle">Disk</text><rect class="n" x="298" y="86" width="83" height="30" rx="8"/><text class="t" x="339.5" y="101" dy=".35em" text-anchor="middle">Platters</text><rect class="n" x="209" y="150" width="75" height="30" rx="8"/><text class="t" x="246.5" y="165" dy=".35em" text-anchor="middle">Surface</text><rect class="n" x="120" y="214" width="67" height="30" rx="8"/><text class="t" x="153.5" y="229" dy=".35em" text-anchor="middle">Tracks</text><rect class="n" x="23" y="278" width="75" height="30" rx="8"/><text class="t" x="60.5" y="293" dy=".35em" text-anchor="middle">Sectors</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Disk hierarchy. Cylinder = the same track number on every surface.</figcaption></figure>
Key points.
- A disk pack has several platters on a spindle, and each platter has two surfaces, one read/write head per surface, all mounted on one arm assembly that moves together.
- A track is a ring on a surface, a sector is the smallest unit of transfer (usually 512 bytes), and a cylinder is the set of tracks under all heads at one arm position.
- The disk controller receives the request, moves the arm, selects the head and moves data between disk and memory.
- Access time = seek time (arm to correct cylinder) + rotational latency (sector to rotate under the head) + transfer time.
- To read, the controller gets the block address, seeks to the cylinder, waits for the sector to rotate under the head, then transfers the data; writing follows the same steps but magnetises the surface.
- Seek time dominates, so allocation and scheduling try to reduce arm movement.
Answer frame. Open with the definition; draw a platter with tracks, sectors, arm and heads and label cylinder; then points 1-3, the read/write steps (point 5) and the access-time sum; close with "seek time is the main cost".
Asked: [7 marks] (Nov 2023, Jun 2026) Explain disk structure. How data read and write from/on disk?
Tape Organization
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. Magnetic tape is a long plastic strip coated with magnetic material, storing data in tracks along its length and accessed sequentially.
Key points.
- Advantages: tape is very cheap per byte and has very high capacity.
- It is portable and durable in storage, so it is ideal for backup and archives.
- Disadvantages: access is sequential, so finding a record means winding the tape and is very slow.
- It is sensitive to heat, dust and magnetic fields, and cannot be updated in place.
- Conclusion: tape is used for backup and archival, not for online data.
Asked: [7 marks] (Jun 2023) List the advantages and disadvantages of Magnetic Tape memory.
Different Modules of a File System
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. The file system is built in layers, each using the services of the layer below.
Key points.
- Application programs call the logical file system, which manages directories and metadata (file control blocks).
- The file-organisation module maps logical blocks to physical blocks and manages free space.
- The basic file system issues generic block read/write commands to the device driver.
- The I/O control layer (drivers and interrupt handlers) talks to the hardware.
Disk Space Allocation Methods – Contiguous, Linked, Indexed
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. <mark>Allocation decides which disk blocks store a file; the three methods are contiguous, linked and indexed.</mark>
Key points.
- Contiguous: the file occupies consecutive blocks, so the directory stores start and length; access is fast and supports direct access, but it has external fragmentation and files are hard to grow.
- Linked: each block holds a pointer to the next; there is no external fragmentation and files grow easily, but access is sequential only and a lost pointer breaks the file.
- Indexed: one index block holds all block addresses of the file; it supports direct access with no external fragmentation, but wastes space on the index block.
- Mapping (blocks of 512 bytes, logical address LA): let $Q = LA/512$ and $R = LA \bmod 512$.
- Contiguous: the block is $Q +$ start address and the displacement is $R$.
- Linked (511 data bytes plus 1 pointer byte): $Q = LA/511$; follow the chain through $Q$ blocks; displacement is $R+1$.
- Indexed: read the index entry number $Q$ from the index block already in memory (file under 512 blocks, so one index block); that entry is the physical block, displacement $R$.
- Free-space management: a bit vector holds one bit per block (1 = free) and is simple; a linked list links free blocks; grouping stores $n$ free block addresses in the first free block; counting stores the first free block and the number of following free blocks.
Answer frame. For free space, open with why the OS must track free blocks, then give the four methods with one line each and a small bitmap example such as 1100101; for Q6 state assumptions, then contiguous, linked and indexed in order; close with the trade-off.
Asked: [7 marks] (Jun 2023) Explain in detail about various ways of free space management. Asked: [7 marks] (Jun 2024) With 512-byte logical and physical blocks, how is logical to physical address mapping done for contiguous, linked and indexed allocation (indexed file under 512 blocks)?
Directory Structures
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. A directory is a file that holds entries (name and attributes) of other files; a file is a collection of related information.
Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u4-02" viewBox="0 0 286 262" width="286" height="262" role="img" aria-label="Tree-structured directory as in UNIX (root is the top)"><style>#dsfig-u4-02 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u4-02 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u4-02 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u4-02 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u4-02 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u4-02 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u4-02 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u4-02 .t{fill:#16181D;font-weight:500}#dsfig-u4-02 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u4-02 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u4-02 .dot{fill:#16181D}#dsfig-u4-02 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u4-02 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u4-02 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u4-02 .ah{fill:#454C5A}#dsfig-u4-02 .ah.hi{fill:#2340B8}#dsfig-u4-02 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u4-02 .wl .t{font-size:12px;font-weight:700}#dsfig-u4-02 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u4-02 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u4-02 .e{stroke:#B1B7C3}html.dark #dsfig-u4-02 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u4-02 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u4-02 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u4-02 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u4-02 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u4-02 .t{fill:#E6E8ED}html.dark #dsfig-u4-02 .t.inv{fill:#0F1115}html.dark #dsfig-u4-02 .kd{stroke:#E6E8ED}html.dark #dsfig-u4-02 .dot{fill:#E6E8ED}html.dark #dsfig-u4-02 .ann{fill:#8FA3FF}html.dark #dsfig-u4-02 .lbl{fill:#858D9C}html.dark #dsfig-u4-02 .ptr{fill:#8FA3FF}html.dark #dsfig-u4-02 .ah{fill:#B1B7C3}html.dark #dsfig-u4-02 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u4-02 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u4-02 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u4-02 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah6" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh6" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><line class="e" x1="143.5" y1="39" x2="56" y2="103"/><line class="e" x1="143.5" y1="39" x2="156" y2="103"/><line class="e" x1="143.5" y1="39" x2="231" y2="103"/><line class="e" x1="56" y1="103" x2="31" y2="167"/><line class="e" x1="56" y1="103" x2="81" y2="167"/><line class="e" x1="156" y1="103" x2="131" y2="167"/><line class="e" x1="156" y1="103" x2="181" y2="167"/><line class="e" x1="131" y1="167" x2="131" y2="231"/><line class="e" x1="181" y1="167" x2="181" y2="231"/><rect class="n" x="117.5" y="24" width="52" height="30" rx="8"/><text class="t" x="143.5" y="39" dy=".35em" text-anchor="middle">root</text><circle class="n" cx="56" cy="103" r="17"/><text class="t" x="56" y="103" dy=".35em" text-anchor="middle">bin</text><circle class="n" cx="31" cy="167" r="17"/><text class="t" x="31" y="167" dy=".35em" text-anchor="middle">ls</text><circle class="n" cx="81" cy="167" r="17"/><text class="t" x="81" y="167" dy=".35em" text-anchor="middle">cp</text><circle class="n" cx="156" cy="103" r="17"/><text class="t" x="156" y="103" dy=".35em" text-anchor="middle">usr</text><circle class="n" cx="131" cy="167" r="17"/><text class="t" x="131" y="167" dy=".35em" text-anchor="middle">ann</text><circle class="n" cx="131" cy="231" r="17"/><text class="t" x="131" y="231" dy=".35em" text-anchor="middle">a.c</text><circle class="n" cx="181" cy="167" r="17"/><text class="t" x="181" y="167" dy=".35em" text-anchor="middle">bob</text><circle class="n" cx="181" cy="231" r="17"/><text class="t" x="181" y="231" dy=".35em" text-anchor="middle">b.c</text><circle class="n" cx="231" cy="103" r="17"/><text class="t" x="231" y="103" dy=".35em" text-anchor="middle">etc</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Tree-structured directory as in UNIX (root is the top)</figcaption></figure>
Key points.
- Single-level: all files in one directory, so names must be unique and it is hard to manage.
- Two-level: one directory per user, so names can repeat across users but users cannot group files.
- Tree-structured: directories inside directories, with absolute and relative paths; it is the most common.
- Acyclic graph: files or directories can be shared through links, but there are no cycles.
- General graph: cycles are allowed, which needs garbage collection.
- UNIX uses a tree structure (with links) starting at the root "/".
Asked: [7 marks] (Jun 2023) What is a file? Briefly explain different directory structures. What kind of directory structure is used in UNIX?
File Protection
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. Protection controls who may read, write or execute a file.
Key points.
- An access-control list attaches to each file the users and operations allowed.
- UNIX groups users as owner, group and others, each with read, write, execute bits (rwx).
- Passwords on files or directories are another way, but many passwords are hard to remember.
- Protection guards against improper access, while reliability guards against loss through backups.
System Calls for File Management
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. System calls are the interface through which programs ask the OS to work on files.
Key points.
- Common calls are create, open, read, write, seek (reposition), close and delete.
- open returns a file descriptor that later calls use.
- read and write transfer bytes from the current file position, and seek moves that position.
- close releases the descriptor, and unlink deletes the file.
Disk Scheduling Algorithms
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. <mark>Disk scheduling orders pending disk requests so as to reduce total seek time (arm movement).</mark>
Formula. Total seek distance $= \sum |c_{i+1} - c_i|$ over the order of service.
Key points.
- FCFS serves requests in arrival order; it is fair but has long arm movement.
- SSTF serves the nearest cylinder first; it has low movement but can starve far requests.
- SCAN (elevator) moves the arm to one end of the disk, serving requests on the way, then reverses.
- LOOK is SCAN, but the arm turns back at the last request in each direction and does not go to the disk end, so it has less movement and shorter waits.
| SCAN | LOOK |
|---|---|
| Goes to the disk end (0 or 199) | Goes only to the last request |
| Longer arm movement | Shorter movement |
| Wastes time near the ends | More efficient |
Example (Q4a). 200 cylinders, queue 23, 89, 132, 42, 187; the head position is not given, so assume head at 100 moving up.
| Algorithm | Path | Distance |
|---|---|---|
| SCAN | 100 to 132, 187, then 199, then down to 89, 42, 23 | $(199-100)+(199-23)=275$ |
| LOOK | 100 to 132, 187, then down to 89, 42, 23 | $(187-100)+(187-23)=251$ |
SCAN = 275, LOOK = 251 cylinders, so LOOK is shorter.
Example (Q4b). 5000 cylinders, head 143 (previous 125, so moving up), queue 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 750, 750, 750, 130.
- SSTF order 130, 86, 750, 750, 750, 913, 948, 1022, 1470, 1509, 1750, 1774: $13+44+664+163+35+74+448+39+241+24=1745$.
- SCAN goes up to 4999, then down to 86: $(4999-143)+(4999-86)=9769$.
- LOOK goes up to 1774, then down to 86: $(1774-143)+(1774-86)=3319$.
SSTF = 1745, SCAN = 9769, LOOK = 3319 cylinders.
Answer frame. For the numerical write the given data and the assumption, the order of service, each term of the sum and the boxed totals, and then compare. For the difference question open with the elevator idea, give the table and close with the example totals 275 and 251.
Asked: [7 marks] (Jun 2023, Jun 2025) 200 cylinders (0-199), queue 23, 89, 132, 42, 187: total distance for SCAN and LOOK. Also 5000 cylinders, head 143 (previous 125), queue 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 750, 750, 750, 130: total distance for SSTF, SCAN, LOOK. Asked: [7 marks] (Nov 2023) What is the difference between SCAN and LOOK disk scheduling algorithms?
File Systems in UNIX & Windows
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. Linux uses the ext family of file systems, and Windows uses FAT and NTFS.
Key points.
- Linux ext2 has no journal; ext3 adds journaling, and ext4 adds extents, large files and volumes up to about 1 EB.
- Linux has UNIX permissions (owner, group, others) and a single tree rooted at "/".
- Windows FAT (FAT16, FAT32) is simple with a file allocation table, no security and a 4 GB file limit on FAT32; it is used on pen drives.
- NTFS adds journaling, ACL permissions, compression, encryption and very large files; it is used for Windows system drives.
- Windows uses drive letters (C:) for volumes.
Asked: [7 marks] (Jun 2023) Explain file system used in Linux and Windows.
Last-minute revision
- A file is a named collection of related information; attributes are name, type, size, location, protection, time.
- File operations: create, write, read, seek, delete, truncate.
- Cylinder = same track on all platters; access time = seek + rotational latency + transfer.
- Tape: cheap, high capacity, sequential and slow; used for backup.
- Contiguous: fast but fragments; linked: no random access; indexed: index block.
- Free space: bit vector, linked list, grouping, counting.
- Directories: single, two-level, tree, acyclic graph, general graph; UNIX uses a tree.
- SCAN goes to the disk ends, LOOK goes only to the last request.
- Paper numbers: SCAN 275 and LOOK 251 (head 100); SSTF 1745, SCAN 9769, LOOK 3319.
- ext4 and NTFS are journaling file systems; FAT has none.
Memory hooks
- Attributes "NTSLP": Name, Type, Size, Location, Protection.
- SCAN is a lift going to the top floor; LOOK turns at the last button pressed.
- Contiguous = row of seats, linked = treasure hunt, indexed = book index.
- Free space "BLGC": Bitmap, Linked, Grouping, Counting.
Coverage checklist
- File Concept: Nov 2023 attributes/operations, Jun 2024 file type, Jun 2025 sequential/random.
- User's and System Programmer's view of File System: no past question.
- Disk Organization: Nov 2023, Jun 2026 disk structure and read/write.
- Tape Organization: Jun 2023 tape advantages and disadvantages.
- Different Modules of a File System: no past question.
- Disk Space Allocation Methods – Contiguous, Linked, Indexed: Jun 2023 free space, Jun 2024 address mapping.
- Directory Structures: Jun 2023 directory structures and UNIX.
- File Protection: no past question.
- System Calls for File Management: no past question.
- Disk Scheduling Algorithms: Jun 2023, Jun 2025 numerical; Nov 2023 SCAN vs LOOK.
- File Systems in UNIX & Windows: Jun 2023 Linux and Windows file systems.