Thursday, 15 October 2015

When I paste text into word from a website, there appears to be a color background to the text that I cannot remove.How to solve this issue?

In Word 2010, click on File, Options, Advanced, under Cut, Copy, Paste and click on the drop down option for 'Pasting from other programs' and select 'Keep Text Only'.

In Word 2007, click on the Office button, Word Options, Advanced, under Cut, Copy, Paste and click on the drop down option for 'Pasting from other programs' and select 'Keep Text Only'.

Virtualization



Virtualization
Virtualization is defined as the abstraction of objects ("things"), creating a virtual (rather than actual) version of objects, such as an operating system, a server, a storage device or network resources.
 
For example, when you partition a hard drive into two partitions - C and D, say - you create virtual drives but the physical hard drive has not changed.
Operating system virtualization is the use of software to allow a piece of hardware to run multiple operating system images at the same time. The technology got its start on mainframes decades ago, allowing administrators to avoid wasting expensive processing power.
Similarly, Network attached storage (NAS) presents users with an abstract storage space - a single point of access to data - though in reality NAS contains many drives and tapes hidden from the end user.

In server virtualization, a software layer is inserted either directly on the physical server (host) hardware or on the host operating system. This software (also known as hypervisor or virtual machine monitor) allocates hardware resources (CPU, RAM, storage and networking) and allows a single server to run multiple operating system images at the same time. Each one of these operating systems is a `virtual server'.
Virtual machines are completely compatible with all standard x86 operating systems, applications and device drivers.

In other words, virtualization is a framework or methodology of dividing the resources of a computer into multiple execution environments, by applying one or more concepts or technologies such as hardware and software partitioning, time-sharing, partial or complete machine simulation, emulation, quality of service, and many others.
Note:==> The term "virtualization" is not always used to imply partitioning - breaking something down into multiple entities. Here is an example of its different (intuitively opposite) connotation: you can take N disks, and make them appear as one (logical) disk through a virtualization layer.
Virtualization allows higher utilization of servers, which usually run at a fraction of their capacity. By replacing physical servers with virtual ones, and consolidating many together, it is possible to reduce datacenter space, energy consumption, hardware costs and maintenance personnel. It is also easier to move virtual servers between hosts to form high availability, fault tolerant or other virtual clusters, thus improving business continuity, performance and responsiveness.
·         Without VMs: A single OS owns all hardware resources
·         With VMs: Multiple OSes, each running its own virtual machine, share hardware resources
·         Virtualization enables multiple operating systems to run on the same physical platform



Need for Virtualization/Why Virtualization: A List of Reasons
Virtualization can help you shift your IT focus from managing boxes to improving the services you provide to the organization. If you are managing multiple servers and desktops, virtualization can help you to:
Save money: Companies often run just one application per server because they don’t want to risk the possibility that one application will crash and bring down another on the same machine. Estimates indicate that most x86 servers are running at an average of only 10 to 15 percent of total capacity. With virtualization, you can turn a single purpose server into a multi-tasking one, and turn multiple servers into a computing pool that can adapt more flexibly to changing workloads.
Save energy: Businesses spend a lot of money powering unused server capacity. Virtualization reduces the number of physical servers, reducing the energy required to power and cool them.
Save time: With fewer servers, you can spend less time on the manual tasks required for server maintenance. On the flip side, pooling many storage devices into a single virtual storage device, you can perform tasks such as backup, archiving and recovery more easily and more quickly. It’s also much faster to deploy a virtual machine than it is to deploy a new physical server.
Reduce desktop management headaches: Managing, securing and upgrading desktops and notebooks can be a hassle. Desktop virtualization solutions let you manage user desktops centrally, making it easier to keep desktops updated and secure.
Resource optimization: Today's enterprise level computer resources are so powerful that they often have excess capacity. By virtualizing the hardware and allocating parts of it based on the real needs of users and applications, the available computing power, storage space and network bandwidth can be used much more effectively. Computers no longer need to be idle or performing below their capabilities because there are fewer connected users, or because the hosted application happens to be less demanding than the server can handle.
Virtual machines offer software developers isolated, constrained, test environments. Rather than purchasing dedicated physical hardware, virtual machines can be created on the existing hardware. Because each virtual machine is independent and isolated from all the other servers, programmers can run software without having to worry about affecting other applications, or external components affecting the execution of their code.
Consolidation: It is common practice to dedicate individual computers to a single application. If several applications only use a small amount of processing power, the administrator can consolidate several computers into one server running multiple virtual environments. For organizations that own hundreds or thousands of servers, consolidation can dramatically reduce the need for floor space, HVAC, A/C power, and co-location resources. This means the cost of ownership is reduced significantly, since less physical servers and floor and rack space are required, which in turn leads to less heat and power consumption, and ultimately a smaller carbon footprint.
Maximizing Uptime: Agility is all about being able to respond to changing requirements as quickly and flexibly as possible. Virtualization brings new opportunities to data center administration, allowing users to enjoy:
Ø Guaranteed uptime of servers and applications; speedy disaster recovery if large scale failures do occur.
Ø Instant deployment of new virtual machines or even aggregated pools of virtual machines via template images.
Ø Elasticity, that is, resource provisioning when and where required instead of keeping the entire data center in an always-on state.
Ø Reconfiguration of running computing environments without impacting the users.
Automatically Protect Applications from Server Failure: Server virtualization provides a way to implement redundancy without purchasing additional hardware. Redundancy, in the sense of running the same application on multiple servers, is a safety measure: if for any reason a server fails, another server running the same application takes over, thereby minimizing the interruption in service. This kind of redundancy works in two ways when applied to virtual machines:
Ø If one virtual system fails, another virtual system takes over.
Ø By running the redundant virtual machines on separate physical hardware you can also provide better protection against physical hardware failure.
Easily Migrate Workloads as Needs Change: Migration refers to moving a server environment from one place to another. With most virtualization solutions it is possible to move a virtual machine from one physical machine in the environment to another. With physical servers this was originally possible only if both physical machines ran on the same hardware, operating system and processor. In the virtual world, a server can be migrated between physical hosts with entirely different hardware configurations. Migration is typically used to improve reliability and availability: in case of hardware failure the guest system can be moved to a healthy server with limited downtime, if any. It is also useful if a virtual machine needs to scale beyond the physical capabilities of the current host and must be relocated to physical hardware with better performance.
Protect Investment in Existing, Legacy Systems: Server hardware will eventually become obsolete, and switching from one system to another can be difficult. In order to continue offering the services provided by these legacy systems, you can run it as a virtual machine on new, modern hardware, while the legacy system itself still behaves as if it were running on the same legacy hardware. From an application perspective, nothing has changed. In fact, its performance may well benefit from the newer underlying hardware. This gives the organization the time to transition to new processes without worrying about hardware issues, particularly in situations where the manufacturer of the legacy hardware no longer exists or cannot fix broken equipment.

Saturday, 19 September 2015

Getting strange ¶ characters in MS Word: how to remove them?

This strange ¶ symbol is called pilcrow sign or paragraph sign and this show the end of paragraphs. This is useful to see when you’re formatting and editing e-books and don’t print at all, but could be distracting.
Fortunately, there’s an easy way to remove them.
  1. Click the top menu item Tools->Options
  2. Click View
  3. Look for ‘Formatting Marks’, and uncheck the option ‘All’
  4. Click OK
Or for newer versions…
  1. Click the top menu item ‘Review’
  2. Look for ‘Show Markup’ and click
  3. Look for ‘Formatting’ and uncheck
OR
  1. Click View
  2. Move down to Toolbars and choose Standard, for standard toolbar
  3. You should see a Pilcrow icon on the toolbar that you can click to either show or hide

Sunday, 5 July 2015

Singly Linked List Operation


                                  SINGLY LINKED LIST OPERATION
#include<stdio.h>
#include<conio.h>


// Syntax for Creating Node
struct node
{
int data;                           // Type of data store in nodes
struct node *link;           // Link pointer for joining nodes
};
struct node *head=NULL;    // head pointer for pointing the first node of linked list
int item;                                // Integer temporary variable for inserting the data in linked list

void main()
{
 int choice;
 clrscr();
 printf("\nEnter 1:ADDEND \n 2:ADDBEG \n 3:ADDAFTER \n 4:DELBEG \n 5:DELEND \n 6:DELAFTER \n 7:DISPLAY \n 8:COUNT \n 9:EXIT");
  while(1)
  {
   printf("\nEnter Choice ");
   scanf("%d",&choice);
    switch(choice)
    {
    case 1:
    AddEnd();
    break;
    case 2:
    AddBeg();
    break;
    case 3:
    AddAfter();
    break;
    case 4:
    DelBeg();
    break;
    case 5:
    DelEnd();
    break;
    case 6:
    DelAfter();
    break;
    case 7:
    Display();
    break;
    case 8:
    Count();
    break;
    case 9:
    exit();
   }
 }
}

// Function for adding node in the last of the Linked List

int AddEnd()
{
 struct node *temp,*q;
  if(head==NULL)
  {
   temp=(struct node *)malloc(sizeof(struct node));
   printf("\nEnter Item ");
   scanf("%d",&item);
   temp->data=item;
   temp->link=NULL;
   head=temp;
  }
  else
  {
   q=head;
    while(q->link!=NULL)
    {
     q=q->link;
    }
   temp=(struct node *)malloc(sizeof(struct node));
   printf("\nEnter Item ");
   scanf("%d",&item);
   temp->data=item;
   temp->link=NULL;
   q->link=temp;
  }
 return 0;
}

// Function for adding node in the beginning of the Linked List

AddBeg()
{
 struct node *temp,*q;
  if(head==NULL)
  {
   temp=(struct node *)malloc(sizeof(struct node));
   printf("\nEnter Item ");
   scanf("%d",&item);
   temp->data=item;
   head=temp;
  }
  else
  {
   temp=(struct node *)malloc(sizeof(struct node));
   printf("\nEnter Item ");
   scanf("%d",&item);
   temp->data=item;
   temp->link=head;
   head=temp;
  }
 return 0;
}

// Function for adding node after some nodes(in the middle) of the Linked List

AddAfter()
{
 int pos,n;
 printf("\nEnter position to Insert new node");
 scanf("%d",&pos);
 n=Count();
  if(pos>n)
   printf("\nNo Available node are less");
  else if(pos==n)
   AddEnd();
  else if(pos==0)
   AddBeg();
  else if(pos>=1 && pos<n)
  {
   int i;
   struct node *q,*temp,*r;
   temp=(struct node *)malloc(sizeof(struct node));
   printf("\nEnter Item ");
   scanf("%d",&item);
   temp->data=item;
   q=head;
    for(i=1;i<pos;i++)
    {
     q=q->link;
      //r=q->link->link;
    }
   temp->link=q->link;
   q->link=temp;
  }
 return 0;
}

// Function for deleting node from beginning of the Linked List

DelBeg()
{
 struct node *q;
  if(head==NULL)
   printf("\nNo Node to Delete");
  else
  {
   printf("\n%d Data has Deleted",head->data);
   q=head;
   q=q->link;
   free(head);
   head=q;
  }
 return 0;
}

// Function for deleting node from last of the Linked List

DelEnd()
{
 struct node *q;
 q=head;
  if(head==NULL)
   printf("\nNo node to Delete");
  else
   {
    if(head->link==NULL)
     {
     printf("\n%d Data has Deleted",head->data);
     free(head);
     head=NULL;
     }
    else
    {
     while(q->link->link!=NULL)
      {
       q=q->link;
      }
     printf("\n%d Data has Deleted",q->link->data);
     free(q->link);
     q->link=NULL;
    }
  }
 return 0;
}

// Function for deleting node after some nodes(in the middle) Linked List

DelAfter()
{
 int pos,n,i;
 struct node *q,*r;
 printf("\nEnter position which is to be Delete ");
 scanf("%d",&pos);
 n=Count();
  if(head==NULL)
   printf("\nNo Available Node to Delete");
  else if(head->link==NULL)
  {
   printf("\n%d Data is Deleted",head->data);
   head=NULL;
   free(head);
  }
 if(pos==0)
 {
  printf("\nDELBEG Function Calling");
  DelBeg();
 }
 else if(pos==n)
 {
  printf("\nDELEND Function Calling");
  DelEnd();
 }
 else if(pos>=1 && pos<n)
 {
  q=head;
  r=head->link;
  for(i=1;i<pos;i++)
   {
    q=q->link;
    r=r->link;
   }
  printf("\n%d Data is Deleted",r->data);
  q->link=r->link;
  free(r);
 }
 return 0;
}

// Function for Counting nodes in Linked List

int Count()
{
 int i,counter=1;
 struct node *q;
 q=head;
  if(head==NULL)
   printf("\nTotal No. of Node is : %d",0);
  else
   {
    while(q->link!=NULL)
     {
      counter++;
      q=q->link;
     }
    printf("\nTotal no. of Node is : %d",counter);
    return(counter);
   }
 return 0;
}

// Function for displaying the Linked List

Display()
{
 struct node *q;
  if(head==NULL)
   printf("\nNo Linked List Available to Show");
  else
   {
    q=head;
     while(q!=NULL)
      {
       printf(" %d",q->data);
       q=q->link;
      }
   }
 return 0;
}

Tuesday, 30 June 2015

Dynamic Memory Allocation

DYNAMIC MEMORY ALLOCATION

Malloc, Sizeof, and Free

The malloc Function is used to allocate a block of memory on run time.

   void *malloc(number_of_bytes)

That is to say it returns a pointer of type void * that is the start in memory of the reserved portion of size number_of_bytes. If memory cannot be allocated a NULL pointer is returned.
Since a void * is returned the C standard states that this pointer can be converted to any type. The size_t argument type is defined in stdlib.h and is an unsigned type.
So:



    char *cp;
   cp = malloc(50);

attempts to get 50 bytes and assigns the start address to cp.
Also it is usual to use the sizeof() function to specify the number of bytes:


    int *ip;
   ip = (int *) malloc(100*sizeof(int));
 
Some C compilers may require to cast the type of conversion. The (int *) means coercion to an integer pointer. Coercion to the correct pointer type is very important to ensure pointer arithmetic is performed correctly. I personally use it as a means of ensuring that I am totally correct in my coding and use cast all the time.
It is good practice to use sizeof() even if you know the actual size you want -- it makes for device independent (portable) code.
sizeof can be used to find the size of any data type, variable or structure. Simply supply one of these as an argument to the function.

SO:



   int i;
   struct Node 
                  {
                    float x,y,z
                  };
   typedef struct Node sn;
 
   sizeof(int), sizeof(i),
   sizeof(struct Node) and
   sizeof(sn) are all ACCEPTABLE

In the above we can use the link between pointers and arrays to treat the reserved memory like an array. i.e we can do things like:

   ip[0] = 100;

or

   for(i=0;i<100;++i) scanf("%d",ip++);


When you have finished using a portion of memory you should always free() it. This allows the memory freed to be available again, possibly for further malloc() calls
The function free() takes a pointer as an argument and frees the memory to which the pointer refers.

Calloc and Realloc

There are two additional memory allocation functions, Calloc() and Realloc(). Their prototypes are given below:
void *calloc(size_t num_elements, size_t element_size};

void *realloc( void *ptr, size_t new_size);
Malloc does not initialise memory (to zero) in any way. If you wish to initialise memory then use calloc. Calloc there is slightly more computationally expensive but, occasionally, more convenient than malloc. Also note the different syntax between calloc and malloc in that calloc takes the number of desired elements, num_elements, and element_size, element_size, as two individual arguments.
Thus to assign 100 integer elements that are all initially zero you would do:


    int *ip;
   ip = (int *) calloc(100, sizeof(int));
Realloc is a function which attempts to change the size of a previous allocated block of memory. The new size can be larger or smaller. 
 If the block is made larger then the old contents remain unchanged and memory is added to the end of the block. If the size is made smaller then the remaining contents are unchanged.
  If the original block size cannot be resized then realloc will attempt to assign a new block of memory and will copy the old block contents.
 Note a new pointer (of different value) will consequently be returned. You must use this new value. If new memory cannot be reallocated then realloc returns NULL.
Thus to change the size of memory allocated to the *ip pointer above to an array block of 50 integers instead of 100, simply do:
   ip = (int *) calloc( ip, 50);

Monday, 8 June 2015

MultiProcessor Overview



Multiprocessors

Definition:
A Multiprocessor is an interconnection of two or more CPUs between memory and IO devices. The term ‘processor’ in multiprocessor can mean either a CPU or an input-output processor(IOP). However, a system with a single CPU and one or more IOPs is usually not included in the definition of a multiprocessor system unless the IOP has computational facilities comparable to a CPU. As it is most commonly defined, a multiprocessor system implies the existence of multiple CPUs, although usually there will be one or more IOPs as well.


         Bus-based multiprocessors

Flynn’s Classification of multiple-processor machines:
{SI, MI} x {SD, MD} = {SISD, SIMD, MISD, MIMD}
SISD = Single Instruction Single Data
            Classical Von Neumann machines.
SIMD = Single Instruction Multiple Data
             Also called Array Processors or
     Data Parallel machines.
MISD Does not exist.
MIMD Multiple Instruction Multiple Data
     Control parallelism.

A Taxonomy of Parallel Computers
                                
NUMA          Non Uniform Memory Access
COMA          Cache Only Memory Access
MPP              Massively Parallel Processor
COW             Cluster Of Workstations
CC-NUMA    Cache Coherent NUMA
NC-NUMA   No Cache NUMA
Characteristics of Multiprocessors
􀂋 Multiprocessors System = MIMD
􀁺 An interconnection of two or more CPUs with memory and I/O equipment
» a single CPU and one or more IOPs is usually not included in a multiprocessor system
􀂄 Unless the IOP has computational facilities comparable to a CPU
􀂋 Computation can proceed in parallel in one of two ways
􀁺 1) Multiple independent jobs can be made to operate in parallel
􀁺 2) A single job can be partitioned into multiple parallel tasks
􀂋 Classified by the memory Organization
􀁺 1) Shared memory or Tightly-coupled system
» Local memory + Shared memory
􀂄 higher degree of interaction between tasks
􀁺 2) Distribute memory or Loosely-coupled system
» Local memory + message passing scheme (packet or message )
􀂄 most efficient when the interaction between tasks is minimal