XRDS

Crossroads The ACM Magazine for Students

Sign In

Association for Computing Machinery

Magazine: December 1997 | Volume 4, No. 2

Extending Java to support shared resource protection and deadlock detection in threads programming

Java threads enable programmers to write parallel programs very easily and conveniently. However, the current Java specification does not adequately provide for the protection of shared resources or for deadlock detection, two of the most common problems arising from parallel programs. The ability to solve these problems is crucial for Java concurrent programming. In this paper, we introduce and implement a model that can aid in writing parallel programs by providing shared resource protection and deadlock detection.

By Anita J. Van Engen, Michael K. Bradshaw, Nathan Oostendorp

HTML | In the Digital Library
Tags: Designing software, Requirements analysis

Using the Java Native Interface

The Java Native Interface (JNI) comes with the standard Java Development Kit (JDK) from Sun Microsystems. It permits Java programmers to integrate native code (currently C and C++) into their Java applications. This article will focus on how to make use of the JNI and will provide a few examples illustrating the usefulness of this feature. Although a native method system was included with the JDK 1.0 release, this article is concerned with the JDK 1.1 JNI which has several new features, and is much cleaner than the previous release. Also, the examples given will be specific to JDK 1.1 installed on the Solaris Operating System.

By S. Fouzi Husaini

HTML | In the Digital Library
Tags: Design, Graphical user interfaces, Language types, Languages, Management, Performance, Theory