Saturday, March 26, 2011

OPERATING SYSTEM BASICS:10 VIRTUAL MEMORY

Virtual Memory

The term virtual memory is used to describe memory that isn’t what it appears to be. Virtual memory is actually the disk drive space that is manipulated to seem like RAM. Software creates virtual memory by swapping files between RAM and the disk drive, as shown in the following figure. This memory management technique effectively creates more total memory for the system’s applications. However, since there is a major transfer of information that involves the hard disk drive, an overall reduction in speed is encountered with virtual memory operations.

Virtual Memory Operations


Most operating systems since Windows 3.x, Windows 9x, Windows NT, Windows 2000, UNIX, and LINUX feature virtual memory operations. Within these systems, three types of swap files, temporary, permanent, and variable are used. Some operating systems will permit either a permanent or temporary swap file to be established on the system’s hard drive. A permanent swap file is always present and has a constant size. It is composed of contiguous clusters on the drive and cannot be established in the fragmented drive space. It also cannot be established on a compressed partition. The following list shows the types of swap files supported by various Microsoft operating systems:

·         Temporary swap files: Windows 3.x
·         Permanent swap files: Windows 3.x, NT, 2000
·         Variable swap files: Windows 9x


Great! Now we understand the basic and internal work of an Operating System.
Let us move forward key aspects of Information Technology: Networking, Database Programming and Office Tools Automation(Basic Programming).

Send us your feedback and may the real collaboration start!
Keep it up!

            

Friday, March 25, 2011

OPERATING SYSTEM BASICS:9 SYSTEM MEMORY

SYSTEM MEMORY MANAGEMENT
When the original PC was designed, there were certain decisions made in dividing up the 8088 system’s one megabyte of memory address space. These decisions were implemented by the original PC-DOS and MS-DOS operating systems. Due to compatibility issues, these decisions have carried over into the address allocations of all PC-compatibles, as shown in the following figure.



MS-DOS can recognize the following classifications of memory:
Conventional memory
Upper memory blocks
High memory area
Expanded memory
Extended memory
Virtual memory
·        Conventional Memory
Conventional memory (locations 00000h through 9FFFFh) is the standard memory area for all PC-compatible systems. It traditionally holds the operating system, interrupt vector tables, and relocated ROM BIOS tables. The remaining space in the conventional memory area is referred to as DOS Program Memory.

·        Upper Memory Area
The upper memory area (UMA) occupies the 384KB portion of the PC's address space
from A0000h to FFFFFh. This space is not normally considered as a part of the computer's total address space because programs cannot store information in this
area. Instead, the area is reserved to run segments of the system's hardware.
Address spaces from A0000h through BFFFFh are dedicated addresses set-aside for
the system's video display memory. The system's ROM BIOS occupies the address
space between locations FE000h and FFFFFh.
Between the video memory and system BIOS areas, addresses are reserved to hold
BIOS extension programs for add-on hardware adapters. Typical BIOS extensions
include those for hard drive adapters, advanced video adapters, and network adapters.

After BIOS extensions are in place, the typical UMA still has many unused memory areas that can have information mapped (copied) into them. This space is segmented into 64KB sections called upper memory blocks (UMBs). The primary use for these blocks is to hold installable device drivers and other memory resident programs moved out of the conventional memory area. By moving these programs out of the conventional memory area, more space is made available there for use by application programs.

PCs also use this area to incorporate a memory-usage scheme called Shadow RAM to
improve their overall performance. With this feature, the content of the system BIOS
and/or adapter BIOS are rewritten (shadowed) into faster extended memory RAM
locations. The operating system then remaps ROM addresses to the corresponding
RAM locations through unused portions of the UMA. Shadowing enables the system to
operate faster when application software makes use of any of the BIOS' CALL
routines.

·        Extended Memory
With the advent of newer microprocessors that employ protected operating mode, it
became possible to access physical memory locations beyond the 1-megabyte limit of
8088 system. Memory above this address is generally referred to as extended
memory. Modern operating systems can take full advantage of extended memory
through the Protected Addressing modes of the more advanced microprocessors. This
capability to manage higher memory enables the system to free more base memory
area for applications programs.
Flat Memory Models
Unlike MS-DOS, Windows 3.x, or Windows 9x, other operating systems, such as
Windows NT, Windows 2000, Windows XP, UNIX, and LINUX, do not employ address segmentation features of Intel microprocessors to divide the computer’s memory allocations. Because segments can overlap, memory usage errors can occur when an
application attempts to write data into a space being used by the operating system or
by another application.

Using the Flat Memory Model, the memory manager sections map each application’s
memory space into contiguous pages of physical memory. Using this method, each
application is mapped into a truly unique address space that cannot overlap any other
address space. The lack of segment overlap reduces the chances of applications
interfering with each other and helps to ensure data integrity by providing the
operating system and other processes with their own memory spaces.

The following figure shows the Flat Memory Model concept. In this example, the 32-
bit address produced by the microprocessor contains three parts dictated by the
operating system. The highest 10 bits of the address point to the Page Table
Directory.
This table sets the address boundaries for each page of memory in the
memory. This guarantees that there is only one method of entering the page space
through this table. Therefore, there is no chance for poorly written software to stray
into a page it has not been assigned. The lower 22 bits of the address are used to
access a particular page within the block of addresses specified in the Page Table
Directory (bits 12-21), and then to select a particular physical address within the
page (bits 0-11).



Next publication will focus on what a virtual memory is and how to configure it on MS-Windows Operating System.
Keep it  up
                   

OPERATING SYSTEM BASICS:8 . Command-line Shortcuts On MS-Windows

Command-line Shortcuts


Microsoft operating systems provide some command line shortcuts through the keyboard's function keys. Some of the most notable are the F1 and F3 function keys.

  • The F1 key will bring the previous command back from the command line buffer, one character at a time. 
  • Likewise, the F3 key will bring back the entire previous command through a single keystroke.

When using filenames in command line operations, the filename is displayed at the end of the directory path in the source and destination locations.
The [*] notation is called a wild card and allows operations to be performed with only partial source or destination information. Using the notation as [*.*] indicates the software to perform the designated command on any file found on the disk using any filename and extension.


A question mark [?] can be used as a wild card to represent a single character in a filename or extension. Multiple question marks can be used to represent multiple characters in a filename or extension.

Data from a command can be modified to fit a prescribed output format through the use of filter commands. The main filter commands are More, Find, and Sort. The filter command is preceded by a pipe symbol [ | ] on the command line, when output from another command is to be modified. For example, to view the content of a batch file that is longer than the screen display can present at a time, type Type
C:\xxx.bat|more.
If the information to be modified is derived from another file, the less than [<] symbol is used.

Hint:Memorize the command line wild card characters and be able to use their variations.