Operating System: File Operations

The OS provides systems calls to create, write, read, reset, and delete files. The following discusses the specific duties an OS must do for each of the five basic file operations.

Creating a file.
First, a space in the file system must be found for the file. Second, an entry for the new file must be made in the directory. The directory entry records the name of the file and the location in the file system.

Writing a file.
To write a file, a system call is made specifying both the name and the file and the information to be written to the file. Given the name of the file, the system searches the directory to find the location of the file. The directory entry will need to store a pointer to the current block of the file (usually the beginning of the file). Using this pointer, the address of the next block can be computed where the information will be written. The write pointer must be updated – in this way, successive writes can be used to write a sequence of blocks to the file.

Reading a file.
To read a file, a system call is made that specifies that specifies the name of the file and where (in memory) the next block of the file should be put. Again, the directory is searched for the associated directory entry, and the directory will need a pointer to the next block to be read. Once the block is read, the pointer is updated.

Resetting a file.
The directory is searched for the appropriate entry, and the current file position is reset to the beginning of the file.

Deleting a file.
To delete a file, the directory is searched for the named file. Having found the associated directory entry, the space allocated to the file is released (so it can be reused by other files) and invalidates the directory entry

The five operations described comprise only the minimal set of required file operations. More commonly, we shall also want to edit the file and modify its contents. A special case of editing a file is appending new information at the end of the file. Copies of the file can also be created, and since files are named object, renaming an existing file may also be needed. If the file is a binary object format, we may also want to execute it. Also of use are facilities to lock sections of an open file for multiprocess access, to share sections, and even to map sections into memory or virtual-memory systems.

This last function allows a part of the virtual address to be logically associated with section of a file. Reads and writes to that memory region are then treated as reads and writes to the file. To that memory region are then treated as reads and writes to the file, greatly simplifying file use.

 

File System: NTFS or FAT

You can choose between three file systems for disk partitions on a computer running : NTFS, FAT, and FAT32. Use the information below to compare the file systems.NTFS is the recommended file system for the following reasons:

  • NTFS is more powerful than FAT or FAT32, and includes features required for hosting Active Directory as well as other important security features. You can use features such as Active Directory and domain-based security only by choosing NTFS as your file system.
  • It is easy to convert partitions to NTFS. The Setup program makes conversion easy, whether your partitions used FAT, FAT32, or the older version of NTFS. This kind of conversion keeps your files intact (unlike formatting a partition). If you do not need to keep your files intact and you have a FAT or FAT32 partition, it is recommended that you format the partition with NTFS rather than convert from FAT or FAT32. Formatting a partition erases all data on the partition and allows you to start with a clean drive. Whether a partition is formatted with NTFS or converted using the convert command, NTFS is the better choice of file system. For more information about Convert.exe, after completing Setup, click Start, click Run, type cmd, and then press ENTER. In the command window, type help convert and then press ENTER.
  • In order to maintain access control on files and folders and support limited accounts, you must use NTFS. If you use FAT32, all users will have access to all files on your hard drive, regardless of their account type (administrator, limited, or standard.)
  • NTFS is the file system that works best with large disks. (The next best file system for large disks is FAT32.)

There is one situation in which you might want to choose FAT or FAT32 as your file system. If it is necessary to have a computer that will sometimes run an earlier version of Windows and other times run XP , you will need to have a FAT or FAT32 partition as the primary (or startup) partition on the hard disk. Most earlier versions of Windows cannot access a partition if it uses the latest version of NTFS. The two exceptions are Windows  2000 and Windows  NT 4.0 with Service Pack 4 or later. Windows  NT 4.0 with Service Pack 4 or later has access to partitions with the latest version of NTFS, but with some limitations: It cannot access files that have been stored using NTFS features that did not exist when Windows  NT 4.0 was released.

For anything other than a situation with multiple operating systems, however, the recommended file system is NTFS.

Important

  • Once you convert a drive or partition to NTFS, you cannot simply convert it back to FAT or FAT32. You will need to reformat the drive or partition which will erase all data including programs and personal files on the partition.

The following table describes the compatibility of each file system with various operating systems.

