Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between "managed" and "unmanaged"

People also ask

What's the difference between a managed and unmanaged switch?

Unmanaged switches are designed to just plug in and run, with no settings to configure. These are fine to use in small networks with only basic needs. Managed switches, however, are fully configurable, are customizable, and provide a range of data on performance.

Are managed switches faster than unmanaged?

Are managed switches faster than unmanaged switches? The short answer is no. There is no fundamental difference in speed between managed and unmanaged switches. However, it is important to note that a managed switch provides significantly better overall network performance, which tends to enhance speed in the long run.

What is an unmanaged?

Definition of unmanaged : not controlled or regulated : not managed an unmanaged forest unmanaged fisheries.

What does unmanaged mean on a switch?

Unmanaged switches simply allow Ethernet devices to communicate with one another by providing a connection to the network. Unmanaged switches are truly plug and play devices, meaning you simply have to plug them in for them to work.


Managed Code

Managed code is what Visual Basic .NET and C# compilers create. It runs on the CLR (Common Language Runtime), which, among other things, offers services like garbage collection, run-time type checking, and reference checking. So, think of it as, "My code is managed by the CLR."

Visual Basic and C# can only produce managed code, so, if you're writing an application in one of those languages you are writing an application managed by the CLR. If you are writing an application in Visual C++ .NET you can produce managed code if you like, but it's optional.

Unmanaged Code

Unmanaged code compiles straight to machine code. So, by that definition all code compiled by traditional C/C++ compilers is 'unmanaged code'. Also, since it compiles to machine code and not an intermediate language it is non-portable.

No free memory management or anything else the CLR provides.

Since you cannot create unmanaged code with Visual Basic or C#, in Visual Studio all unmanaged code is written in C/C++.

Mixing the two

Since Visual C++ can be compiled to either managed or unmanaged code it is possible to mix the two in the same application. This blurs the line between the two and complicates the definition, but it's worth mentioning just so you know that you can still have memory leaks if, for example, you're using a third party library with some badly written unmanaged code.

Here's an example I found by googling:

#using <mscorlib.dll>
using namespace System;

#include "stdio.h"

void ManagedFunction()
{
    printf("Hello, I'm managed in this section\n");
}

#pragma unmanaged
UnmanagedFunction()
{
    printf("Hello, I am unmanaged through the wonder of IJW!\n");
    ManagedFunction();
}

#pragma managed
int main()
{
    UnmanagedFunction();
    return 0;
}

This is more general than .NET and Windows. Managed is an environment where you have automatic memory management, garbage collection, type safety, ... unmanaged is everything else. So for example .NET is a managed environment and C/C++ is unmanaged.


Managed code is a differentiation coined by Microsoft to identify computer program code that requires and will only execute under the "management" of a Common Language Runtime virtual machine (resulting in Bytecode).

http://en.wikipedia.org/wiki/Managed_code

http://www.developer.com/net/cplus/article.php/2197621/Managed-Unmanaged-Native-What-Kind-of-Code-Is-This.htm