ArticleslgStudy

computer science

Disk partitioning

Disk partitioning is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Disk partitioning rather than just read about it. In short: Disk partitioning or disk slicing is the creation of one or more regions on secondary storage, so that each region can be managed separately. These regions are called partitions.

Disk partitioning — main illustration
Disk partitioning — illustration

Key takeaways

  • Disk partitioning belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Disk partitioning to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Disk partitioning from memory before moving on to harder problems.

Reference excerpt

Disk partitioning or disk slicing is the creation of one or more regions on secondary storage, so that each region can be managed separately. These regions are called partitions. It is typically the first step of preparing a newly installed disk after a partitioning scheme is chosen for the new disk before any file system is created. The disk stores the information about the partitions' locations and sizes in an area known as the partition table that the operating system reads before any other part of the disk. Each partition then appears to the operating system as a distinct "logical" disk that uses part of the actual disk. System administrators use a program called a partition editor to create, resize, delete, and manipulate the partitions. Partitioning allows the use of different filesystems to be installed for different kinds of files. Separating user data from system data can prevent the system partition from becoming full and rendering the system unusable. Partitioning can also make backing up easier. A disadvantage is that it can be difficult to properly size partitions, resulting in having one partition with too much free space and another nearly totally allocated.

History One of the earliest such forms of segmentation of a disk drive was IBM's 1966 usage in its CP-67 operating system of minidisk as a separate segment of a hard disk drive. Data General's RDOS operating system for their Nova computers used the term partition for subregions of a disk. Each partition had its own directory. IBM in its 1983 release of PC DOS version 2.0 also used the term partition to describe dividing a block storage device such as an HDD into physical segments. The term's usage is now ubiquitous. Other terms used include logical disk, minidisk, portions, pseudo-disk, section, slice and virtual drive.

Partitioning schemes

DOS, Windows, and OS/2 With DOS, Microsoft Windows, and OS/2, a common practice is to use one primary partition for the active file system that will contain the operating system, the page/swap file, all utilities, applications, and user data. On most Windows consumer computers, the drive letter C: is routinely assigned to this primary partition. Other partitions may exist on the HDD that may or may not be visible as drives, such as recovery partitions or partitions with diagnostic tools or data. (Windows drive letters do not correspond to partitions in a one-to-one fashion, so there may be more or fewer drive letters than partitions.) Microsoft Windows 2000 and later versions include a 'Disk Management' program which allows for the creation, deletion and resizing of FAT and NTFS partitions. The Windows Disk Manager in Windows Vista and Windows 7 utilizes a 1 MB partition alignment scheme which is fundamentally incompatible with Windows 2000, XP, OS/2, DOS as well as many other operating systems.

Unix-like systems On Unix-based and Unix-like operating systems such as Linux, macOS, BSD, and Solaris, it is possible to use multiple partitions on a disk device. Each partition can be formatted with a file system or as a swap partition. Multiple partitions allow directories such as /boot, /tmp, /usr, /var, or /home to be allocated their own filesystems. Such a scheme has a number of advantages:

If one file system gets corrupted, the data outside that filesystem/partition may stay intact, minimizing data loss. Specific file systems can be mounted with different parameters, e.g., read-only, or with the execution of setuid files disabled. A runaway program that uses up all available space on a non-system filesystem does not fill up critical filesystems. Keeping user data such as documents separate from system files allows the system to be updated with lessened risk of disturbing the data. A common minimal configuration for Linux systems is to use three partitions: one holding the system files mounted on "/" (the root directory), one holding user configuration files and data mounted on /home (home directory), and a swap partition. By default, macOS systems also use a single partition for the entire filesystem and use a swap file inside the file system (like Windows) rather than a swap partition. In Solaris, partitions are sometimes known as slices. This is a conceptual reference to the slicing of a cake into several pieces. The term "slice" is used in the FreeBSD operating system to refer to Master Boot Record partitions, to avoid confusion with FreeBSD's own disklabel-based partitioning scheme. However, GUID Partition Table partitions are referred to as "partition" worldwide.

Multi-boot systems

Multi-boot systems are computers where the user can boot into more than one distinct operating system (OS) stored in separate storage devices or in separate partitions of the same storage device. In such systems a menu at startup gives a choice of which OS to boot/start (and only one OS at a time is loaded). This is distinct from virtual operating systems, in which one operating system is run as a self-contained virtual "program" within another already-running operating system. (An example is a Windows OS "virtual machine" running from within a Linux OS.)

GUID Partition Table

The GUID Partition Table (GPT) (GUID is from Globally Unique IDentifier) is a part of the Unified Extensible Firmware Interface (UEFI) standard for the layout of the partition table on a physical hard disk. Many operating systems now support this standard. However, Windows does not support this on BIOS based computers.

Partition recovery When a partition is deleted, its entry is removed from a table and the data is no longer accessible. The data remains on the disk until it is overwritten. Specialized recovery utilities may be able to locate lost file systems and recreate a partition table which includes entries for these recovered file systems. Some disk utilities may overwrite a number of beginning sectors of a partition they delete. For example, if Windows Disk Management (Windows 2000/XP, etc.) is used to delete a partition, it will overwrite the first sector (relative sector 0) of the partition before removing it. It still may be possible to restore a FAT or NTFS partition if a backup boot sector is available.

… excerpt ends here. Continue reading the full article.

Illustrations

Disk partitioning: GParted is a popular utility used for disk partitioning
GParted is a popular utility used for disk partitioning
Disk partitioning: A GRUB startup menu showing Ubuntu Linux (with three different boot modes) and Windows Vista options
A GRUB startup menu showing Ubuntu Linux (with three different boot modes) and Windows Vista options

Worked examples

Example 1 — a first encounter with Disk partitioning

Start with the simplest possible case. Write down what Disk partitioning claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Disk partitioning before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Disk partitioning ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Disk partitioning

In research
Disk partitioning appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Disk partitioning in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Disk partitioning is common in secondary-school and first-year university syllabi. It links to neighbouring topics DOS on IBM PC compatibles, Disk file systems, Disk partitions, so understanding it makes those chapters shorter.
In everyday life
Look for Disk partitioning outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Disk partitioning” →

How to study Disk partitioning in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Disk partitioning means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Disk partitioning out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Disk partitioning in simple terms?

Disk partitioning or disk slicing is the creation of one or more regions on secondary storage, so that each region can be managed separately. These regions are called partitions.

Why does Disk partitioning matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Disk partitioning?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Disk partitioning.

Tags

  • DOS on IBM PC compatibles
  • Disk file systems
  • Disk partitions
  • IBM PC compatibles
  • Utility software types

Keep exploring