General Development Archive

Basic Use of Pthreads

Threads strike fear into the hearts of many programmers. UNIX's process model is simple and well understood, but it is sometimes inefficient. Threading can often allow for substantial improvements in performance, at the cost of a little confusion. This article demystifies the POSIX thread interface, providing practical examples of threaded code for consideration.

Business Service Grid, Part 6: In operation

A service domain applies autonomic computing principles for aggregating Web services and grid services. The service domain technology provides a service grid and can create, filter, discover, cluster, organize, select, route, recover, and switch Web services and grid services autonomically. Using service domain objects enables you to implement business solutions easily and quickly. In this article, we discuss how to invoke and access a service domain to start the operational phase.

C++: ACE Logging; .NET: Exception Handling, Logging, and Tracing

Every C++ program -- and every networking app -- needs a good logging mechanism. ACE provides you with more than one way to handle such things. Consider your application and how you expect it to grow over time. Your choices range from the simple ACE_DEBUG macros to the highly flexible logging service. Regarding .NET, exception handling is more than just throwing and catching objects. There are many design elements in providing a robust system, and providing a sound exception handling, logging, and tracing schema are among the first steps. In this chapter from ".NET Patterns: Architecture, Design, and Process" book, you'll learn best practices for determining when to throw, catch, and log your errors.

The New Breed of Version Control Systems

CVS, part of the glue that holds open source development together, shows its age. Many competitors have emerged recently, fixing misfeatures and adding new ideas. Shlomi Fish (of the version control comparison fame) explores several current open source version control systems that may be better than CVS for your needs. Email Shlomi on how to add info for your favorite VCS on his comparison page.

Overview of Task Schedulers for Embedded Newbies

This paper by veteran real-time instructor David Kalinsky provides an introduction to the subject of task scheduling, from the perspective of novice embedded systems software developers. It begins with a survey of simple "home-made" task schedulers. Then it introduces the concept of preemption and priority-based preemptive schedulers, as used in off-the-shelf real-time operating systems. It ends with a glimpse into deadline scheduling for hard real-time systems.

SciTech Software Announces Release of Open Watcom 1.2

SciTech Software, Inc. today announced that Open Watcom 1.2 has been released and is now available for download from its website. This release contains a large number of new features, product enhancements and several fixes designed to bring Open Watcom to a higher level of quality and compatibility. SciTech, the official maintainers of the Open Watcom project, have also announced the availability of an updated Open Watcom CD, complete with SciTech’s installer for DOS, OS/2, and windows. Support for the update will be handled exclusively through the Open Watcom website.

Nine Language Performance Round-up: Benchmarking Math & File I/O

This article discusses a small-scale benchmark test run on nine modern computer languages or variants: Java 1.3.1, Java 1.4.2, C compiled with gcc 3.3.1, Python 2.3.2, Python compiled with Psyco 1.1.1, and the four languages supported by Microsoft's Visual Studio .NET 2003 development environment: Visual Basic, Visual C#, Visual C++, and Visual J#. The benchmark tests arithmetic and trigonometric functions using a variety of data types, and also tests simple file I/O. All tests took place on a Pentium 4-based computer running Windows XP. Update: Delphi version of the benchmark here.

C coding tip: Self-manage data buffer memory

The C programming language defines two standard memory management functions: malloc() and free(). C programmers frequently use those functions to allocate buffers at run time to pass data between functions. In many situations, however, you cannot predetermine the actual sizes required for the buffers, which may cause several fundamental problems for constructing complex C programs. This article advocates a self-managing, abstract data buffer. It outlines a pseudo-C implementation of the abstract buffer and details the advantages of adopting this mechanism.

Resources for Windows Longhorn Driver Development

For Windows codenamed "Longhorn," Microsoft is investing in the development infrastructure for industry partners, as well as investing in technologies and innovations that continue to expand the PC capabilities and experiences for end-users—including support for advancing technologies such as PCI Express, new storage technologies, and robust advances for both wired and wireless networking. This site provides pointers to technical information for hardware, driver, and firmware engineers who are planning and creating new products that will run Windows "Longhorn."

Whitepaper: Mutexes Battle Priority Inversions

This whitepaper by a veteran real-time trainer David Kalinsky provides an introduction to the subject of Priority Inversions and Mutexes, from the perspective of embedded systems software developers using a real-time operating system. It discusses unbounded priority inversions, including a detailed example. Then it surveys the differences between mutexes and “classic” semaphores, and the use of priority promotion, priority inheritance and priority ceiling protocols. More articles here.