Question

In: Computer Science

a) Discuss the files systems that are supported in Windows and the devices that are supported...

a) Discuss the files systems that are supported in Windows and the devices that are supported in these file systems. AN,7
b) Write a C/C++ system program to read text from a file in the Windows file system, and print the text to the screen. Compile and run the program and copy the source code into your answer booklet.
c) Discuss the Windows registry and its use and interpret the following registry keys:
i. HKEY_LOCAL_MACHINE
ii. HKEY_USERS
iii. HKEY_CLASSES_ROOT
iv. HKEY_CURRENT_USER
CR, 8
2
  

Solutions

Expert Solution

a) Discuss the files systems that are supported in Windows and the devices that are supported in these file systems.

ANS : In computing, file system controls how data is stored and retrieved. In other words, it is the method and data structure that an operating system uses to keep track of files on a disk or partition.

It separates the data we put in computer into pieces and gives each piece a name, so the data is easily isolated and identified.

Without file system, information saved in a storage media would be one large body of data with no way to tell where the information begins and ends.

Types of Windows File System:

  1. FAT
  2. NTFS
  3. exFAT
  4. Live File System and
  5. ReFS

1. FAT :

The File Allocation Table (FAT) file system is a simple file system originally designed for small disks and simple folder structures.

The FAT file system is named for its method of organization, the file allocation table, which resides at the beginning of the volume. To protect the volume, two copies of the table are kept, in case one becomes damaged.

In addition, the file allocation tables and the root folder must be stored in a fixed location so that the files needed to start the system can be correctly located.

A volume formatted with the FAT file system is allocated in clusters. The default cluster size is determined by the size of the volume. For the FAT file system, the cluster number must fit in 16 bits and must be a power of two.

The figure below illustrstes how the FAT file system organizes a volume.

Different FAT file system with clster limit:

System Cluster limit
FAT12
Fewer than 4087 clusters.
FAT16 Between 4087 and 65526 clusters, inclusive.
FAT32 Between 65526 and 268,435,456 clusters, inclusive.

2.NTFS(New Technology File System):

The Windows NT file system (NTFS) provides a combination of performance, reliability, and compatibility not found in the FAT file system.

It is designed to quickly perform standard file operations such as read, write, and search — and even advanced operations such as file-system recovery — on very large hard disks.

Formatting a volume with the NTFS file system results in the creation of several system (metadata) files such as $MFT — Master File Table, $Bitmap, $LogFile and others, which contains information about all the files and folders on the NTFS volume.

The first information on an NTFS volume is the Partition Boot Sector ($Boot metadata file), which starts at sector 0 and can be up to 16 sectors long. This file describes the basic NTFS volume information and a location of the main metadata file — $MFT.

The following figure illustrates the layout of an NTFS volume when formatting has finished.

3. Extended File Allocation Table (exFAT):

The exFAT file system was introduced in 2006 and was added to older versions of Windows with updates to Windows XP and Windows Vista. exFAT is optimized for flash drives—designed to be a lightweight file system like FAT32, but without the extra features and over head of NTFS and without the limitations of FAT32.

Like NTFS, exFAT has very large limits on file and partition sizes., allowing you to store files much larger than the 4 GB allowed by FAT32.

The following figure illustrates the layout of an exFAT volume .

4. Live File System

Live File System is the term Microsoft uses to describe the packet writing method of creating discs in Windows Vista and later, which allows writeable optical media to act like flash storage by replicating its file operations.

Files can be added incrementally to the media, as well as modified, moved and deleted.[1] These discs use the UDF file system.[2] The supported UDF versions for usage as a live file system are UDF 1.50, UDF 2.00, UDF 2.01, UDF 2.50 for CD-R, CD-RW, DVD±R, DVD±RW and BD-RE, and UDF 2.60 for BD-R.[3][a]

The Live File System option is used by default by AutoPlay when formatting/erasing a CD/DVD -R or -RW.

5. Resilient File System (ReFS):

Resilient File System (ReFS) is a file system developed by Microsoft for use on the Windows operating system (OS) that's designed to overcome some of the limitations in the New Technology File System (NTFS).

The first release of ReFS file system were introduced in 2012 in Windows Server 2012.

The technology now is included in Windows 8 & 10, where it can only be used as a part of the Storage Spaces feature for a disk pool. ReFS has been enhanced for Windows Server 2016 and is a part of Windows 10 Pro for workstations.

Microsoft developed ReFS to improve on the company's earlier file system, NTFS, specifically in the areas of data corruption and data capacity.

A file system controls data storage and retrieval by separating data into named groups. Each group is called a file. The underlying structure that manages files and file names is the file system. File systems isolate data to avoid collisions between different sets of information. They also make it easier to find files.

ReFS maintains a high level of compatibility with NTFS and builds on the foundation of that file system for more consistency and better data integrity to avoid downtime. If the operating system detects a system error and data is lost or corrupted, ReFS can restore that data without affecting availability.

ReFS also combats bit rot -- the corruption of bits in a file system over time -- through disk scrubbing tasks that read and validate data.

