Sunday, March 27, 2011

MEMORY MANAGEMENT

Relocation


In a multiprogramming system, the available main memory is
generally shared among a number of processes. Typically it is not possible
for programmer to know in advance which are the programs that will
reside in the memory during the execution time of a program. In addition
we would like to be able to swap active processes in and out of main
memory to maximize processors usage by providing a large pool of ready
processes to execute. 
Each process should be protected against unwanted interference by
other processes, whether accidental or intentional. Thus, programs in
other processes should not be able to reference memory locations in a
process, for reading and writing purposes without permission
Virtual memory can also work in a multiprogramming system. For example
eight 1M programs can each be allocated a 256K partition in a 2M memory,
which each program operating as though it had its own, private 256K machine.
In fact virtual memory multiprogramming fit together very well. While a
program is waiting for part of itself to be swapped in, it is waiting for I/O and
cannot run so the CPU can be given to another process. 
The main problem of contagious allocation is external
fragmentation. This is overcome in the present scheme. Here a process is
allocated the physical memory where ever it is available, and this scheme
is call as paging scheme.
In the basic method physical memory is broken into fix size block
call frame. The logical memory also broken into block of the same size
called pages.

Every address generate by the CPU is divided into parts: a page
number (P) and a page offset (d). The page number p is use as an index
into a page table. The page table contains the base address of each page
lying in physical memory. The base address read from page table is
combining with page offset (d) to generate the physical memory address.
Before we consider ways of dealing with the shortcomings of partitioning,
we must clear up one loose end, which relates to the placement of processes in
memory. When the fix partition scheme is used, we can expect that a process
will always be a sign to the same partition. That is, the partition that is selected 
when a new process is loaded will always be used to swapped the process back
into memory after it has been swapped up. When the process is first loaded all
relative memory references in the code are replaced by absolute main memory
addresess determine by the base address of the loaded process. 
Now, consider that a process in memory include instructions plus data.
The instructions will contain memory references of the following two types;

some arithmetics and logical instructions.
Addresses of data items, used in load and store instructions and 

instructions.Addresses of instructions, used for branching and called

Friday, March 25, 2011

ISNTALL WINDOW

 MY PREFERRED OS
1st STEP:
Booting Up and First Installation Steps
-Steps from here are pretty straight forward. Read the descriptions in each pages before clicking the Next button to avoid any disasters. IF there is options to choose in these steps you may find them with each images.









2nd STEP:

You may choose your Language options by selecting the dropdowns 'Language to install', 'Time and Currency format' and 'Keyboard or input method' here. I decided to leave everything to 'US' but it would be better for selecting the correct settings here for non-english users.


3rd STEP:

This screen is where the installation wizard begins. The install now options will leads to the advanced install options. For repairing a corrupt installation the 'Repair your computer' button located at the bottom-left can be used. For fresh installs just click the Install now button.




Tick the 'I accept the license terms' checkbox and click 'Next' to proceed.


Which type of installation do you want?

This screen provides two options, Upgrade and Custom (advanced). The upgrade option is for those who wish to upgrade an existing installation of older version of Windows to Windows 7. It is confirmed that Windows Vista can be upgraded to Windows 7 with out any issues.


4th STEP:
Where do you want to install Windows?

Clicking on the 'Custom' button brings the install location selection screen. In the test machine we have an un-partitioned empty disk. But in the case of a normal installation all your hard drive partitions (e.g. C:\ , D:\ etc.) will be listed here. Choose the drive as you like (a 15 GB size is recommended). Make sure the drive don't have any important data or the Windows 7 installation will wipe-out the contents of that partition. You can backup the data to another partition (e.g. for installing in D:\ drive move important files from there to say E:\ drive or to an external usb drive) for safe keeping.


Partitioning /Creating or Modifying Partitions 

Click the Drive options (advanced) for advanced partition management options like 'Delete', 'Format', 'New' and 'Extend'. To create a new partition click the New button. But if you have list of partitions in the previous screen, choose the one where you are planning to install windows 7 and click Format. Then click 'Next' to proceed.



The 'New' option provides a text box to enter the size of the partition you wish to create in MBs. A 15 GB (15*1024 = 15360 MB) is recommended. In this case I opted for the full size of my virtual drive, i.e. 9216 MB. Click the Apply button to continue. You may be greeted with a message To ensure that all Windows features work correctly, windows might create additional partitions for system files. . This is a new feature in Windows 7 to have a small boot partition for system files. Click Okto continue.



