Thursday, April 14, 2011

File System Management

File System Management Objectives

A file management system is that set of system software that provides services to users and applications related to the use of files.

  • Typically, the only way that a user or application may access files is through the file management system.
  • This relieves the user or programmer of the necessity of developing special purpose software for each application and provide the system with a means of controlling its most important asset.
  • [GROS86] suggests the following objectives for file management system:
v     To meet the data-management needs and requirements of the user, which include storage of data and the ability to perform the operations listed earlier
v     To guarantee, the extent possible that the data in the file are valid
v     To optimize performance both from the system point of view in terms of overall throughput and from the user’s point of view in terms of response time
v     To provide I/O support for a variety of types of storage device
v     To minimize or eliminate the potential for lost or destroyed data
v     To provide a standardized set of I/O interface routines
v     To provide I/O support for multiple users in the case of multiple–user systems

Concept
  • Computer can store information on several different storage media such as magnetic disks, magnetic tapes and optical disks.
  • So that the computer systems will be convenient to use, the operating system provides a uniform logical view of information storage.
  • The operating system abstract from the physical properties of its storage devices to define a logical storage unit, the file.
  • File are mapped, by the operating system, on to physical devices.
  • This storage device are usually non volatile, so the contents are persistent thru power failures and systems reboots.


File directory
  • Associated with any file-management system and collection of files is a file directory.
  • The directory contains information about the files including attributes, location and ownership.
  • Much of this information, especially that concern with storage, is managed by the operating system.
  • The directory is itself a file, owned by the operating system and accessible by various to users and applications, information is generally provided indirectly by system routines.
  • Thus, users cannot directly access the directory even in read-only mode.
  • We can describe the most common schemes for defining the logical structure of a directory:
1.      Single level Directory
·        The simplest directory structure is the single-level directory.
·        All files are contained in the same directory, which is easy to support and understand.
·        A single level directory has significant limitation, however, when the number of the file increases or when there is more than one user.
·        Since all files are in the same directory, they must have unique names.
·        If we have two users who call their data file test, then the unique name rule is violated.
·        For example in one programming class 23 student call the program for their second assignment prog2: another 11 call it assign2.
·        Although file names are generally selected to reflect the content of the file, there are often limited in length.
·        The MS-DOS operating system allows only 11 characters file names: Unix allows 255 characters.
·        Even with a single user, as the number of files increases, it becomes difficult to remember the name of all the file, so as to create only file with unique name.
·        It is not uncommon for a user to have 100 of files on one computer system and an equal number of additional files on another system.
·        In such an environment, keeping track of so many files is a daunting task.

2. Two level directory
  • The major disadvantage to a single level directory is the confusion of file names between different users.
  • The standard solution is to create a separate directory for each user.
  • In the two level directory structures, each user has her own user file directory (UFD).
  • Each UFD has a similar structure, but lists only the files of a single user.
  • When a user job starts or a user log in, the system master file directory (MFD), is search.
  • The master file directory is index by user name or account number, and each entry point to the UFD for that user.
  • When a user refers to a particular file, only his own UFD is search.
  • Thus different users may have files with the same name, as long as all the file names within it UFD are unique.
3. Multilevel directory
  • Once have seen how to view a two level directory as two-level tree, the natural generalization is to extend the directory structure to a tree of a arbitrary height.
  • This generalization allows users to create their own subdirectories and to organize their files accordingly.
  • The MS-DOS system for instance is structured as a tree.
  • In fact a tree is the most common directory structure.
  • The tree has a root directory.
  • Every files in the system has a unique path name.
  • A path name is the path from the root through all the sub directories to a specified file.

Access Right
  • None: The user may not even learn of the existence of the file much less access it. To enforce this restriction, the user is not allowed to read the user directory that includes this file.
  • Knowledge: The user can determine that the file exists and who its owner is. The user is then able to petition the owner for additional access rights
  • Execution: The user can load and execute a program but cannot copy it. Proprietary programs are often made accessible with this restriction.
  • Reading: The user can read the file for any purpose, including copying and execution. Some system is able to enforce a distinction between viewing and copying. In the former case, the content of the file can be displayed to the user, but the user has no means for making copy.
  • Appending: The user can add data to the file, often only at the end, but cannot modify or delete any of the file’s content. This right is useful in collecting data from a number of sources.
  • Updating: The user can modify, delete and add to the file’s data. Updating normally includes writing the file initially, rewriting it completely or in part and removing all or portion of the data. Some systems distinguish among different degrees of updating.
  • Changing protection: The user can change the access rights granted to other users. Typically this right is held only by the owner of the file. In some systems, the owner can extend this right to others. To prevent abuse of this mechanism, the file owner is typically able to specify which rights can be changed by the holder of this right.
  • Deletion: The user can delete the file from the file system.