ReFS - is a fault-tolerant technology that came to replace NTFS. Was designed to eliminate the shortcomings of the predecessor and reduce the amount of information that may be lost during various operations. Supports working with large files.

Max. volume size: 1 yobibyte (280 bytes)

Max. file size: 16 exbibytes (264−1 bytes)

So, one of the advantages of the technology is high data protection from corruption. The drive contains checksums (and metadata) designed to determine the integrity of the data on the partitions. The control occurs during read/write operations and immediately detects corrupted files.

b) Write a C/C++ system program to read text from a file in the Windows file system, and print the text to the screen. Compile and run the program and copy the source code into your answer booklet.

#include <fstream>
#include <iostream>
#include <string>
#include <sstream>
using namespace std;

int main( int argc, char* argv[] ){
ifstream inStream;
ofstream outStream;
for(int i=1; i < argc; i++){
    cout  << endl << argv[i];
    fstream f;
    f.open(argv[i]);


    //inStream.open("menu1.txt");
   // inStream.open("menu2.txt");
    string item[10];
    double cost[10];


    // ifstream m1("menu1.txt");
   //ifstream m2("menu2.txt");


    string name;
    double var;

    string line;
    istringstream iss(line);

    short loop=0;
    if(f.is_open()){

        while(!f.eof()){
            iss >> name >> var;
            getline(f, line);
            while(f>>name>>var){
                item[loop]=name;
                cost[loop]=var;
                cout << endl << "Item at index " << loop << " " << item[loop];
                cout << endl << "Cost at index " << loop << " " << cost[loop];
                loop++;
            }

        }
        cout << endl;

    f.close();
    }


}


return 0;
}

c) Discuss the Windows registry and its use and interpret the following registry keys:

i. HKEY_LOCAL_MACHINE

ii. HKEY_USERS

iii. HKEY_CLASSES_ROOT

iv. HKEY_CURRENT_USER

CR, 8

2

ANS : The registry or Windows registry is a database of information, settings, options, and other values for software and hardware installed on all versions of Microsoft Windows operating systems. When a program is installed, a new subkey is created in the registry. This subkey contains settings specific to that program, such as its location, version, and primary executable.

When Windows was initially released (e.g., Windows 3.11), it relied heavily on .ini files to store Windows and Windows programs configurations and settings. Although .ini files are still sometimes used, most Windows programs rely on settings made to the Windows registry after being installed.

i. HKEY_LOCAL_MACHINE

HKEY_LOCAL_MACHINE, often abbreviated as HKLM, is one of several registry hives that make up the Windows Registry. This particular hive contains the majority of the configuration information for the software you have installed, as well as for the Windows operating system itself.

In addition to software configuration data, the HKEY_LOCAL_MACHINE hive also contains lots of valuable information about currently detected hardware and device drivers.

In Windows 10, Windows 8, Windows 7, and Windows Vista, information about your computer's boot configuration is included in this hive, too.

The hiereachy of HKEY_LOCAL_MACHINE in registry as follows:

Registry Subkeys in HKEY_LOCAL_MACHINE:

After you expand HKEY_LOCAL_MACHINE, you can check the registry subkeys under it. Generally it includes the subkeys below.

  • HKEY_LOCAL_MACHINE\BCD00000000
  • HKEY_LOCAL_MACHINE\COMPONENTS
  • HKEY_LOCAL_MACHINE\DRIVERS
  • HKEY_LOCAL_MACHINE\HARDWARE
  • HKEY_LOCAL_MACHINE\SAM
  • HKEY_LOCAL_MACHINE\Schema
  • HKEY_LOCAL_MACHINE\SECURITY
  • HKEY_LOCAL_MACHINE\SOFTWARE
  • HKEY_LOCAL_MACHINE\SYSTEM

ii. HKEY_USERS

HKEY_USERS, sometimes seen as HKU, is one of many registry hives in the Windows Registry.

It contains user-specific configuration information for all currently active users on the computer. This means the user logged in at the moment (you) and any other users who have also logged in but have since "switched users."

Each registry key located under the HKEY_USERS hive corresponds to a user on the system and is named with that user's security identifier, or SID. The registry keys and registry values located under each SID control settings specific to that user, like mapped drives, installed printers, environment variables, desktop background, and much more, and is loaded when the user first logs on.

Registry Subkeys in HKEY_USERS

Here's an example of what you might find under this hive:

  • HKEY_USERS\.DEFAULT
  • HKEY_USERS\S-1-5-18
  • HKEY_USERS\S-1-5-19
  • HKEY_USERS\S-1-5-20
  • HKEY_USERS\S-1-5-21-0123456789-012345678-0123456789-1004
  • HKEY_USERS\S-1-5-21-0123456789-012345678-0123456789-1004_Classe

iii. HKEY_CLASSES_ROOT

HKEY_CLASSES_ROOT, often shortened as HKCR, is a registry hive in the Windows Registry and contains file extension association information, as well as a programmatic identifier (ProgID), Class ID (CLSID), and Interface ID (IID) data.

In the simplest terms possible, the HKEY_CLASSES_ROOT registry hive contains the necessary information for Windows to know what to do when you ask it to do something, like to view the contents of a drive, or open a certain type of file, etc.

Registry Subkeys in HKEY_CLASSES_ROOT

The list of registry keys under the HKEY_CLASSES_ROOT hive is very long and just as confusing. We can't explain each of the thousands of keys you might see, but we can break it down into some manageable pieces, which will hopefully clarify this part of the registry a bit.

Here are some of the many file extension association keys you'll find under the HKEY_CLASSES_ROOT hive, most of which will begin with a period:

  • HKEY_CLASSES_ROOT\.avi
  • HKEY_CLASSES_ROOT\.bmp
  • HKEY_CLASSES_ROOT\.exe
  • HKEY_CLASSES_ROOT\.html
  • HKEY_CLASSES_ROOT\.pdf
  • HKEY_CLASSES_ROOT\AudioCD
  • HKEY_CLASSES_ROOT\dllfile

iv. HKEY_CURRENT_USER

HKEY_CURRENT_USER, often abbreviated as HKCU, is one of a half-dozen or so registry hives, a major part of the Windows Registry.

HKEY_CURRENT_USER contains configuration information for Windows and software specific to the currently logged in user.

For example, various registry values in various registry keys located under the HKEY_CURRENT_USER hive control user-level settings like the installed printers, desktop wallpaper, display settings, environment variables, keyboard layout, mapped network drives, and more.

Many of the settings you configure within various applets in the Control Panel are actually stored in the HKEY_CURRENT_USER registry hive.

Registry Subkeys in HKEY_CURRENT_USER

Here are some common registry keys you might find under the HKEY_CURRENT_USER hive:

  • HKEY_CURRENT_USER\AppEvents
  • HKEY_CURRENT_USER\Console
  • HKEY_CURRENT_USER\Control Panel
  • HKEY_CURRENT_USER\Environment
  • HKEY_CURRENT_USER\EUDC
  • HKEY_CURRENT_USER\Identities
  • HKEY_CURRENT_USER\Keyboard Layout
  • HKEY_CURRENT_USER\Network
  • HKEY_CURRENT_USER\Printers
  • HKEY_CURRENT_USER\Software
  • HKEY_CURRENT_USER\System
  • HKEY_CURRENT_USER\Volatile Environment

Related Solutions

Explain what Windows prefetch files are.
Explain what Windows prefetch files are.
CSC241_FA20_01 Windows Server Operating Systems
CSC241_FA20_01 Windows Server Operating Systems
Windows XP Command Line questions. a) What is the command to display all of the files...
Windows XP Command Line questions. a) What is the command to display all of the files on the disk in drive A:--do not use the DIR command or the CHKDSK command C:\> b) Display the contents of the PERSONAL.FIL file located in the root directory of drive A: one screenful at a time C) Display the contents of the PERSONAL.FIL file located in the root directory of drive A:, one screenful at a time, beginning with the 25th record, on...
a.) For desktops, the current market share for Windows is 79%. If the operating systems are...
a.) For desktops, the current market share for Windows is 79%. If the operating systems are checked for 20 randomly selected desktops, what is the probability that 17 of them are running Windows? Answer this question without using R or a binomial calculator function. I want you to simplify the combination manually, but a calculator can certainly be used to multiply the combination by ?? ∙(?−?)?−?. b.) A certain drug treatment cures 90% of cases of hookworm in children. Suppose...
Demonstrate creating, moving, and copying files from the Windows command line. (Document with steps and screenshots.)
Demonstrate creating, moving, and copying files from the Windows command line. (Document with steps and screenshots.)
Windows The owner at the Office Supply Start-up company is concerned about losing critical files in...
Windows The owner at the Office Supply Start-up company is concerned about losing critical files in the structure you built for them. She wants you to create a script that will automate a periodic file backup to a directory called backup on the local drive. To do this, you should create a script that meets the following parameters: User’s home directory is backed up on Tuesday and Thursday nights at midnight EST. Company files are backed up on Monday, Wednesday,...
a) b) c) Compare and contrast systems programming in Windows as against systems programming in Unix/Linux....
a) b) c) Compare and contrast systems programming in Windows as against systems programming in Unix/Linux. CR, 8 Explain the term structured exception handling (SEH) as used in systems programming and give a practical example of how it can be used to handle errors in a block of code. AP, 7 Write a C/C++ system program to delete an unwanted file in the Windows file system. Compile and run the program and copy the source code into your answer booklet....
why are systems with fixed restriction metering devices critical to charge
why are systems with fixed restriction metering devices critical to charge
What have been the major changes in the file systems for Windows and for Linux?
What have been the major changes in the file systems for Windows and for Linux?
Compare the design goals and evolution of Android and Windows operating systems. [10 Marks]
Compare the design goals and evolution of Android and Windows operating systems. [10 Marks]
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT