Saturday 19 March 2016

Windows 2012 Server, Standard vs Datacenter Edition, in terms of Virtualization


So, we want here to run Virtual Images of Windows 2012 Server over EXSI (I have explained this earlier here: http://anilsachdevaa.blogspot.com/2016/01/difference-between-vsphere-esxi-and.html)

So what we will choose a) Windows 2012 Server Standard Edition or Windows 2012 Server Datacenter Edition.

OK, first of all let’s have a look on Windows 2012 Server flavors.

The editions of Server 2012 fall into three groups.

a)      Main editions, Standard and Datacenter. These are the licenses which most of the companies and business purchase.

b)      Low-end editions for small businesses, Essentials and Foundation.

c)       Specialist editions - Storage Server and Hyper-V Server.

Our discussion is limited to Standard and Datacenter editions only.

Understanding Standard and Datacenter Edition:

First and important point to note here is that Standard and Datacenter Editions are fully featured pack editions. Other may not have some exclusive features.

Windows Server 2012 Standard and Datacenter are technically identical – there is absolutely no difference between them with regard technical capabilities.

So what is the difference we are talking about? The difference is only in terms of virtualization. Means how many images of Windows you can run.

Before going into much detail, let’s see how these are licensed?

1)      The first point to understand is that Standard and Datacenter require both server and client access licensing. The server license covers the server installation, while CALs (Client Access Licenses) are needed for each user or device which accesses the server. If 10 devices are connected to the Server, we need 10 CALs. I use thin clients to connect to my Server. So If I am using 10 thin clients, I need 10 CALs (will be more clarified with a picture later)

2)      The second point is that Standard and Datacenter are licensed per processor. A "processor" in this context is a physical CPU, irrespective of how many cores it has. Both Standard and Datacenter editions cover up to two processors, if you have more processors, you apply further licenses, so for example a four processor box would require two Standard or two Datacenter licenses. Confused???

OK, say I am using a machine Dell R730 to install my Virtual Images (means R730 is my EXSI Sever). This server comes with 2 Processors. So either I am using Windows 2012 Standard or Datacenter edition, I will need 2 licenses because there are two processors. Makes sense now.


Of course, both of them have different prices. The only difference is that by using Windows 2012 Server standard edition, you can run only 2 images of Windows under Virtual System and by using Windows 2012 Server Datacenter edition, you have flexibility to run unlimited images.


Consider the image below:


The box in the middle is an EXSI Server which is running 8 virtual images of Windows 2012 Server.

1.       So how many licenses are needed in each case (Windows 2012 Server Standard or Datacenter)?

2.       How many CALs are needed?


Let’s get the reply of second question first. It is very clear that 8 devices are accessing the Server, so 8 CALs are necessary. Generally CALs are licenses with a group of 5 which is called a CAL Pack. So in this case 2 CAL Packs will be necessary which will support up to 10 devices.


Now the first question: Assume that the Box is with the two processors.


If we are using a Windows 2012 Server Standard edition, 4 licenses will be required as once license will allow only 2 virtual images.

If we are using Windows 2012 Server Datacenter edition, only one license will be required as it allows us to run unlimited virtual images.


Now if the box has supplied with 4 Processor, how many you will need in each case? Decide yourself now..

Note:
These all technical articles are dedicated to my teachers, my seniors, colleagues, internet bloggers, online technical material, reference books from where I learned all these. If anything is replicated anywhere, proper credits are understood to be given.

Thursday 17 March 2016

Pointer in C - Made Easy - Part 02

Hope you still remembered, what we learned in Part-1.

If not, please go back and read once again before starting reading this.



Now let’s try to understand the pointers using the functions.

main()
{
int sum;
sum = 21;
func(n);
}

func(x)
int x;
{
        printf("%d.\n", x);
}

What do you expect from above program?

Of course it will print the value of x which is being passed from main () to func (). So remember, it is a “Pass by Value” example.

Above program passes an integer "by value" from one function to another. Means, it makes a copy of the value of sum and copies the value of sum into the new variable x! Nothing changes at the location of sum.

              |---|
 0x1100  |21 |  sum is an integer
              |---|
 0x1104  |21 |  x is another integer
              |---|

Another way of saying that when we are talking about x, we are storing a value “21” in x and the location of x is 1104,

If we change anything at that location 1104, it will only change there and this will not affect the location 1100. Simply, if we change x, it will not change sum. This is simple, right?

Now one question… If you want that func() should modify the value and pass these changes also to main (). Means the changed value should be available in main() also.

How we can do that? Don’t get it complicated. Instead of passing the value, if we directly pass the memory location then??? Think about that.

Then the value at the memory location will be changed. This is called in C as “Pass by reference”. Let’s see it by an example.


main()
{
int sum;

        sum = 21;
        fuc(&sum);
}

func(x)
int *x;
{
        printf("%d.\n", *x);
        *x = 51;
}

Try to understand what we did above?

We have passed the address of sum (&sum) instead of passing the sum. Hope you still remember (we learned it in part-1)that &sum is address of sum.

Now since we are passing an address (memory location) to func(), x should be capable of handling a memory address, that means it should be a pointer.

Remember how we define a pointer, of course, int *x

Actually, this is still passing by value, but the value being passed is the memory address, not the number.

              |----|
 0x1100  | 21 |  sum is an integer
              |----|
 0x1104  |1100|  x is a pointer to int
              |----|

Now in func() when we make use of *x, we are referring to the value at location 1100.  This is the location of sum and in this example the value at that location is 21.

After the assignment "*x = 51;", this is what we have:

              |----|
 0x1100  | 51 |  sum is an integer
              |----|
 0x1104  |1100|  x is a pointer to int
              |----|

So what happened? By saying “*x=51”, we have instructed the program to assign the value 51 at memory location being held by x. (Note it is int *x=51, not x=51)

x still points to location 1100, but we have changed the value of the object (which is sum) at that location.


Let me ask you something which looks complicated.
What if, I write "*x=**ptr++"

I know, you didn’t like it at all.

OK, Let’s make a table then:

              |----|  Here is a memory location with initial value 0.
 0x1100  |   0|  no variable name
              |----|
 0x1104  |  12|  here is a value, in memory location 1104.  No variable name.
              |----|
 0x1108  |1104|  Here is an int pointer, pointing at the previous location.
              |----|
 0x111c   |1108|  here is ptr, a pointer to int pointer. Means ptr is a pointer
              |----|  and holds address of pointer. Here it is holding the address      
                of the pointer at 1108

 0x1120  |1100|  here is x, a pointer.  It is pointing to the location 1100
              |----|


First let's see how we declared  ptr and x:

int *x;      /* pointer to int */
int **ptr;   /* pointer to pointer.  
              The subordinate pointer (the pointer to which the ptr  points
                           to, is a pointer to int.*/

Now we know what "*x" means.  It means, "the value of location 1100."
Now we know what "*ptr" means, "the value of location 1108".
Now that value is another address (1104) 

Now "*x = **ptr" says, "this int at 1100 (means x) gets the value of that int at 1104."

And what does "**ptr++" mean?   This is equivalent to:  *( *( ptr++ ) )
Or, "pointer to pointer to int, and finally  ptr has been incremented once we dereference that statement.  But we looked where it was pointing before it got incremented.

Note:
These all technical articles are dedicated to my teachers, my seniors, colleagues, internet bloggers, online technical material, reference books from where I learned all these. If anything is replicated anywhere, proper credits are understood to be given.