TechKnowSurge
CompTIA Tech+ 3.1 CompTIA Tech+ 2.5 CompTIA A+ Core 2 1.8 CompTIA A+ Core 1 3.3 CompTIA A+ Core 2 1.3
VideoComputeFree

OS Functions: Disk Management

The operating system plays a central role in managing how data is read from, written to, and presented from physical storage devices. This content covers storage media types, cluster-based data organization, file fragmentation, and OS-level data protection.

Complete this video to capture a CTF flag worth 1 point.

About this video

Storage devices hold all data as binary sequences, but the operating system abstracts that complexity into familiar file icons, folder structures, and navigation interfaces. The OS serves as the critical intermediary between the physical hardware and the user, using protocols and interfaces to manage communication with devices including magnetic hard drives, solid-state drives, and optical media. Its core responsibilities include reading data from storage, writing data to storage, presenting that data in a usable format, and preparing and managing devices as needed. At the physical level, storage is divided into fixed-size units called clusters, with 4,096 bytes being a common standard. A single file may occupy one cluster or span many, depending on its size. When files are edited and expanded over time, the OS may not find enough contiguous free clusters to store the updated data in one location, so it splits the file across multiple non-adjacent areas of the disk. This condition is known as fragmentation, and the OS must track all fragment locations to correctly retrieve a complete file. Fragmentation becomes more pronounced as a drive fills up and files are repeatedly modified. A practical demonstration using Sysinternals DiskView 64 visualizes this directly, showing individual clusters color-coded by status — unused, contiguous, or fragmented. Files broken into dozens or even hundreds of scattered cluster groups are clearly visible, reinforcing why OS-level storage management is essential to system performance and data integrity. Beyond organization and retrieval, the OS also enforces access controls that protect stored data from unauthorized reading or modification.

What you'll learn

What's covered

OS Storage Management

Aligned to

CompTIA Tech+
3.1 Explain the purpose of operating systems.
2.5 Compare and contrast storage types.
CompTIA A+ Core 2
1.8 Explain common OS types and their purposes.
1.3 Given a scenario, use features and tools of the Microsoft Windows 10/11 operating system (OS).
CompTIA A+ Core 1
3.3 Given a scenario, select and install storage devices.

Key terms

Operating System
OS
System software that manages hardware resources, provides common services for application software, and acts as an intermediary between users and computer hardware. Examples include Windows, macOS, and Linux.
Storage Device
Physical hardware such as magnetic drives, solid-state drives, or optical drives used to store data as ones and zeros.
Cluster
The smallest unit of disk space that a file system allocates when storing data; a file occupies at least one cluster even if it is smaller, with common cluster sizes of 4,096 bytes.
File Fragmentation
A condition where a file is stored in non-consecutive clusters across a storage volume, requiring the OS to retrieve data from multiple locations.
Volume
A logical partition of a storage device that the operating system manages as a single accessible unit for reading and writing data.

Topics

Operating Systems Disk Management File Systems Data Storage File Fragmentation Disk Clusters Storage Devices

Transcript

Storage on your computer is just made up of ones and zeros, and so any file is just a series of ones and zeros to represent different characters, graphics, programs, whatever the case may be. That's what goes onto the storage. However, that's not what we see in the operating system. Instead, the operating system represents it in little file icons and folder icons, and it displays it in some sort of organized folder fashion.

Storage Devices and the Operating System's Role

Here's some different media and devices that we can store data on. At the bottom here we have our magnetic storage, in the middle we have our solid state, and at the top we have our optical drive. Really, all of this provides this physical aspect to the computer so the computer can actually store data onto it, and then we have a protocol or interface to allow that communication to and from these devices. But the operating system needs to know how to input data through these protocols and interfaces onto these devices, and so that's really what the operating system does: it takes a big part in reading and writing data to these devices.

So now we have these physical devices, but your operating system really does a lot of coordination and figures out how to write data to these devices and also read data from these devices, and that's one of the jobs of an operating system.