A new primary partition of 8.8 GB is created along with a System type partition of 200 MB. Select the partition you just created and click Next to continue.


5th STEP:

we are all set. The Windows 7 installation begins. time to grab a cup of coffee for and wait for 15 - 30 minutes for the all new OS!

FILE SYSTEM MANAGEMENT

FILE SYSTEM MANAGEMENT


 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.

SECURITY AND PROTECTION

Present about operating system protection and security. Explain and recognize security policy and mechanism, authentic basic also protection concept and access control.
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 m
Present about operating system protection and security. Explain and recognize security policy and mechanism, authentic basic also protection concept and access control.
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.anufacturers 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.

INPUT OUTPUT MANAGEMENT

Input and output management: 
  • So far we have studied how resources like processor and main memory are managed. We shall now examine the I/O management. Humans interact with machines by providing information through IO devices. Also, much of whatever a computer system provides as on-line services is essentially made available through specialized devices such as screen displays, printers, keyboards, mouse, etc. Clearly, management of all these devices can affect the throughput of a system. For this reason, input output management also becomes one of the primary responsibilities of an operating system.  In this chapter we shall examine the role of operating systems in managing IO devices. In particular, we shall examine how the end use of the devices determines the way they are regulated for communication with either humans or with systems.


Buffering concept:
  • Single buffer: The device first fills out a buffer. Next the device driver hands in its control to the kernel to input the data in the buffer. Once the buffer has been used up, the device fills it up again for input.

  • Double buffer: In this case there are two buffers. The device fills up one of the two buffers, say buffer-0. The device driver hands in buffer-0 to the kernel to be emptied and the device starts filling up buffer-1 while  kernel is using up buffer-0. The roles are switched when the buffer-1 is filled up.

  • Circular buffer: One can say that the double buffer is a circular queue of size two. We can extend this notion to have several buffers in the circular queue. These buffers are filled up in sequence. The kernel accesses the filled up buffers in the same sequence as these are filled up. The buffers  are organized as a circular queue data structure, i.e. in case of output, the buffer is filled up from the CPU(or memory) end and used up by the output device, i.e. buffer n = buffer 0.


Spooling techniques:
  • Spooling: Suppose we have a printer connected to a machine. Many users may seek to use the printer. To avoid print clashes, it is important to be able to queue up all the print requests. This is achieved by spooling. The OS maintains all print requests and schedules each users' print requests. In other words, all output commands to print are intercepted by the OS kernel. An area is used to spool the output so that a users' job does not have to wait for the printer to be available. One can examine a print queue status by using lpq and lpstat commands in Unix

Wednesday, February 16, 2011

PROCESS MANAGEMENT

Process communication

Process in a computer system should work together for the user
use to run their program. Communication between processes
involves changing or sharing data which run using its scheme.

Mutual Exclusion

Ø     The successful use of concurrency among processes requires
 the ability to define critical sections and enforce mutual
exclusion. This is fundamental for any concurrent processing
scheme. Any facility or capability that is providing support for
mutual exclusion should meet the following requirements:

Ø     Mutual exclusion must be enforced: Only one process at
           a time in allowed into its critical section among all
           proceses that have critical sections for the same resource
           or shred object.

Ø     A process that has in its no critical section must do so
           withot interfering with other processes.

Ø     It must not possible for a process requiring access to
critical section to be delayed indefinitely; no deadlock or
           starvation can be allowed
Ø     When no process is in a critical section, any process that
requests entry to its critical section must be permitted to
enter without delay.

Ø     No assumptions are made about relative process speeds
or number of processes.

Ø     A process remains inside its critical section for a finite
time only.


Synchronization

Ø     Consider a situation where a producer process produces
an item which is consumed by consumer process. The
producer process can produce an item, while the
consumer process is consuming another item. The two
events, consumer process and producer process must be
synchronized so that the consumer process does not
consume any item that has not yet been produced. In this
situation consumer must wait until the item is produced.

Ø     If we assume hat there is an infinite size buffer which can
store the new items produced, then the consumer may
have to wait for new items only. However, if the buffer is
bounded size then the consumer must wait if the buffer is
empty and the producer must wait if the buffer is full.

