Concurrency Runtime: Task Scheduler
The Task Scheduler schedules and coordinates tasks at run time. A task is a unit of work that performs a specific job. The Task Scheduler manages the details that are related to efficiently scheduling tasks on computers that have multiple computing resources.
Windows OS provides a preemptive kernel-mode scheduler,it’s a round-robin, priority-based mechanism that gives every task exclusive access to a computing resource for a given time period, and then switches to another task.Although this mechanism provides fairness (every thread makes forward progress), it comes at some cost of efficiency.For example, many computation-intensive algorithms do not require fairness. Instead, it is important that related tasks finish in the least overall time. Cooperative scheduling enables an application to more efficiently schedule work.
Read more…
CRT Concurrency Runtime: Resource Manager
Visual C++ 2010 comes with interesting new features and enhancements to simplify more native programming. The Concurrency Runtime is an added framework to simplify parallel programming and helps you write robust, scalable, and responsive parallel applications.
The Concurrency Runtime raises the level of abstraction so that you do not have to manage the infrastructure details that are related to concurrency. The Concurrency Runtime also enables you to specify scheduling policies that meet the quality of service demands of your applications.
Read more…
Visual C++ 2010: What’s new for MFC library?
Some years ago I thought that MFC will be obsolete, and no new features will be added, but I was wrong, VS2008 added many features and enhancements, and with VS 2010 I discovered new improvements.
So what’s new in MFC 10? to answer to this question I tried to compare the two versions MFC 9 and MFC 10 using CppDepend.
Where’s the model for MFC Doc/View Design?
MFC is a good library that wraps Windows API, and it’s also a framework so it provides a structure for your application and influent the design.
We have to be careful when using frameworks, because it impact also the design, and accepting the structure imposed by a specific framework without understanding its impact could be dangerous.
Read more…
PVS-Studio a tool complementing CppDepend
CppDepend is a tool that simplifies managing a complex C\C++ code base. Architects and developers can analyze code structure, specify design rules, do effective code reviews and master evolution by comparing different versions of the code.
CppDepend focus more on design analysis to understand the structure of existing code, and many times we ask us if CppDepend can detect implementation problems, like variables not initialized, 64 bits and parallel issues.
Read more…
Could we reuse Garbage collector of V8 javascript engine?
V8 javascript engine is well optimized, and use an efficient way to manage memory.
And I wonder if I can use the garbage collector easily in other projects? and to answer to this question we have to talk about coupling metrics.
Read more…
Lessons to take from V8 javascript engine
V8 is Google’s open source JavaScript engine it’s written in C++ and is used in Google Chrome, the open source browser from Google.
It’s very interesting to discover how this engine is implemented and what lessons we can take when analyzing it.
Read more…
Refactoring:What’s the origin of bad design?
The refactoring is defined as the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure.
Refactoring improves the quality of application design and implementation, but unfortunately the expression “If it is working don’t change” is many times used to bypass it.
We can found in general three cases concerning refactoring:
Read more…
C vs C++: Linux analysis case
I think that the debate “C vs C++” will end when the two langagues will died, and each one have its advantages and inconvenients, the choice of one instead of another depends on the application context.
Recently i read a famous linus torvalds opinion about C++, where he wrote:
“C++ is a horrible language. It’s made more horrible by the fact that a lot of substandard programmers use it, to the point where it’s much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do *nothing* but keep the C++ programmers out,that in itself would be a huge reason to use C.”
Read more…
Irrlicht:The art of using GRASP patterns
When we search for design pattern articles, we found essentially documentation concerning “Gang of Four” patterns, they are very useful and contribute to well design application.
But when i discovered GRASP patterns , i advice any one interested to improve his skills design to look at this patterns, it gives a design fondamental rules.
Irrlicht is a 3D engine library that use many GRASP concepts, let’s discover with CppDepend the benefits of using this kind of patterns, and to show using of GRASP concepts we will focus on the namespace irr::gui.
Read more…