NTFS FAT FAT32
A computer running XP  or Windows  2000 can access files on an NTFS partition. A computer running Windows  NT 4.0 with Service Pack 4 or later might be able to access some files. Other operating systems allow no access. Access is available through MS-DOS, all versions of Windows , Windows  NT, Windows  2000, XP , and OS/2. Access is available only through Windows  95 OSR2, Windows  98, Windows  Millennium Edition, Windows  2000, and XP .

The following table compares disk and file sizes possible with each file system.

NTFS FAT FAT32
Recommended minimum volume size is approximately 10 megabytes (MB). Volumes much larger than 2 terabytes (TB) are possible.

Cannot be used on floppy disks.

Volumes from floppy disk size up to 4 gigabytes (GB). Does not support domains. Volumes from 512 MB to 2 TB. In XP , you can format a FAT32 volume up to 32 GB only.

Does not support domains.

File size limited only by size of volume. Maximum file size is 2 GB. Maximum file size is 4 GB.


Note

  • Some older programs may not run on an NTFS volume, so you should research the current requirements for your software before converting

Windows File System

Windows File Protection

In versions of Windows prior to Windows 2000, installing software in addition to the operating system might overwrite shared system files such as dynamic-link libraries (.dll files) and executable files (.exe files). When system files are overwritten, system performance becomes unpredictable, programs behave erratically, and the operating system fails.

In Windows 2000 and Windows XP, Windows File Protection prevents the replacement of protected system files such as .sys, .dll, .ocx, .ttf, .fon, and .exe files. Windows File Protection runs in the background and protects all files installed by the Windows Setup program.

Windows File Protection detects attempts by other programs to replace or move a protected system file. Windows File Protection checks the file’s digital signature to determine if the new file is the correct Microsoft version. If the file is not the correct version, Windows File Protection either replaces the file from the backup stored in the Dllcache folder or from the Windows CD. If Windows File Protection cannot locate the appropriate file, it prompts you for the location. Windows File Protection also writes an event to the event log, noting the file replacement attempt.

By default, Windows File Protection is always enabled and allows Windows digitally signed files to replace existing files. Currently, signed files are distributed through:

Windows Service Packs
Hotfix distributions
Operating system upgrades
Windows Update
Windows Device Manager/Class Installer

Windows File System

Before formatting a volume or partition, consider the file system with which to format it. Windows 2000 and Windows XP support the NTFS file system, File Allocation Table (FAT), and FAT32. NTFS is the recommended file system for Windows 2000 and Windows XP because it supports several features that the other file systems do not, such as file and folder permissions, encryption, large volume support, and sparse file management. However, you must format the volume or partition as FAT if you plan to access files on that volume or partition from other operating systems, including MS-DOS, Windows 95, Windows 98, Windows Millennium Edition, and Windows NT 4.0.

Choose NTFS only if you are running Windows 2000 or Windows XP and you want to take advantage of NTFS features.

The following features are unique to NTFS:

Compression
Disk quotas
Encryption
Mount points
Remote storage

In addition, NTFS is required on all dynamic disks and GUID partition table (GPT) disks.

 

Windows Keyboard Shortcuts

Microsoft has a number of shortcuts. Below are some of my favourite shortcuts, the less commonly known, but very useful shortcuts.

SHIFT+DELETE  Delete the selected item permanently without placing the item in the Recycle Bin

Windows Logo  Display or hide the Start menu

Windows Logo+BREAK  Display the System Properties dialog box)

Windows Logo+D Toggle to show desktop (minimize all open windows)

Windows Logo+E  Open My Computer

Windows Logo+F  Search for a file or a folder

Windows Logo+M  Minimize all of the windows

Windows Logo+SHIFT+M  Restore the minimized windows

Windows Logo+R  Open the Run dialog box

Reducing The Thumbnail Size on Windows Explorer

One of the functions of Windows Explorer is to organize files and folders located in the hard disk using the five display modes which are list, details, icon, tiles and thumbnail. From these five display modes, list and details are the most commonly used by Windows XP users because these modes are capable of displaying many files and folders in the Windows Explorer window.

The thumbnail mode is only used when users are interested in viewing the actual contents of the file. It is a pity that the thumbnail display takes up a lot of space in Windows Explorer. Besides that, when the thumbnail size is relatively large, the loading process of a file, especially graphic files (BMP, TIF and JPG), can be really long. Therefore, you will need to wait for a long time if the folder contains many graphic files. For that reason, if you enjoy using the thumbnail mode and wish that the files and folders are displayed quickly, you will need to reduce the thumbnail size in Windows Explorer. To achieve that, you can refer to the following steps.

