Questions Reg. Android platform stability??

41 views
Skip to first unread message

Sajith MP

unread,
Feb 27, 2008, 11:57:35 PM2/27/08
to Android Internals
Gurus,

I saw the video on Android architecture. Cool video with fundamentals
explained well. In that, while talking about services, our presenter
mentioned that applications can communicate with services by sending
messages. By sending messages, you are actually indirectly writing to
the VM allocated to other process. There is possibility that a
malfunctioning application can corrupt a driver or another application
by writing into it's process space. So can we rule out the possibility
of system getting corrupted?

More queries:

1. Suppose I am an OEM and I have a new hardware component. How will
I add my driver to the kernel space?
2. Can I add an intermediate library for the new hardware module and
will it be able to communicate with all modules in kernel?
3. Can a user download an intermediate library from the internet and
install it? If yes, how will we ensure that that library do not
corrupt kernel modules or other intermediate libraries? If no, how
will we ensure flexibility towards new advancements in technology?
4. What is the maximum number of processes / threads that can co-
exist at the same time?
5. Out of the 4GB VM, how much virtual memory is available for user
processes?

Thats 5 out of my 100 doubts.

Thanks,
Sajith MP


hackbod

unread,
Feb 28, 2008, 4:02:12 AM2/28/08
to Android Internals
On Feb 27, 8:57 pm, Sajith MP <sajith.padm...@gmail.com> wrote:
> I saw the video on Android architecture. Cool video with fundamentals
> explained well. In that, while talking about services, our presenter
> mentioned that applications can communicate with services by sending
> messages. By sending messages, you are actually indirectly writing to
> the VM allocated to other process. There is possibility that a
> malfunctioning application can corrupt a driver or another application
> by writing into it's process space. So can we rule out the possibility
> of system getting corrupted?

All security and protection in the system is enforced through the
Linux kernel, not through Java. So you can only do as much to another
application as the kernel will let you... which should be enough
protection.

At any rate, you definitely don't get to write directly to the process
space of another application. :)]

> 1. Suppose I am an OEM and I have a new hardware component. How will
> I add my driver to the kernel space?

It's just a normal Linux kernel, so the same way you normally do on
Linux.

> 2. Can I add an intermediate library for the new hardware module and
> will it be able to communicate with all modules in kernel?

If you are an OEM, sure.

> 3. Can a user download an intermediate library from the internet and
> install it? If yes, how will we ensure that that library do not
> corrupt kernel modules or other intermediate libraries? If no, how
> will we ensure flexibility towards new advancements in technology?

No, we are not supporting any installation of third party kernel
drivers at this point (or any native code at all right now).

> 4. What is the maximum number of processes / threads that can co-
> exist at the same time?

It depends on how much memory there is. Our target is to run in 64MB
of RAM.

> 5. Out of the 4GB VM, how much virtual memory is available for user
> processes?

Uh. There is only going to be megabytes of memory on a device, not
gigabytes. The address space is far from the limiting factor on these
kinds of devices, at this point. Also, there is no swap space
(swapping to flash would be a bad idea), so the only way virtual
memory is used is to share physical pages across processes and page
read-only data (such as shared library code or other such mmapped
files) off disk.

> Thats 5 out of my 100 doubts.

Okay.

Digit

unread,
Feb 28, 2008, 4:07:03 AM2/28/08
to android-...@googlegroups.com
| By sending messages, you are actually indirectly writing to the VM allocated to other process

this is not true. all you do is send data that can be read by another process. however, you do not
control how or when this other process reads the data, nor where it goes in its own address space.
so you are not really "writing" in its VM.

this is called process isolation, and is a very basic feature of all operating systems since maybe 40
years (with the exception of DOS, Win9x and a *very* small number of embedded systems)

windstorm

unread,
Feb 28, 2008, 7:28:39 AM2/28/08
to android-...@googlegroups.com
hackbod said "we are not supporting any installation of third party kernel
drivers at this point (or any native code at all right now).", so you
mean it's possible in the future? And when will the people are allowed
to develop intermediate library by native code?

hackbod

unread,
Feb 28, 2008, 4:05:19 PM2/28/08
to Android Internals
The official way to develop APIs for the platform is Java. All of our
security and protection mechanism are based on the underlying OS
processes, and don't rely on Java at all.

That is about all I can say. :)

windstorm

unread,
Feb 28, 2008, 8:18:03 PM2/28/08
to android-...@googlegroups.com
You mean the official way to develop the third-part intermediate
library is Java? So what about the real-time property?

hackbod

unread,
Feb 28, 2008, 9:46:23 PM2/28/08
to Android Internals
On Feb 28, 5:18 pm, windstorm <likunarmstr...@gmail.com> wrote:
> You mean the official way to develop the third-part intermediate
> library is Java? So what about the real-time property?

Uh, you completely lost me there. Our API for third party
applications is Java. I don't know what "real-time property" refers
to. :}

vladimir.sch...@gmail.com

unread,
Feb 28, 2008, 9:55:07 PM2/28/08
to Android Internals
I think hackbod meant "the official way to develop *applications* for
the platform is Java".

On Feb 28, 5:18 pm, windstorm <likunarmstr...@gmail.com> wrote:

hackbod

unread,
Feb 28, 2008, 10:15:36 PM2/28/08
to Android Internals
Oh yeah sorry, that was a stupid typo on my part. My fingers wrote
"API", but my head was thinking "application". :)

On Feb 28, 6:55 pm, "vladimir.schlott.andr...@gmail.com"

windstorm

unread,
Feb 28, 2008, 10:26:24 PM2/28/08
to android-...@googlegroups.com
I see. So what about the possibility to develop intermediate library
by native code? Is it allowed for "everyone"?

hackbod

unread,
Feb 29, 2008, 3:00:20 AM2/29/08
to Android Internals
Java is our development environment for third party apps, and for 1.0
we don't plan to have general support for third party shared libraries
(of any form).

On Feb 28, 7:26 pm, windstorm <likunarmstr...@gmail.com> wrote:
> I see. So what about the possibility to develop intermediate library
> by native code? Is it allowed for "everyone"?
>
Reply all
Reply to author
Forward
0 new messages