behavior might be less confusing to the user than the failures that could happen with the open resource policy, because these failures are predictable. They always happen when the user tries to start the application.

The default policy is open for competition. To use a fixed-partition resource policy, you must set a build-time flag USE_FIXED=true. See the Sun Java Wireless Client Build Guide for more information.

Customization of Resource Allocation Policies

Most implementations need to tailor resource allocation policies to each resource instead of specifying a blanket open or fixed policy for all resources. For example, on a particular platform, heap memory might be relatively plentiful, and so choosing a fixed policy for memory might be appropriate to gain predictability, possibly at the expense of some waste. However, another resource, such as network sockets, might be too scarce to tolerate any waste, even at the cost of some unpredictability. An open policy is more appropriate for these resources.

It is also possible to customize the reservations and limits to be somewhere between the extremes specified by the fixed and open policies. For example, a particular implementation might want to guarantee 250 kilobytes of heap memory for each MIDlet, but it doesn’t necessarily want to constrain a large MIDlet from consuming as much heap memory as it wants. In this case, specify a reservation of 250 kilobytes and specify no limit on heap memory.

The resource allocation policies are specified in XML files in the following directories in the source tree:

src/configuration/configuration_xml/platform

These directories contain several XML files that specify various constants used in for all aspects of the system. For more information about these files and how to modify constants, see the Managing Properties and Constants chapter of the Porting Guide. The two XML files that specify the resource policies are constants_fixed.xml and constants_open.xml. The constants_fixed.xml file is used if the build flag USE_FIXED=true, otherwise the constants_open.xml file is used.

The best way to modify the resource allocation policy is to ensure that USE_FIXED= false (which is the default) and to modify the constants_open.xml file. Some of the constants in this file are described in TABLE 3-1. To specify no reservation or limit, use the value -1. For example, the default value of SUITE_MEMORY_LIMIT is -1, which sets no limit on the amount of memory that a MIDlet suite can allocate.

Chapter 3 Managing Native Resources 25

Page 37
Image 37
Sun Microsystems 2 manual Customization of Resource Allocation Policies

2 specifications

Sun Microsystems, founded in 1982, was a significant player in the computing industry, best known for its innovative technology solutions and workstations, particularly the Sun-4, which represented a key milestone in the company's history. The Sun-4 architecture, launched in 1987, utilized the SPARC (Scalable Processor Architecture) RISC processor, notable for its high performance and scalability.

One of the primary features of Sun Microsystems' platforms was their ability to efficiently handle multitasking and resource management, making them ideal for enterprise-level applications and development environments. Sun-4 workstations boasted impressive graphics capabilities with the addition of advanced graphical user interfaces, support for color displays, and the SUNVIEW windowing system, which enhanced user experience and productivity.

The Sun-4 systems also supported the SunOS operating system, which was based on UNIX. This operating system was engineered for stability and robustness, offering features like multiuser support, networked environments, and advanced security options. Moreover, SunOS provided seamless integration with various programming languages, including C and C++, facilitating software development that aligned with industry standards.

Another standout characteristic of Sun Microsystems was its commitment to open systems and standards. By providing developers with comprehensive tools and environments, such as the Standardized Application Programming Interface (API) and support for networking protocols, Sun facilitated interoperability among different computing platforms. The emphasis on open architecture also meant that customers could easily upgrade their systems without being locked into proprietary solutions.

Sun Microsystems was also ahead of its time with innovations in network computing. Their workstations were among the first to support network file systems and distributed computing concepts, enabling seamless data sharing across multiple systems. With the introduction of the Network File System (NFS), Sun revolutionized how data was accessed and managed across networks, which played a significant role in the evolving landscape of client-server computing.

In summary, the Sun Microsystems 2 and its successive innovations in workstation technology highlighted the company's forward-thinking approach. By integrating powerful performance with open systems, robust operating systems, and advanced networking capabilities, Sun laid the groundwork for modern computing, influencing various sectors from academia to enterprise solutions. Even after its acquisition by Oracle in 2010, the legacy of Sun Microsystems continues to be felt across the computing industry.