Deadlock

Ø     A system will have certain resources, like memory space,
CPU cycles, files, I/O devices (such as printers, tape,
etc), which may be requested by processes.
Ø     The resources are partitioned into several types, each of
           which consists of some number of identical instances.

Ø     If a process requests an instance of a resource type, the
allocation of any instance of the type will satisfy the
request. If it will not, then the instances are not identical
and resource type class has not been defined properly.
                

Ø     A process would request a resource it needs, and must
           release the resource after using it. And a process may
           request several resources which it may need for its
           accomplishment.




Ø     A process will use the resource in the sequence request
          use and release. The request and release of resources are
          system calls, like, request device, open file, close file and
          allocate memory.


Ø     To make sure that the using process has requested and
           been allocated the resource, the request and release of
          resources can accomplish through the wait and signal
          semaphores.

Dead-Lock Definition

Ø     A set of process is in a deadlock state when every process
           in the set is waiting for an event that can be caused by
           only another process in the set. The events in the set are
           acquisition and release.

 Deadlock Characterization

A deadlock situation can arise if all the following four
conditions are held simultaneously in a system. They
are:

1. Mutual exclusion: at least there should be one resource
in non-sharable mode and only one process at a time can
use the resource. If a resource is occupied by a process
and another process requests that resources the requesting
process must be delayed until the resource has been
released.



2. Hold and wait: There must exist a process that is
holding at least one resource and is waiting to acquire
additional resources that are currently being held by other
processes.

3. No Pre-emption: Resources cannot be pre-empted that
is a resource will be released only after the process
holding it has completed its task.


Deadlock Avoidance

Ø     In this approach some additional information
          (about how resources will be requested) is used.
          With this knowledge (sequence of requesting and
          release of resources) suitable allocation strategy is
          arrived, avoiding deadlock.

Ø     One of the algorithms to avoid deadlock is that
           each process declare the maximum number of
           resources of each type it may need. With this
           information a prior, it is possible to construct an
           algorithm that ensures that system will never enter
           a deadlock state.

Ø     If a system does not have either deadlockprevention
          or a deadlock avoidance algorithm then
          a deadlock situation may occur. Under this
          situation, the system should have deadlock
          detection mechanism and strategy to recover from
          it.



Deadlock Avoidance

Ø     We explain this by assuming that resources in the
           system has only single instance. But we do is from
           resource allocation graph, derive another graph
            called as wait graph.
Ø     This wait graph is obtained from resource graph by removing the nodes of type resource and collapsing the appropriate edges.


 Recovery from deadlock

Ø     After detection of deadlock, several actions are
possible. The possible action could be to let the
operator deal with deadlock manually. Other
method could be automatic recovery from
deadlock. Deadlock could be broken by aborting
one or more processes to break the circular-wait
condition.

Ø     For recovery from deadlock, there is a need to
terminate the process. One approach is to terminate
all the processes involved in deadlock. This will
result into complete loss of all processes and its
results.

Ø     The other approach is to about process one by one
at a time until the deadlock is eliminated however
this method is time consuming. Also we need to
identify which process should be terminated first.
This may depend upon many factors like priority
of a process, present state of the process.

Ø     The approach of eliminating deadlocks using
resource pretemption, calls for successive
pretemption of some resources from process
and allocate them to other waiting process until
the deadlock cycle is broken.

Ø     However the factors which need to be considered
in this approach are: selection of a victim resource
to be aborted, roll backing of the process for which
the resource is pre-empted and to ensure that
starvation will not occur.


Process Synchronization
Situation where the correctness of the computation perfomed by cooperating processes can be affected by the relative timing of the processes execution is called a race condition. To be considered correct, cooperating prosesed may not be subject to race condition.
When cooperating processes run on a system with a single processor, concurrency is simulated by the processes sharing the CPU. The scheduling algorithm determines the relative timing of cooperating processes. The result may differ widely from an idealized perception of parallel execution. Not only is timing dependent on the scheduling algorithm used, it also depentdent on the system load created by other proceses on the system. On multiprocessor systems, there is no guarantee all processor work at equivalent speeds. Depending on which processes are allocated to which processors, timing can differ drastically.