Secondary Storage Organization Program
A file may contain more than one block of secondary storage. It means few block should linking to form file. There are three methods which are:
  • Linking block
  • File map
  • Index block
Linking block
  • Every block that use to from a file will link using a pointer.
  • The pointer in UFD (User file directory) link to the first block in a chain.
  • The Problem to this method is there are many access to disk and need to be done to find the last file, for example to delete file, clear information about the earlier position of the file. 
File map
  • This method linking the block to form a file and were recorded using file map.
  • It is known as file scheduling.
  • The pointer in the file of UFD will link to the location in the map file which is representing the first block to form the file.
  • The last block will stated using zero pointers.
Index Block
  • This method will link the entire block using the index block.
  • The pointer in the UFD will link to that index block.
  • The advantage of this method is file can be accessed without parallel system.
  • While the disadvantages are too many space should be used to keep the index block. 
Elaborate on memory management concept:

-         Memory management is the act of managing computer memory. In its simpler forms, this involves providing ways to allocate portions of memory to programs at their request, and freeing it for reuse when no longer needed. The management of main memory is critical to the computer system.
-         Virtual Memory systems separate the memory addresses used by a process from actual physical addresses, allowing separation of processes and increasing the effectively available amount of RAM using disk swapping. The quality of the virtual memory manager can have a big impact on overall system performance.
-         Garbage collection is the automated allocation and deallocation of computer memory resources for a program. This is generally implemented at the programming language level and is in opposition to manual memory, the explicit allocation and deallocation of computer memory resources. Region-based memory management is an efficient variant of explicit memory management that can deallocate large groups of objects simultaneously.

Input Output Management



·        Managing input & output in Windows XP involves many operating system components.
·        User-mode processes interact with an environment subsystem and not directly with kernel-mode components.
·        The environment subsystem pass input & output request to the input & output manager, which interacts with devices drivers to handle such request.
·         Several device drivers, organized into a driver stack, cooperate to fulfill an input & output request.
·        The plug and play manager dynamically recognizes when new devices are added to the system and allocates and deallocates  resources, such as input & output ports or DMA channels, to them.
·        The power manger administers the operating system’s power management policy.


BUFFERING

·        Buffer overflow weakness is one of the many disadvantages of this type of security computer.
·        Buffer overflow attacks occur when the excessive Attacker provide input on the plan on the run.
·        Buffer overflow results from the weakness of the programming language c, c + +, fortran, and assembly, which does not automatically check the limit input when the program is executed.
·        The program is so complex, until programmers themselves do not know the weaknesses of the program.
·        Relies on external data to control the program.
·        Buffer is provided at the memory allocation, such as arrays or pointers in C. in the language C and C + +, there is no automatic restrictions on buffer, where users can write through the input buffer. For example:
int main () {
int buffer [10];
buffer [20] = 10;
}
·        Program in C above is a valid program, and each compiler to compile without error.
·        A process is a program in execution.


Spoiling Techniques
·        In computer science, spooling refers to a process of transferring data by placing it in a temporary working area where another program may access it for processing at a later point in time.
·        The normal English verb "spool" can refer to the action of a storage device that incorporates a physical spool or reel, such as a tape drive.
·        Spooling refers to copying files in parallel with other work.
·        The most common use is in reading files used by a job into or writing them from a buffer on a magnetic tape or a disk.
·        Spooling is useful because devices access data at different rates. The buffer provides a waiting station where data can rest while the slower device catches up.
·        This temporary working area would normally be a file or storage device.
·        The most common spooling application is print spooling: documents formatted for printing are stored onto a buffer (usually an area on a disk) by a fast processor and retrieved and printed by a relatively slower printer at its own rate.
·        Spooler or print management software may allow priorities to be assigned to jobs, notify users when they have printed, distribute jobs among several printers, allow stationery to be changed or select it automatically, generate banner pages to identify and separate print jobs, etc.
·        The temporary storage area to which E-mail is delivered by a Mail Transfer Agent and in which it waits to be picked up by a Mail User Agent is sometimes called a mail spool

Wednesday, March 23, 2011

My Preffered OS







1. Insert the Windows XP CD into your computer and restart your computer.
2. If prompted to start from the CD, press SPACEBAR. If you miss the prompt (it only appears for a few seconds), restart your computer to try again.






