Concurrency And Server-Side Networking APIs — Part 2
In the second part of this series we continue to explore how Unix-like operating systems implement the networking API and threading API. In particular, we are supremely interested in how the kernel allows server programs accept incoming connections. Part two explores implementing concurrency in…
Concurrency And Server-Side Networking APIs — Part 1
This article explores how a Sun Hotspot JVM behaves when accepting incoming TCP/IP socket connections. The behavior of native server programs–written in C–are also explored to better understand how concurrency can be achieved. Then, a comparison of how these runtime environments implement…
Threads, Threads Everywhere. And, Not a Needle In Sight
Several terms have been used liberally throughout articles on thinkmiddleware.com. A moment should be taken to formally define them. I am going to attempt to present these concepts in as generic a sense as possible, but the truth of the matter is, every OS has its own threading model and…
Mapping An LWP Using Excessive CPU Time To a Java Thread
It happens. End users are complaining about a slow system or a request that never returned. You log into a production middleware server and notice that a java process is consuming an entire CPU or worst every available CPU on the box. It has happened again–a thread(s) has gone into an infinite loop…
Configure Your JVM For Use With a Remote Debugger
As I’ve pointed out in several previous articles, I like the jdb command line debugger that is available with the Sun JDK. This debugger can actually be used with any spec-compliant JVM. The JPDA specification defines the interfaces and services that are used by remote debuggers and profiles. The…
Generating Thread Dumps
Thread dumps are the basic diagnostic tool for JVMs. Thread dumps present a partial state of each Java thread in a running JVM. I say partial because it doesn’t present all information that captures the state of a Java thread. The state of a running Java thread is stored in a series of data…
My JVM ran out of memory! What objects are consuming all of the memory?
This article isn't a comprehensive JVM Java heap sizing and garbage collection tuning document; its goal is simply to outline options for identifying which type of Object(s) are consuming the majority of memory in a running JVM--troubleshooting memory leaks in the Java heap. As usual, I focus on…
Troubleshooting Deadlock Conditions With Monitor Locks In Java Virtual Machines
In this article, I wanted to present a brief tutorial regarding troubleshooting deadlock conditions in JVMs. Before one can troubleshoot a deadlock condition, one needs to understand what it is; to this end, I have written a simple Java program called DeadLock.java, which is guaranteed to very…
The Java Instruction Set, Assemblers, and Disassemblers
Note: this is another article that I wrote a while ago using a Java Disassembler that no longer seems to be available--d-Java. There are numerous Java Disassemblers on the Internet. Two more that could be used are mentioned in the reference section: Jasper & Kimera. They can produce the Jasmin…
Generating Thread Dumps from a Sun or IBM JVM Running As A Windows Service
I was recently asked if there was a way to generate a Thread Dump from a JVM running as a Windows Service. It occured to me that I had a similar issue during my Masters Project when I was trying to generate a thread dump from a Cygwin xterm; Googling at the time turned up no good way of accomplishing the task. But, I knew that you could use the Java Debugger that ships with the Sun JDK, jdb, to generate a thread dump of all non-System Threads in a JVM. I posed this as a solution to generating Thread Dumps from a JVM running as a Windows Service.
The First 1500 Hamming Numbers
I haven’t had a chance to post anything here since the beginning of last semester. I’m in a class at the moment where all of the programming assignments involves annoying little math algorithms. The most recent required us to generate the first N hamming numbers using an efficient algorithm that…