To reduce the size of the thumbnail, you need to change the registry organization in Windows XP. To do that,;
– Open the registry editor program by entering “regedit” from the “Start | Run” menu.

– Click “OK” or press “Enter” so that the program can be run instantly.

– Then, go to the “HKEY_CURRENT_USER |Software | Microsoft | Windows | CurrentVersion | Explorer” key. Refer to the section on your right.

– If you don’t see the “ThumbnailSize” entry, then you will need to create it first. Right click on the window on your right and choose the “New | Binary Value” option. Rename the entry as “ThumbnailSize”.

– Now double click the new entry and enter the number “20” in the “Value data” section. Click “OK” to agree.

– For the final step, close the registry editor program and restart the computer. When you return to the Windows XP system, open Windows Explorer and change the display mode to thumbnail. The thumbnail display now has become smaller as compared to before.

Multibooting with Windows O.S.

You can install two or more operating systems on your computer, and then choose the one that you want to use each time you restart. This is known as multibooting. You can configure your computer to start Windows XP, Windows 2000, Windows NT, and either Windows 95 or Windows 98.

Consider Disk Space, Type, and File System

Before using the multibooting feature, consider the tradeoffs: each operating system uses valuable disk space, and file system compatibility can be complex if you want to run Windows XP on one partition and an earlier OS on another partition. In addition, dynamic disk format introduced in Windows 2000 does not work with earlier operating systems. However, multibooting capabilities are a valuable feature providing the single-machine flexibility to run multiple operating systems.

In the past, some users installed multiple operating systems as a safeguard against problems with starting the computer. With Windows XP, you have more and better options for system recovery. For example, if you have a problem with a newly-installed device driver, you can use safe mode, in which the operating system restarts with default settings and the minimum number of drivers. Windows XP also includes compatibility mode, so you no longer need to keep an older operating system to run most of your older programs.

However, multibooting continues to be a useful feature if you are using Windows XP but occasionally need to replicate older computing environments. This article provides an overview of multibooting, beginning with a summary of disk requirements followed by guidelines for multibooting with Windows XP. It also addresses multibooting issues for running Windows XP with earlier operating systems including Windows 2000, Windows NT 4.0, Windows 9x, and MS-DOS®. Each section includes a checklist summary for easy reference.

Does Your Disk Support Multibooting?