Clusters and Fragmentation

Your storage drive is made up of clusters. Clusters are little sections of the disk, and there's a bunch of ones and zeros. There's different sizes, but one of the standard sizes is 4,096 bytes, and so each one of these clusters would be 4,096 bytes and it would be a series of ones and zeros. Now, sometimes a file will fit neatly inside of that. More often than not it doesn't, and it will take up many clusters to store a file.

Just to give you an idea how these files work, let's talk about fragmentation. Let's say I open up a file, I add some graphics to it, I save it, and it's a fairly large file. So what's going to happen is it's quite a bit larger than 4,096, and so it takes up a lot of clusters on the disk. Right here we have file one that's saved and it's taking up quite a few clusters. Now we create a new document, it's not quite as big, but we still save it and it's file two, and that's stored right here. If we go back and make a change to file one and add something, that's going to need more space, and there's no consecutive space now that's available for it. What's going to have to happen is it's going to store it in the next available slot, and so now file one gets stored here. As you can see, we have fragmentation: that file one is split amongst two areas here.

What the Operating System Provides

The operating system needs to know how to retrieve information from and put information into these different little containers that are on this device. But it can get a little confusing if we're just pulling data in and out of these little containers, and so we need some sort of representation of how to grab this information. So another thing that your operating system does is it provides navigation, so you can see the data that's actually stored in these devices.

In fact, if we want to break this down, your operating system does reads in from the system, it does writes to the system, it presents information that's on these devices, and then we also can use our operating system to prepare and manage these devices.

Another thing that your operating system is capable of doing is protecting the data on your device. That is, we don't want anybody just to be able to get onto our device and read all of our personal stuff, or be able to change the stuff that we have on it, and so there's this additional protection where it protects the data that's stored on these devices.

Visualizing Clusters with DiskView

I'm on my demo laptop and I want to show you a visualization of these clusters. What I'm going to do is open up a program that's part of Sysinternals, and it's called DiskView64. So I'm going to open this up. It shows me the user account control, so yes, I'll accept that, and then I choose the drive down here of what I want to analyze. I'm just going to select the C drive, and then we'll make this a little bit bigger. As it goes, it's going to take a couple of minutes to do the full scan, so we'll wait till it does a full scan and then we'll talk about what's happening. But essentially all of what it's filling in right here, what we're seeing it filling in, is all of the clusters of this disk.

All right, now it's finished its scan; it took a couple of minutes to do. So what are we looking at? Down here at the bottom, this is showing you the full disk. This is the full disk, and the white space on here is an empty part of the disk. I can actually take a look at the legend to see what things mean. So the white is unused clusters, the blue is contiguous file clusters, the red means it's a fragmented file cluster, and the yellow just means it's highlighted.

So let's take a look at some of this. I'm going to zoom in a little bit. First of all, if I click down here I can select different parts of the disk, so I'm just going to start out right at the beginning here and we're going to zoom in so it'll get closer. All these dots, each one of those dots is a cluster. So you can see I can zoom really far in here. I'm not going to zoom quite that close in, but I can click on this and now it's showing you a file. That's a file right there. In fact I can see which file it is; it's this file right there, and then it shows you also the folder that it's in.

So I can click on another one, and that one is there's the file right there, and this is the folder, the directory, that it's in. So I can go through and scroll through, and you can see this one is a much bigger file taking up many clusters there. Let me click one of these red ones here. The red one meant that it's been fragmented, so I can actually open this up and see the different fragments. So this has been fragmented into three, well, it's 54 clusters but broken into three spots here. So there is that file right there.

I've got another file I'm going to show you, and I like this one just because it's broken into lots of clusters. So I'm going to paste it in here and do a show next, and there we have it. We can see that this particular one is broken into lots; there's 389 clusters and it's fragmented all over the drive here, so quite a bit.

So that is how these disk systems store their data in these clusters, and something's got to manage all of the retrieving of this data and sending the data to it, and so your operating system is in charge of all that.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →