Android Open Handset Developers Community

 
Guest Announcements

:arrow: Welcome: you are not yet registered; you can register here.
:arrow: A new forum on the new HTC Magic is available here.

It is currently Sun May 20, 2012 4:30 pm

All times are UTC


 Topics   Replies   Views   Last post 
No new posts Google Mobile products based on Android

by barban on Thu Sep 25, 2008 5:22 pm in ANDROID resources

0

385

Thu Sep 25, 2008 5:22 pm

barban

No new posts Attachment(s) Google I/O 2008 - Google Gears for Mobile

by barban on Sat Jul 19, 2008 3:28 pm in ANDROID resources

3

410

Sat Jul 19, 2008 3:28 pm

barban

No new posts Attachment(s) Google I/O 2008 - Dalvik Virtual Machine Internals

by Jack on Sat Jul 19, 2008 11:15 am in ANDROID resources

3

1584

Sat Jul 19, 2008 11:15 am

Jack

No new posts Android books for developers

by Zoltan on Mon Jun 16, 2008 11:01 am in ANDROID resources

0

381

Mon Jun 16, 2008 11:01 am

Zoltan




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Google I/O 2008 - Dalvik Virtual Machine Internals
PostPosted: Sat Jul 19, 2008 9:04 am 
Offline

Joined: Thu Dec 27, 2007 6:09 pm
Posts: 65
Hi guys,
I believe it could be usefull to link in this forum section some of the most interesting speechs from Google I/O 2008, in order to comment
them also going into the details of specific arguments addressed during the video.

Looking forward to listening you, bye.

Dalvik — the virtual machine with the unusual name — runs your code on Android. Join us to learn about the motivation for its design and get some details about how it works. You'll also walk away with a few tips for how to write code that works well with the platform. Be prepared for a deep dive into technical details.



Top
 Profile  
 
 Post subject: Memory details of Dalvik Virtual Machine
PostPosted: Sat Jul 19, 2008 10:43 am 
Offline

Joined: Thu Dec 27, 2007 6:09 pm
Posts: 65
In the attached screenshot you can look some figures concerning the memory arrangement of Dalvik.

As clarified during the Q&A session, the Android platform expects to have (at least) 64 MB RAM available by design choice: if the HW platform offers more, it means you have more space for user applications.

Also the most important (IMHO) feature of Dalvink was remarked: each application runs on separate address space and this is a key aspect for the security model of the Android platform: if a bad written process have a problem, it does not affect the rest of the system and all the other applications keep running safe.

Some words were also spent concerning the RAM available after the system's boot and the activation of high-level services: 20 MB can look not too much, but the speaker remarked that it should be also considered that a very large library (20 MB) is available to perform all the general tasks needed when the device acts as a phone (call dialing, SMS, contacts, etc.).

For sure, this information will be very useful to all the developers!


Attachments:
dalvink1.jpg
dalvink1.jpg [ 21.72 KiB | Viewed 1574 times ]
Top
 Profile  
 
 Post subject: Structure of DEX files
PostPosted: Sat Jul 19, 2008 11:06 am 
Offline

Joined: Thu Dec 27, 2007 6:09 pm
Posts: 65
The Dalvik Virtual Machine Internals presentation was very intersting also for having details on the structure of the DEX files.
On this respect, one slide reports how a DEX file maps to the equivalent JAR: it was claimed that the new DEX format is more space efficient with rescpet to JAR.

Moreover, it was revealed that at install time the system verify the integrity and the conformity of the DEX file, for the sake of security, and then some optimization tasks are also performed.

During the Q&A session, it was asked if the back conversion from DEX to Java is expected to be harder than the same one from CLASS files. The answer was that the new format was not designed with this goal in mind, also because the aims for Andorid are to have first of all well designed and useful open source applications. related to this point, it was also clarified that the java language was choosen due to the large open source community that support this language. As far as the chanches to have DEX compilers for other languages in the future, the answer was: "eventually, it can happen" :mrgreen: .

bye


Attachments:
dalvink4.jpg
dalvink4.jpg [ 20.2 KiB | Viewed 1563 times ]
dalvink3.jpg
dalvink3.jpg [ 28.14 KiB | Viewed 1556 times ]
dalvink2.jpg
dalvink2.jpg [ 22.16 KiB | Viewed 1558 times ]
Top
 Profile  
 
 Post subject: Optimize your Android code for battery saving
PostPosted: Sat Jul 19, 2008 11:15 am 
Offline

Joined: Fri Dec 28, 2007 12:53 pm
Posts: 25
From the presentation it is also possible to achieve information on the topic you see in the post subject.
It was mentione that if your application spend time doing nothing, it consumes CPU time (and consequently milliwatt of energy power...) without any advantage.

Suggestions for optimizing power consumption are:

- design your application for spending most of the time sleeping but reacting quickly and decisevily to user and network inputs
- avoid unnecessary memory allocations (expecially for short-lived objects) because they require CPU time and trigger garbage collection actions
- avoid loop cycles relying on object creation and iterators

With respect the third advice, it was clarified in the Q&A session that in this version of the Andoird platform all the memory allocations are done on the heap, not on the stack: keep in mind !


Attachments:
dalvink_batterylife_1.jpg
dalvink_batterylife_1.jpg [ 18.18 KiB | Viewed 1545 times ]
dalvink_batterylife_2.jpg
dalvink_batterylife_2.jpg [ 18.54 KiB | Viewed 1547 times ]
dalvink_batterylife_3.jpg
dalvink_batterylife_3.jpg [ 16.87 KiB | Viewed 1534 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Topic Tags

battery, code, compiler, CPU, Dalvik, DEX, energy, Google I/O 2008, heap, internals, JAR, Java, memory, power, security, stack, VM


All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
phpBB SEO

This site is not affiliated with nor endorsed by the Open Handset Alliance.
All trademarks and logos used in this site are of properties of their respective owners.