- Operating System — File System
- File Structure
- File Type
- Ordinary files
- Directory files
- Special files
- File Access Mechanisms
- Sequential access
- Direct/Random access
- Indexed sequential access
- Space Allocation
- Windows System Files: Where They Are Stored, How to Display or Restore Them
- What files are system files?
- Where are system files stored?
- How to display hidden system files in Windows?
- What happens if system files are damaged?
Operating System — File System
A file is a named collection of related information that is recorded on secondary storage such as magnetic disks, magnetic tapes and optical disks. In general, a file is a sequence of bits, bytes, lines or records whose meaning is defined by the files creator and user.
File Structure
A File Structure should be according to a required format that the operating system can understand.
A file has a certain defined structure according to its type.
A text file is a sequence of characters organized into lines.
A source file is a sequence of procedures and functions.
An object file is a sequence of bytes organized into blocks that are understandable by the machine.
When operating system defines different file structures, it also contains the code to support these file structure. Unix, MS-DOS support minimum number of file structure.
File Type
File type refers to the ability of the operating system to distinguish different types of file such as text files source files and binary files etc. Many operating systems support many types of files. Operating system like MS-DOS and UNIX have the following types of files −
Ordinary files
- These are the files that contain user information.
- These may have text, databases or executable program.
- The user can apply various operations on such files like add, modify, delete or even remove the entire file.
Directory files
- These files contain list of file names and other information related to these files.
Special files
- These files are also known as device files.
- These files represent physical device like disks, terminals, printers, networks, tape drive etc.
These files are of two types −
Character special files − data is handled character by character as in case of terminals or printers.
Block special files − data is handled in blocks as in the case of disks and tapes.
File Access Mechanisms
File access mechanism refers to the manner in which the records of a file may be accessed. There are several ways to access files −
- Sequential access
- Direct/Random access
- Indexed sequential access
Sequential access
A sequential access is that in which the records are accessed in some sequence, i.e., the information in the file is processed in order, one record after the other. This access method is the most primitive one. Example: Compilers usually access files in this fashion.
Direct/Random access
Random access file organization provides, accessing the records directly.
Each record has its own address on the file with by the help of which it can be directly accessed for reading or writing.
The records need not be in any sequence within the file and they need not be in adjacent locations on the storage medium.
Indexed sequential access
- This mechanism is built up on base of sequential access.
- An index is created for each file which contains pointers to various blocks.
- Index is searched sequentially and its pointer is used to access the file directly.
Space Allocation
Files are allocated disk spaces by operating system. Operating systems deploy following three main ways to allocate disk space to files.
- Contiguous Allocation
- Linked Allocation
- Indexed Allocation
Windows System Files: Where They Are Stored, How to Display or Restore Them
Read about what files are called system files, their names and extensions, and where you can find them. We’ll find out what to do if system files get damaged and how they can be restored with the SFC checking tool.
A personal computer, smartphone, tablet PC, laptop – everyone knows these words, and we see and use these devices every day. All these things help their users solve various tasks while saving time and money.
What files are system files?
Modern computers and other gadgets are pretty small and compact while offering high performance and effective data processing capacity. It takes advanced software – an operating system – to use all the wide functionality of computer devices. The operating system should let the user adjust the interface to suit individual needs, manage all processes without errors and failures, be extremely effective, convenient to use and never bottleneck the hardware components of a device.
Windows, the Microsoft operating system, meets the above requirements in every way. It’s got a user-friendly customizable interface so that every user can configure the operating system to satisfy their needs. The high performance of this operating system is perfectly combined with intuitive computer control and management tools so the ease of use comes along with high efficiency.
In fact, the Windows operating system is a program shell which lets the user install applications and other software required to perform certain tasks.
To ensure correct work of the entire operating system, its full-fledged operation and opportunities to use additional software, Windows uses special system files.
Technically, Windows system files are any files with the “hidden” system attribute enabled. These include hardware drivers, configuration files, DLL (dynamic link library) files and various sets of files that make up the Windows registry.
Such files are often modified automatically when the operating system is updated or applications are installed, but the usual rule is you shouldn’t try to modify system files on your own. Deleting, moving, renaming or changing these files in any way can result in certain apps refusing to start, some system elements crashing, or even the entire system failing to work. That is why system files are often hidden and accessible to users as read-only files. However, there’s a lot of advice and recommendations (you can find some of the stuff described in our website) on modifying system files.
If you are an advanced PC user, acting carefully and confident of what you’re doing, or you follow a certain guide you trust absolutely, then you may gain a kind of advantage from using such advice.
Where are system files stored?
Usually system files are found in certain folders which are identified as system folders. In Windows operating systems, these files are hidden by default to prevent them from being deleted accidentally. Also, they are not shown in search results to save the system from undesirable consequences.
Actually, system files can be found in many locations on your PC. For example, the root folder of your system disk (C:\) contains system files such as the paging file (pagefile.sys) and the hibernation file (hiberfil.sys).
Most system files of a Windows operating system are stored in the folder C:\Windows, especially in such subfolders as /System32 and /SysWOW64. You will also find system files in a user’s folder (for example, AppData) and application folders (for example, Program Data or Program Files).
How to display hidden system files in Windows?
Though system files are hidden by default in a Windows operating system, you can easily change the settings to make them visible.
Just remember that deleting, moving, editing or renaming these files can cause all kinds of issues affecting reliability and correct work of your operating system. The right decision, after all, is to leave the system files hidden as they were. But if you work with system files deliberately and follow certain advice or recommendations, then make them visible, do your job, and then make them hidden again.
To enable displaying system files in a Windows operating system, you’ll have to open This PC in the File Explorer. In the window that opens, go to the tab View. In this tab find Options which contains settings for opening elements, presentation of files and folders, and open the nested menu. In the pop-up menu, select Change folder and search options.
In the Folder Options window go to the View tab and in the section Advanced settings drag the slider down until you can uncheck the box Hide protected operating system files (Recommended). The Windows operating system will show you a warning to make sure that you realize what you’re going to do. Confirm your choice by clicking on the Yes button. Then click Apply and OK to save the changes you have made to file and folder view settings.
Now you’ll be able to see hidden system files in the Windows File Explorer. Note that the icons for system files look dimmer than the non-system files icons. This is a special feature to mark them as more important.
What happens if system files are damaged?
The answer really depends on what system files are damaged, that’s why the final symptoms may range from some applications failing to start or working incorrectly to BSOD errors or even the Windows operating system crashing completely – which makes the OS absolutely no good to use.
If you suspect that some system files are damaged or missing, there are several built-in tools inside the operating system to help you out of trouble. The System File Check (SFC) tool scans Windows system files and can replace any missing or damaged files detected during the test. The Windows Deployment Image Servicing and Management (DISM) can be used to eliminate the problems that prevent the SFC tool from performing its functions properly. Using the two apps together you’ll be able to restore successfully any missing or damaged system files.
SFC scans your computer to detect possible damage or any other changes in Windows system files. If the SFC checking tool finds a system file that has been changed, the file will be replaced automatically with its correct version.
To launch the SFC tool you will have to use the Command Prompt utility started with Administrator rights. There are many ways to open this app. We’ll describe several of them so you can use the one you like best.
Method one: Open This PC in the File Explorer and then go to the system folder C:/. Open the Windows folder and go to the subfolder System32. Drag the slider box down and find the file cmd.exe. Right-click on it and open a pop-up menu. From the list of possible actions, select Run as administrator.
Method two: Click on the Start button in the lower left corner of your desktop, on the Taskbar, and open the main Windows menu. In the list of all installed applications, drag the slider down and find the section Windows System. In the drop-down menu, find the line Command Prompt and right-click on it. From the list of possible actions in the More section, select Run as administrator.
Method three: Click the Search button on the Taskbar (you can find it next to the Start button) and open the search panel. Enter command or cmd into the search field. The Best match section will show you the result you were looking for – Command Prompt. Right-click on it and select Run as administrator in the menu.
When the pop-up notification from Windows User Account Control asks “Do you want to allow this app to make changes to your device?” click Yes and the command prompt with administrator rights will open.
Enter the command sfc /scannow into the Command Prompt window to launch the Windows system file checking utility.
Results of the system scan with description of all actions will be shown in the application window.
If all the actions described above didn’t work and you failed to fix the damaged system files, you can always update or reset your computer’s operating system settings. However, this solution should only be used as the last resort. All your personal files will be preserved, but any applications will be removed after you reset the operating system.
If all the actions described above didn’t work and you failed to fix the damaged system files, you can always update or reset your computer’s operating system settings. However, this solution should only be used as the last resort. All your personal files will be preserved, but any applications will be removed after you reset the operating system.
Author: Vladimir Artiukh, Technical Writer
Vladimir Artiukh is a technical writer for Hetman Software, as well as the voice and face of their English-speaking YouTube channel, Hetman Software: Data Recovery for Windows. He handles tutorials, how-tos, and detailed reviews on how the company’s tools work with all kinds of data storage devices. Read more