jQuery in Action, 2nd edition*
The moose likes Product and Other Certifications and the fly likes Doubt in JTWI 1.0 Specification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Doubt in JTWI 1.0 Specification" Watch "Doubt in JTWI 1.0 Specification" New topic
Author

Doubt in JTWI 1.0 Specification

Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
In Section 4.6(Minimum Number of Timers), it says that
A compliant implementation must allow a MIDlet suite to create a minimum of 5 simultaneously running Timers. This requirement is independent of the minimum requirement specified in Section 3.2 �Minimum Application Thread Count.�


Minimum applicaiton thread count is 10 in section 3.2. So does it mean that at most 50 timers (10 threads * 5 simultaneously running Timers) can be used by a JTWI compliant applcation? In real world application, this kind of application is very less likely to occur... But in theoretical world, will it be possible? :roll:

Any comments are welcome...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Alibabra Sanjie
Ranch Hand

Joined: Feb 09, 2004
Posts: 147
...So does it mean that at most 50 timers (10 threads * 5 simultaneously running Timers)...


Could you further explain how you get this formula: 10 threads * 5 = 50 timers?
[ September 03, 2004: Message edited by: Alibabra Sanjie ]

Alibabra
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
We can have minimum of 5 threads for each application, isn't it? Each thread can create minimum of 10 Timers... Then 5 * 10 = 50 timers can be running in an application...

How do u think? Thanks...
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Actually it is just a straight minimum of 5. Meaning that you can feel safe if you are creating 0-5 Timers at one time and know that a compliant device will not shout and holler at you.

This does not relate to Threads in anyway. How many Threads can be available does NOT have anything to do with the minimum Timers.

Man, try spelling "minimum" over and over again.


Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Mark Spritzler:
Actually it is just a straight minimum of 5. Meaning that you can feel safe if you are creating 0-5 Timers at one time and know that a compliant device will not shout and holler at you.

This does not relate to Threads in anyway. How many Threads can be available does NOT have anything to do with the minimum Timers.

Man, try spelling "minimum" over and over again.


Mark


Thanks for your explanation, Mark...

but I'm feeling uncomfortable with an application creating 10 threads... That's ok, isn't it? We can create 0-10 threads for an application...

Does it mean that only five of them can create timers so that it's in the bound between 0 and 5 amount of timers, which is theoretically limited for an applicaiton... And other five threads cannot create any timers at all..

Correct me, if my understanding is wrong... I'm also hoping for Sathya to provide some comments on it, cos he did explain me great about the minimum numbers of threads before....
Sathya Srinivasan
Ranch Hand

Joined: Jan 29, 2002
Posts: 379
Hi,

My understanding is as follows.

1. A JTWI compliant device must support a minimum of 10 cocurrent threads
2. A JTWI compliant device must support a minimum of 5 timers, INDEPENDENT OF THREAD MINIMUM.

Now, why the bold letters?

Timers are typically implemented by means of a separate thread (something other than the main thread). So, if the specification did not mention the bold-lettered clause, it would mean that the threads used by timers would become a part of spec. 1, which is not the case.

In other worods, what the spec says is,

If the device is JTWI compliant, then it should support at least 15 threads (10 + 5, not 10 * 5), of which, 5 can be exclusively used just to provide timer functionality.

So, an application can expect a JTWI device to support at least 5 timer instances (no guarantees beyond that) and at least 10 application threads (no guarantees beyond that).

Based on this, I can guarantee the following scenarios on a JTWI compliant device

1. My app starts 10 threads and will run properly.
2. My app uses 5 timers and will run properly.
3. My app starts 10 threads and uses 5 timers and will run properly.

The following MAY NOT be guaranteed, although it sounds logical.

1. My app starts 15 threads and does not use any timers.
2. My app uses 15 timers and does not start any threads.

Hope this helps.

Best Wishes,
Sathya Srinivasan.


Cheers, Sathya Srinivasan - SCJP 1.2, SCWCD 1.2, SCMAD 1.0
Co-Author of Whizlabs SCMAD Certification Exam Simulator and SCMAD Exam Guide Book
Alibabra Sanjie
Ranch Hand

Joined: Feb 09, 2004
Posts: 147
Very clear!
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Nice explanation and the examples are great too... Thanks a million, Sathya...
 
wood burning stoves
 
subject: Doubt in JTWI 1.0 Specification