This new concurrent GC is called “background GC”
Concurrent GC has existed since CLR V1.0. For a blocking GC, ie, a non concurrent GC we always suspend managed threads, do the GC work then resume managed threads. Concurrent GC, on the other hand, runs concurrently with the managed threads to the following extend:
§ It allows you to allocate while a concurrent GC is in progress.
However you can only allocate so much – for small objects you can allocate at most up to end of the ephemeral segment. Remember if we don’t do an ephemeral GC, the total space occupied by ephemeral generations can be as big as a full segment allows so as soon as you reached the end of the segment you will need to wait for the concurrent GC to finish so managed threads that need to make small object allocations are suspended.
It still needs to stop managed threads a couple of times during a concurrent GC.
During a concurrent GC we need to suspend managed threads twice to do some phases of the GC. These phases could possibly take a while to finish
We only do concurrent GCs for full GCs. A full GC can be either a concurrent GC or a blocking GC. Ephemeral GCs (ie, gen0 or gen1 GCs) are always blocking.
Concurrent GC is only available for workstation GC. In server GC we always do blocking GCs for any GCs
Concurrent GC is done on a dedicated GC thread. This thread times out if no concurrent GC has happened for a while and gets recreated next time we need to do concurrent GC.When the program activity (including making allocations and modifying references) is not really high and the heap is not very large concurrent GC works well – the latency caused by the GC is reasonable. But as people start writing larger applications with larger heaps that handle more stressful situations, the latency can be unacceptable.
Background GC is an evolution to concurrent GC. The significance of background GC is we can do ephemeral GCs while a background GC is in progress if needed. As with concurrent GC, background GC is also only applicable to full GCs and ephemeral GCs are always done as blocking GCs, and a background GC is also done on its dediated GC thread. The ephemeral GCs done while a background GC is in progress are called foreground GCs
innova ashish
Monday, September 5, 2011
Wednesday, June 9, 2010
Understanding JSON:
What does it stand for?
JavaScript Object Notation.
And what does that mean?
JSON is a syntax for passing around objects that contain name/value pairs, arrays and other objects.
Here's a example of JSON:
and we will compare this by a XML so this will loo like this
and if you want to access these values as a object form
var result = (Country.State[0].name)
so by this we will get the result "U.P"
quiggles, Squares, Colons and Commas
1. Squiggly brackets act as 'containers'
2. Square brackets holds arrays
3. Names and values are separated by a colon.
4. Array elements are separated by commas
Comparison with an array object
Object literals are created with curly brackets:
var Beatles = {
"Country" : "England",
"YearFormed" : 1959,
"Style" : "Rock'n'Roll"
}
This is the equivalent of:
var Beatles = new Object();
Beatles.Country = "England";
Beatles.YearFormed = 1959;
Beatles.Style = "Rock'n'Roll";
JavaScript Object Notation.
And what does that mean?
JSON is a syntax for passing around objects that contain name/value pairs, arrays and other objects.
Here's a example of JSON:
and we will compare this by a XML so this will loo like this
and if you want to access these values as a object form
var result = (Country.State[0].name)
so by this we will get the result "U.P"
quiggles, Squares, Colons and Commas
1. Squiggly brackets act as 'containers'
2. Square brackets holds arrays
3. Names and values are separated by a colon.
4. Array elements are separated by commas
Comparison with an array object
Object literals are created with curly brackets:
var Beatles = {
"Country" : "England",
"YearFormed" : 1959,
"Style" : "Rock'n'Roll"
}
This is the equivalent of:
var Beatles = new Object();
Beatles.Country = "England";
Beatles.YearFormed = 1959;
Beatles.Style = "Rock'n'Roll";
Tuesday, June 8, 2010
Google Custom Search
Now Google is providing the code and API for the custom search.
http://code.google.com/apis/customsearch/docs/ui.html
you can use this this API after changing little bit as per your requirement.
http://code.google.com/apis/customsearch/docs/ui.html
you can use this this API after changing little bit as per your requirement.
Monday, May 31, 2010
Tools and Utilities for the .NET Developer
Please follow this link..
http://geekswithblogs.net/mbcrump/archive/2010/05/25/tools-and-utilities-for-the-.net-developer.aspx
http://geekswithblogs.net/mbcrump/archive/2010/05/25/tools-and-utilities-for-the-.net-developer.aspx
Sunday, May 23, 2010
Implementation of MVC
This is new and effective design pattern for designing the Code structure.
This is defining my these three type
1.Model
2.View
3.Controller
MODEL: Model is responsible for data processing, like database connection, querying database, implementing business rules and other resposibilities related to the database.Model responds to the request made by controllers and notifies the registered views to update their display with new data.
VIEW: View basically related to the logical part of the structure this will having the logic of processing the data from the contoller ---> Model and after that processing the data from the Model --> Controller.
CONTROLLER:
Controller is responsible for Notice of action. Controller responds to the mouse or keyboard input to command model and view to change. Controllers are associated with views. User interaction triggers the events to change the model, which in turn calls some methods of model to update its state to notify other registered views to refresh their display.
Benefits:
#Since MVC handles the multiple views using the same enterprise model it is easier to maintain, test and upgrade the multiple system.
#It will be easier to add new clients just by adding their views and controllers.
#It is possible to have development process in parallel for model, view and controller.
Drawbacks:
#Requires high skilled experienced professionals who can identify the requirements
#It requires the significant amount of time to analyze and design.
Tuesday, May 11, 2010
New feature in .NET 4.0 called the Task Parallel Library
A new feature in .NET 4.0 called the Task Parallel Library. With this library, it is much easier to write code in a managed language that makes use of multiple cores where available. This gives us the option to write code as parallel tasks that are run concurrently across available processors; generally resulting in significantly speeded up code.
using System;
using System.Threading.Tasks;
namespace ParallelForSample
{
public class Multi
{
public static void Calculate(int val)
{
Utility util = new Utility();
util.Start();
int[,] G = new int[val, val];
Parallel.For(0, val,
delegate(int k)
{
Parallel.For(0, val, delegate(int i)
{
for (int j = 0; j < val; j++)
G[i, j] = Math.Min(G[i, j], G[i, k] + G[k, j]);
});
}
);
util.Stop();
}
}
}
using System;
using System.Threading.Tasks;
namespace ParallelForSample
{
public class Multi
{
public static void Calculate(int val)
{
Utility util = new Utility();
util.Start();
int[,] G = new int[val, val];
Parallel.For(0, val,
delegate(int k)
{
Parallel.For(0, val, delegate(int i)
{
for (int j = 0; j < val; j++)
G[i, j] = Math.Min(G[i, j], G[i, k] + G[k, j]);
});
}
);
util.Stop();
}
}
}
Wednesday, February 24, 2010
" Slip Don’t Fall "
One of the most important things to know on your journey to success is that you will occasionally slip up. It’s how you respond to these slip ups that will determine if and when you achieve your goals.
Even the most disciplined, motivated people in the world have days when they don’t take action and don’t follow through. The difference between those who succeed and those who fail is that successful people slip but they don’t fall.
Here’s a graph that shows how successful people progress towards achieving a goal:
As you can see from this graph, successful people DO slip up, but they always recover quickly. Compare this with the graph of people who fail:
Instead of recovering after a slip up, an unsuccessful person allows a slip to become a Fall.
Option 1: You can start thinking negative thoughts and criticizing yourself by saying things like, "I don’t have any will power" or "I’m just hopeless – I never follow through".
This is the approach of those who fail. Self criticism leads them into a downward spiral that inevitably ends in failure.
OR
Option 2: You can accept that you slipped up and simply say:
"OK, I slipped, but I will not fall!"
When you take this approach, you quickly overcome your slip up and get back on track towards achieving your goals.
So today, I’d like to encourage you to change your approach to dealing with slip ups. Instead of criticizing yourself, just accept the situation and make the decision that even when you slip, you will get back on track quickly and will not allow a slip to become a fall.
Until Next Time,
Dare To Dream
Even the most disciplined, motivated people in the world have days when they don’t take action and don’t follow through. The difference between those who succeed and those who fail is that successful people slip but they don’t fall.
Here’s a graph that shows how successful people progress towards achieving a goal:
As you can see from this graph, successful people DO slip up, but they always recover quickly. Compare this with the graph of people who fail:
Instead of recovering after a slip up, an unsuccessful person allows a slip to become a Fall.
Option 1: You can start thinking negative thoughts and criticizing yourself by saying things like, "I don’t have any will power" or "I’m just hopeless – I never follow through".
This is the approach of those who fail. Self criticism leads them into a downward spiral that inevitably ends in failure.
OR
Option 2: You can accept that you slipped up and simply say:
"OK, I slipped, but I will not fall!"
When you take this approach, you quickly overcome your slip up and get back on track towards achieving your goals.
So today, I’d like to encourage you to change your approach to dealing with slip ups. Instead of criticizing yourself, just accept the situation and make the decision that even when you slip, you will get back on track quickly and will not allow a slip to become a fall.
Until Next Time,
Dare To Dream
Subscribe to:
Posts (Atom)