3. Windows XP Setup begins. During this portion of setup, your mouse will not work, so you must use the keyboard. On the Welcome to Setup page, press ENTER.




4. On the Windows XP Licensing Agreement page, read the licensing agreement. Press the PAGE DOWN key to scroll to the bottom of the agreement. Then press F8.




5. This page enables you to select the hard disk drive on which Windows XP will be installed. Once you complete this step, all data on your hard disk drive will be removed and cannot be recovered. It is extremely important that you have a recent backup copy of your files before continuing. When you have a backup copy, press D, and then press L when prompted. This deletes your existing data.
6. Press ENTER to select Unpartitioned space, which appears by default.




7. Press ENTER again to select Format the partition using the NTFS file system, which appears by default.




8. Windows XP erases your hard disk drive using a process called formatting and then copies the setup files. You can leave your computer and return in 20 to 30 minutes.




Part 2: Continue the installation
9. Windows XP restarts and then continues with the installation process. From this point forward, you can use your mouse. Eventually, the Regional and Language Options page appears. Click Next to accept the default settings. If you are multilingual or prefer a language other than English, you can change language settings after setup is complete.




10. On the Personalize Your Software page, type your name and your organization name. Some programs use this information to automatically fill in your name when required. Then, click Next.




11. On the Your Product Key page, type your product key as it appears on your Windows XP CD case. The product key is unique for every Windows XP installation. Then, click Next.




12. On the Computer Name and Administrator Password page, in the Computer name box, type a name that uniquely identifies your computer in your house, such as FAMILYROOM or TOMS. You cannot use spaces or punctuation. If you connect your computer to a network, you will use this computer name to find shared files and printers. Type a strong password that you can remember in the Administrator password box, and then retype it in the Confirm password box. Write the password down and store it in a secure place. Click Next.




13. On the Date and Time Settings page, set your computer’s clock. Then, click the Time Zone down arrow, and select your time zone. Click Next.




14. Windows XP will spend about a minute configuring your computer. On the Networking Settings page, click Next.




15. On the Workgroup or Computer Domain page, click Next.
Part 3: Complete the installation




16. Windows XP will spend 20 or 30 minutes configuring your computer and will automatically restart when finished. When the Display Settings dialog appears, click OK.




17. When the Monitor Settings dialog box appears, click OK.




18. The final stage of setup begins. On the Welcome to Microsoft Windows page, click Next.




19. On the Help protect your PC page, click Help protect my PC by turning on Automatic Updates now. Then, click Next.




20. Windows XP will then check if you are connected to the Internet:
• If you are connected to the Internet, select the choice that describes your network connection on the Will this computer connect to the Internet directly, or through a network? page. If you’re not sure, accept the default selection, and click Next.




• If you use dial-up Internet access, or if Windows XP cannot connect to the Internet, you can connect to the Internet after setup is complete. On the How will this computer connect to the Internet? page, click Skip.






21. Windows XP Setup displays the Ready to activate Windows? page. If you are connected to the Internet, click Yes, and then click Next. If you are not yet connected to the Internet, click No, click Next, and then skip to step 24. After setup is complete, Windows XP will automatically remind you to activate and register your copy of Windows XP.




22. On the Ready to register with Microsoft? page, click Yes, and then click Next.




23. On the Collecting Registration Information page, complete the form. Then, click Next.




24. On the Who will use this computer? page, type the name of each person who will use the computer. You can use first names only, nicknames, or full names. Then click Next. To add users after setup is complete or to specify a password to keep your account private, read Create and customize user accounts.




25. On the Thank you! page, click Finish.

Thursday, March 17, 2011

Also referred to as simply a file system or file system.
• The system that an operating system or program uses to organize and keep track of files.
• For example, a hierarchical file system is one that uses directories to organize files into a tree structure.
• Although the operating system provides its own file management system, you can buy separate file management systems.
• These systems interact smoothly with the operating system but provide more features, such as improved backup procedures and stricter file protection.

File Sharing

• Sharing of files on multi-user systems is desirable
• Sharing may be done through a protection scheme
• On distributed systems, files may be shared across a network
• Network File System (NFS) is a common distributed file-sharing method

Directory Structure

• A collection of nodes containing information about all files.
• Both the directory structure and the files reside on disk.
• Backups of these two structures are kept on tapes

File Mapping
• File mapping is the association of a file's contents with a portion of the virtual address space of a process.
• The system creates a file mapping object (also known as a section object) to maintain this association.
• A file view is the portion of virtual address space that a process uses to access the file's contents.
• File mapping allows the process to use both random input and output (I/O) and sequential I/O.
• It also allows the process to work efficiently with a large data file, such as a database, without having to map the whole file into memory.
• Multiple processes can also use memory-mapped files to share data.
• Processes read from and write to the file view using pointers, just as they would with dynamically allocated memory.
• The use of file mapping improves efficiency because the file resides on disk, but the file view resides in memory.
• Processes can also manipulate the file view with the Virtual Protect function.

Protection And Security


Recognize security policy and mechanism.

·                      In computer science, protection mechanisms are built into a computer architecture to support the enforcement of security policies. A simple definition of a security policy is "to set who may use what information in a computer system.
·                     mechanism for controlling the access of programs, processes, or users the resources defined by the computer system. the protentation mechanism ensures the enforcement of a certain policy.

 Elaborate authentic basic.

Password
·                     A password is a secret word or string of characters that is used for authentication, to prove identity or gain access to a resource (example: an access code is a type of password). The password should be kept secret from those not allowed access.



Artifact
·                     In natural science and signal processing, an artifact is any error in the perception or representation of any visual or aural information introduced by the involved equipment or technique(s).
·                     In computer science, digital artifacts are anomalies introduced into digital signals as a result of digital processing.
·                     In microscopy, artifacts are sometimes introduced during the processing of samples into slide form. See Artifact (microscopy)






Biometric
·                     Biometrics consists of methods for uniquely recognizing humans based upon one or more intrinsic physical or behavioral traits. In computer science, in particular, biometrics is used as a form of identity access management and access control. It is also used to identify individuals in groups that are under surveillance.

Elaborate protection concept and access control.

·         For your PC security suite is now available a variety of programs that promise more often than full protection from malware, with acontrol virus and malware, but also with some research andcomplex in real time. 
·        Major challenge for all manufacturers areoffering solutions that are effective yet easy to use, and if you do not require excessive resources to the system.
·         At the time all the leading manufacturers of security software suite that provides a guide as well as the traditional functions of malwaredetection and protect your PC also features accessories forprotection of data and optimization of the operating system. 
·         The concept of security was also extended to the area where this malware is not in the strict sense. But, in a sense, a proper backup data fall within the concept of security.


Memory Management


Objectives Memory Management :
Ø To provide a detailed description of various ways of
organizing memory hardware.
Ø To discuss various memory-management techniques,
including paging and segmentation.
Ø To provide a detailed description of the Intel Pentium, which supports both pure segmentation and segmentation with paging.

Concept Memory Management

Ø Program must be brought (from disk) into memory and placed within a process for it to be run.
Ø Main memory and registers are only storage CPU can access directly.
Ø Register access in one CPU clock (or less).
Ø Main memory can take many cycles.
Ø Cache sits between main memory and CPU registers.
Ø Protection of memory required to ensure correct operation.


virtual memory implementation:
virtual memory is a memory management technique developed for multitasking kernels. This technique virtualizes a computer architecture's various hardware memory device (such as RAM modules and disk storage drives), allowing a program to be designed as though:
·                     there is only one hardware memory device and this "virtual" device acts like a RAM module.
·                     the program has, by default, sole access to this virtual RAM module as the basis for a contiguous working memory.
-       When the kernel detects a page fault it will generally adjust the virtual memory range of the program which triggered it, granting it access to the memory requested. This gives the kernel discretionary power over where a particular application's memory is stored, or even whether or not it has actually been allocated yet.


Segmentation

Ø Memory-management scheme that supports user view of memory
Ø A program is a collection of segments. A segment is a logical unit
such as:
-         main program,
-         procedure,
-         function,
-         method,
-         object,
-         local variables, global variables,
-         common block,
-         stack,
-         symbol table, arrays

PAGING

Ø Logical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter is available
Ø Divide physical memory into fixed-sized blocks called frames (size is power of 2, between 512 bytes and 8,192 bytes)
Ø Divide logical memory into blocks of same size called pages
Ø Keep track of all free frames
Ø To run a program of size n pages, need to find n free frames and load program
Ø Set up a page table to translate logical to physical addresses
Ø Internal fragmentation


Explain memory relocation of paging system
Paging permits a program to be allocated noncontiguous blocks of memory. We divide programs into pages which are blocks of small, fixed size. We then divide the physical memory into frames which are blocks of size equal to page size. We use a page-table to map program pages to memory frames.
The page size (S) is defined by the hardware. Generally it ranges from 512 words/page to 4096 words/page.