Windows System Programming

Johnson M. Hart

Mentioned 4

The definitive guide to systems programming for Windows XP and 2003 using the essential features and functions of the Windows API.

More on Amazon.com

Mentioned in questions and answers.

Why do many people say I/O completion port is fast and nice model?
What is the I/O completion port's advantages and disadvantages?

I want to know some points which make faster IOCP than other model.

If you can explain it comparing other models(select, epoll, traditional multi thread/process), it would be better.

by using IOCP, we can overcome the "one-thread-per-client" problem. It is commonly known that the performance decreases heavily if the software does not run on a true multiprocessor machine. Threads are system resources that are neither unlimited nor cheap.

IOCP provides a way to have a few (I/O worker) threads handle multiple clients' input/output "fairly". The threads are suspended, and don't use the CPU cycles until there is something to do.

Also you can read some information in this nice book http://www.amazon.com/Windows-System-Programming-Johnson-Hart/dp/0321256190

I have learnt C++ for a while and still didn't come across good book which would explain what are those beasts? Are they integral C++ feature? If so how is it that they are only mentioned in such book like The C++ Programming Language by B.S. If not, where can you get reliable information about them - prefferably a book (don't really like web tutorials), how to define them, how to use them etc. Thank you for any valuable help.

Locks and Mutexes are concurrency constructs used to ensure two threads won't access the same shared data at the same time, thus achieving correctness.

The current C++ standard doesn't feature concurrency tools.

Although you mentioned you prefer books to online tutorials, Herb Sutter's Effective Concurrency column is definitely a must read.

There is also Anthony Williams's upcoming book called C++ Concurrency in Action. Anthony Williams is the author of the Boost.Thread library.

Another threading library worth a look is Intel's TBB.

Locks and mutexes (think: mutual exclusion) allow cooperating threads to synchronize access to shared resources. For a brief overview of the concept, read the Wikipedia article on mutual exclusion.

These concepts are not part of the C++ language. The O'Reilly pthreads book would be a good reference for you, assuming you're on a POSIX platform. For Windows, you might go with Windows System Programming from Addison-Wesley.

They are basic constructs used to ensure correctness in parallel programs. They are included Boost and the new C++ standard.

I can recommend this book, although it doesn't focus on C++: http://www.amazon.com/Art-Multiprocessor-Programming-Maurice-Herlihy/dp/0123705916.

I have started threading in C and also Python recently and would like to know any good tutorials available for it.

I have found Interprocess Communications in Linux: The Nooks and Crannies to be extremely useful for IPC (and threading) in C.

If I'd like to know how a function written in like standard C++ library work (not just the MSDN description). I mean how does it allocate, manage, deallocate memory and return you the result. where or what do you need to know to understand that?

You need to know the techniques used to write C++ libraries. Getting Bjarne Stroustrup's book is a good start. Also, SGI has very detailed documentation on the STL at a suitably high level of abstraction.

If you are going to be investigating the windows based stuff you might want to study the systems part of the windows library.

To complement windows: understanding the Posix specification is also important.

I haven't this book, but according to its description, http://www.amazon.com/C-Standard-Template-Library/dp/0134376331 includes

-Practical techniques for using and implementing the component

Isn't this what you want?