Storage management
Table of Contents
Storage management
Creating and deleting files is a key part of storage management, which works alongside memory management.
While memory management handles temporary RAM for running programs, file deletion frees up persistent storage space (like SSD/HDD) by marking data blocks as reusable, though the actual data remains until overwritten.
Both are essential OS functions for efficiently using limited resources.
How File Deletion Works (Storage Management):
- Pointer Removal: When you delete a file (or empty the Recycle Bin), the operating system removes its entry from the file system’s directory, marking the space as available for new data.
- Data Remains (Until Overwritten): The actual bits and bytes of the file stay on the disk until the OS needs that space and writes new information over it.
- Space Reclaimed: The result is that your total available storage capacity increases, allowing new files to be saved.
Relationship to Memory Management:
- Memory Management (RAM): Deals with allocating and deallocating volatile RAM for active programs, processes, and temporary data.
- Storage Management (Disk): Deals with the long-term storage of files and the management of space on hard drives or SSDs.
Deleting files frees up disk space, which indirectly helps system performance by preventing storage from running out, similar to how memory management prevents RAM from filling up.
Reading material
- https://en.wikipedia.org/wiki/File_deletion
- https://www.reddit.com/r/explainlikeimfive/comments/g2rbfc/eli5_how_does_a_computer_delete_something_from/
- https://en.wikipedia.org/wiki/Memory_paging
- https://www.geeksforgeeks.org/operating-systems/file-systems-in-operating-system/
- This is what happens to a file when you delete it from your SSD https://www.makeuseof.com/what-happens-when-you-delete-file-ssd/?utm_source=firefox-newtab-en-us