The following list shows the disk configurations on which you can install more than one operating system.

  • Basic disk requirements for multiple operating systems:
    This is the common name for the hard disk in your computer. You have a basic disk unless you have converted it to dynamic disk. MS-DOS and all Windows-based operating systems can access basic disks. A basic disk can contain up to four primary partitions. A partition is a section of the disk that functions as a separate unit. Each partition can have a different file format and different drive letter, for example, C: and D:. Each operating system must be on a separate partition.
  • Single dynamic disk requirements for multiple operating systems:
    If you have one hard disk and you have converted it to dynamic disk, you can install only one operating system. You cannot multiboot.
    To determine if you have a dynamic hard disk, click Start, click Control Panel, click Performance and Maintenance, click Administrative Tools.
    Double-click Computer Management, and then click Disk Management. In the right pane, your disk will be labeled as a basic or dynamic type.
  • Multiple dynamic disks requirements for multiple operating systems:
    If you have two or more hard disks installed in your computer, each dynamic disk can contain one installation of Windows XP Professional, or Windows 2000. No other operating systems can start from a dynamic disk. Windows XP Home Edition does not support dynamic disks.
    One OS Per Partition

    Before installing Windows XP and an earlier version on the same machine, you must prepare your hard disk with different partitions.

    When you install Windows on a new or reformatted hard disk, the Setup program typically does not partition your hard disk automatically. To create multiple partitions, choose Advanced Options during Setup and follow the instructions to create and name multiple partitions. You can also create partitions using Fdisk.

    If you have already installed Windows, and you have only one partition, you must reformat and partition your hard drive before you can multiboot.

    You can divide your hard disk into multiple partitions, and each partition can function as a separate logical drive. For example, logical drives C: and D: can both exist on the same hard disk, but function as separate disks. You should install each operating system on a different partition. Then install applications on the same partition as the operating system with which you run them. If an application is used with two different operating systems, install copies on both partitions. Placing each operating system in a separate partition ensures that it will not overwrite crucial files used by the other OS.

    A basic disk can contain up to four partitions. Each partition can be formatted for use by a file system, such as FAT32 or NTFS.

    Installing Windows 2000 and Windows XP

    In general, you should always install the most recent OS last. In this case, you should install Windows 2000 and then install Windows XP.

    Happy Trying…

  • 101 Windows XP “Run” Command

    This are list of command that you can type in the run command in Windows XP to call the program.

    Press “Windows button” + “R
    or: Go to StartMenu>RUN> “Command ”

    The commands are:
    Accessibility Controls
    access.cpl

    Add Hardware Wizard
    hdwwiz.cpl

    Add/Remove Programs
    appwiz.cpl

    Administrative Tools
    control admintools

    Automatic Updates
    wuaucpl.cpl

    Bluetooth Transfer Wizard
    fsquirt

    Calculator
    calc

    Certificate Manager
    certmgr.msc

    Character Map
    charmap

    Check Disk Utility
    chkdsk

    Clipboard Viewer
    clipbrd

    Command Prompt
    cmd

    Component Services
    dcomcnfg

    Computer Management
    compmgmt.msc

    Date and Time Properties
    timedate.cpl

    DDE Shares
    ddeshare

    Device Manager
    devmgmt.msc

    Direct X Control Panel (If Installed)*
    directx.cpl

    Direct X Troubleshooter
    dxdiag

    Disk Cleanup Utility
    cleanmgr

    Disk Defragment
    dfrg.msc

    Disk Management
    diskmgmt.msc

    Disk Partition Manager
    diskpart

    Display Properties
    control desktop

    Display Properties
    desk.cpl

    Display Properties (w/Appearance Tab Preselected)
    control color

    Dr. Watson System Troubleshooting Utility
    drwtsn32

    Driver Verifier Utility
    verifier

    Event Viewer
    eventvwr.msc

    File Signature Verification Tool
    sigverif

    Findfast
    findfast.cpl

    Folders Properties
    control folders

    Fonts
    control fonts

    Fonts Folder
    fonts

    Free Cell Card Game
    freecell

    Game Controllers
    joy.cpl

    Group Policy Editor (XP Prof)
    gpedit.msc

    Hearts Card Game
    mshearts

    Iexpress Wizard
    iexpress

    Indexing Service
    ciadv.msc

    Internet Properties
    inetcpl.cpl

    IP Configuration (Display Connection Configuration)
    ipconfig /all

    IP Configuration (Display DNS Cache Contents)
    ipconfig /displaydns

    IP Configuration (Delete DNS Cache Contents)
    ipconfig /flushdns

    IP Configuration (Release All Connections)
    ipconfig /release

    IP Configuration (Renew All Connections)
    ipconfig /renew

    IP Configuration (Refreshes DHCP & Re-Registers DNS)
    ipconfig /registerdns

    IP Configuration (Display DHCP Class ID)
    ipconfig /showclassid

    IP Configuration (Modifies DHCP Class ID)
    ipconfig /setclassid

    ava Control Panel (If Installed)
    jpicpl32.cpl

    Java Control Panel (If Installed)
    javaws

    Keyboard Properties
    control keyboard

    Local Security Settings
    secpol.msc

    Local Users and Groups
    lusrmgr.msc

    Logs You Out Of Windows
    logoff

    Microsoft Chat
    winchat

    Minesweeper Game
    winmine

    Mouse Properties
    control mouse

    Mouse Properties
    main.cpl

    Network Connections
    control netconnections

    Network Connections
    ncpa.cpl

    Network Setup Wizard
    netsetup.cpl

    Notepad
    notepad

    Nview Desktop Manager (If Installed)
    nvtuicpl.cpl

    Object Packager
    packager

    ODBC Data Source Administrator
    odbccp32.cpl

    On Screen Keyboard
    osk

    Opens AC3 Filter (If Installed)
    ac3filter.cpl

    Password Properties
    password.cpl

    Performance Monitor
    perfmon.msc

    Performance Monitor
    perfmon

    Phone and Modem Options
    telephon.cpl

    Power Configuration
    powercfg.cpl

    Printers and Faxes
    control printers

    Printers Folder
    printers

    Private Character Editor
    eudcedit

    Quicktime (If Installed)
    QuickTime.cpl

    Regional Settings
    intl.cpl

    Registry Editor
    regedit

    Registry Editor
    regedit32

    Remote Desktop
    mstsc

    Removable Storage
    ntmsmgr.msc

    Removable Storage Operator Requests
    ntmsoprq.msc

    Resultant Set of Policy (XP Prof)
    rsop.msc

    Scanners and Cameras
    sticpl.cpl

    Scheduled Tasks
    control schedtasks

    Security Center
    wscui.cpl

    Services
    services.msc

    Shared Folders
    fsmgmt.msc

    Shuts Down Windows
    shutdown

    Sounds and Audio
    mmsys.cpl

    Spider Solitare Card Game
    spider

    SQL Client Configuration
    cliconfg

    System Configuration Editor
    sysedit

    System Configuration Utility
    msconfig

    System File Checker Utility (Scan Immediately)
    sfc /scannow

    System File Checker Utility (Scan Once At Next Boot)
    sfc /scanonce

    System File Checker Utility (Scan On Every Boot)
    sfc /scanboot

    System File Checker Utility (Return to Default Setting)
    sfc /revert

    System File Checker Utility (Purge File Cache)
    sfc /purgecache

    System File Checker Utility (Set Cache Size to size x)
    sfc /cachesize=x

    System Properties
    sysdm.cpl

    Task Manager
    taskmgr

    Telnet Client
    telnet

    User Account Management
    nusrmgr.cpl

    Utility Manager
    utilman

    Windows Firewall
    firewall.cpl

    Windows Magnifier
    magnify

    Windows Management Infrastructure
    wmimgmt.msc

    Windows System Security Tool
    syskey

    Windows Update Launches
    wupdmgr

    Windows XP Tour Wizard
    tourstart

    Wordpad
    write

    Enjoy…

    Windows Vista Capable or Premium Ready PCs

    Vista Capable is:

    A new PC that carries the Windows Vista Capable PC logo can run Windows Vista. All editions of Windows Vista will deliver core experiences such as innovations in organizing and finding information, security, and reliability. All Windows Vista Capable PCs will run these core experiences at a minimum. Some features available in the premium editions of Windows Vista—like the new Windows Aero user experience—may require advanced or additional hardware.

    A Windows Vista Capable PC includes at least:

    • A modern processor (at least 800MHz).
    • 512 MB of system memory.
    • A graphics processor that is DirectX 9 capable.

    Vista Premium Ready PCs is:

    To get an even better Windows Vista experience, including the Windows Aero user experience, ask for a Windows Vista Capable PC that is designated Premium Ready, or choose a PC that meets or exceeds the Premium Ready requirements described below. Features available in specific premium editions of Windows Vista, such as the ability to watch and record live TV, may require additional hardware.

    A Windows Vista Premium Ready PC includes at least:

    • 1 GHz 32-bit (x86) or 64-bit (x64) processor.
    • 1 GB of system memory.
    • Support for DirectX 9 graphics with a WDDM driver, 128 MB of graphics memory (minimum), Pixel Shader 2.0 and 32 bits per pixel.
    • 40 GB of hard drive capacity with 15 GB free space.
    • DVD-ROM Drive.
    • Audio output capability.
    • Internet access capability.

    I wonder, which is better, if it compared to Linux Xandros OS 3 Deluxe and Mac OS X 10.4 Tiger.

    Yup, Windows Vista is on the shelves…

    have you seen Vista official site?
    http://www.microsoft.com/windowsvista/default.aspx

    According to the website, a minimum requirements for Vista is:
    – a 800MHz processor (800 MHz 32-bit (x86) or 64-bit (x64) processor),
    – 20 giga byte harddrive (with 15gigs of free space),
    – 512MB system memory,
    – a 800 x 600 GPU, and
    – everything along with it to run

    Many people are enthusias with the coming of Vista, unlike me, because i only have a Intel PII 450MHz processor + 256MB system memory, which is way far from its minimum requirements. Despite of this, i really wanted to know if Windows Vista could run on my system…

    Think i should wait for a copy of Windows Vista to fly to my desk…
    I’m not buying this OS, that for sure

    a 100$ for an upgrade from Windows XP, and much-much more to buy it, hell no…