We should forget about small efficiencies — Donald Knuth
28 Sep
Zero copy between ISR, kernel and User, from LKML.
Q:
I would like to allow the transferring of data between ISR’s, kernel and user code, without requiring copying.
I envision allocating buffers in the kernel and then mapping them so that they appear at the same addresses to all code, and never being swapped out of memory.
Is this feasible for all supported Linux architectures and is there existing code that someone could point me towards?
A:
Your better off having application mmap a device, then transfer the data to there. Something like AF_PACKET.
Popularity: 15% [?]
27 Sep
POSIX Asynchronous I/O, from OSNews.
Used judiciously, asynchronous I/O (short for AIO) can provide a significant speed benefit, says David Chisnall. Perhaps enough to help your program overcome the fact that modern processors can really zoom, while hard drives still drag.
Code using AIO on Linux must be linked with -lrt to provide support for the POSIX real-time extensions, which means it may not be the kernel I/O mechanism, especially Kernel AIO Support for Linux has not been merged into mainline kernel yet.
After studying rt extensions in glibc source, I find how do they implement posix AIO in glibc — a thread pool plus a request waiting queue. Besides, helper thread will be spawned to manage the request, hence it’s not so trivial.
There is something interesting when freeing allocated resources. You can see the function libc_freeres_fn() in aio_misc.c. This is also why it is unnecessary to implement “destroy” API.
Whereas, FreeBSD has AIO family system calls. I, however, have no experience with AIO in FreeBSD, but it seems AIO in FreeBSD has kernel support? If so, it would be more efficient than Linux until now?
Popularity: 15% [?]
26 Sep
Cool picture of all the new Vista Icons.
Besides, here is a tutorial from MSDN on how Microsoft makes their Windows XP icons.
Popularity: 33% [?]
26 Sep
Elevate through ShellExecute, from Vista Compatibility Team Blog.
We often get the question how to elevate a process through ShellExecute. From the docs it is not immediately clear. The trick is passing in “runas” in the lpVerb.
Here is a snippet to run notepad elevated.
#include “stdafx.h”
#include “windows.h”
#include “shellapi.h”
int _tmain(int argc, _TCHAR* argv[])
{
SHELLEXECUTEINFO shExecInfo;
shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
shExecInfo.fMask = NULL;
shExecInfo.hwnd = NULL;
shExecInfo.lpVerb = L”runas“;
shExecInfo.lpFile = L”notepad.exe”;
shExecInfo.lpParameters = NULL;
shExecInfo.lpDirectory = NULL;
shExecInfo.nShow = SW_MAXIMIZE;
shExecInfo.hInstApp = NULL;
ShellExecuteEx(&shExecInfo);
return 0;
}
Here is some screenshot:

Popularity: 31% [?]
20 Sep
Python 2.5 final released!, from digg.
This release (mailing list announcement) includes:
For more details, you can refer to Python 2.5 what’s new.
Popularity: 14% [?]
15 Sep
CLR Inside Out: IronPython, from MSDN Magazine
IronPython is the code name for an implementation of the Python programming language written by the CLR team at Microsoft. IronPython runs on the Microsoft .NET Framework and supports an interactive console with fully dynamic compilation. It is well integrated with the rest of the .NET Framework and makes all .NET libraries easily available to Python programmers, while maintaining full compatibility with the Python language.
This column will give a brief overview of Python and what sets dynamic languages apart from other languages. I will discuss iterative development, describe how IronPython integrates with .NET while staying true to Python syntax, and show the advantages of using IronPython to utilize .NET.
Besides, Here are some sample codes on CodePlex:
Popularity: 10% [?]
7 Sep
Peer to Peer (p2p) in Windows Vista – People Near Me API from ebooth’s blog.
The overview of the p2p APIs available in Windows Vista is:
Popularity: 27% [?]