views:

136

answers:

3

Hi,

I am new to android kernel and Mobile Operating Systems and I have a few questions regarding android kernel.

1) Does Android OS has Kernel Mode and a User mode like Normal desktop OSs ? Also does it support things like Virtual Memory ? Also I heard about Dalvik VMM. Is a copy of dalvik VMM created for each and every process ?

2) Another Question is I heard android creates a separate file system for each and every process(every application). Is this true ? If so How OS maintains these file systems and where are they mounted. Does it have a hierarchy like Unix based systems ?

3) Another Question is regarding IPC in android. What are binders in android ? How does it differ from normal IPC mechanisms like pipes, msg queues etc.

4) Another Question not related to android but How does the driver address Flash based disks like Solid state drives etc. For ex: normal HDD block can be identified by cylinder, sector and a track.

A: 

1) If you want permissions for various operations you need to enable them in the manifest. 2) Yes. Each application has its own file-system, but the files are accessed by file name only (no path). If you want to use external memory such as an SD card, you need to enable permission in the manifest, and use a fully qualified path/file-name. 3) I am not familiar with android binders (though I see them while debugging), but passing messages between tasks is very straightforward. 4) Flash based memory blocks are identified by address. Flash is not RAM, but it is random access.

JackN
+2  A: 

Does the Android kernel have a kernel space and user space?

The kernel used on Android powered devices is a 2.6 kernel providing the core system services like memory management, process management, network stack, and driver model.

So yes it does have a kernel and user space. You have the regular /proc file system for kernel/user space communication for example.

It is true that every application runs in its own process with its own instance of DVM.

You can read more about it on the What is Android? page.

How does the application file structure look like on Android?

Yes every applications has its own directory structure for application data like databases, shared preferences and other application specific files which looks like this.

/data/data/packagename

Other than that the actual .apk files are located in

/data/app

I'm not quite sure about your question if it is a UNIX based hierarchy system. I guess you want to know if applications will be placed in /usr/bin/ and so on. Then no. Except you write some binaries yourself and build your custom image then you should definitely place your system binaries in the default FSH places.

On question three. I'm not quite sure what you are referring to. If you mean the UNIX IPC then well it's a 2.6 kernel with all it's core functionalities like states above. If you are referring to Remote procedure calls of the APIs then you might take a look at Remote procedure calls.

Question four is beyond my knowledge or I didn't get your question.

Generally I'd recommend you some very interesting reads.

Hope it helped somehow.

Octavian Damiean
@Mainerror Thank you very much for the explanation. I am just asking about binders in android. How they work and why are they new
mousey
Also about the file system. If every process has its own file system how OS should detect them ? (generally filesystems are detected by using a partition tables (ex: MBR or GUID). So for every file using such thing is a over head right ?
mousey
I'm sorry for the incorrect wording there. I've reworded that based on hobbs answer. It's not a file system it's a directory structure.
Octavian Damiean
+3  A: 

1. The "Android kernel" is the Linux kernel.

1a. No, you didn't hear about the "Dalvik VMM", you heard about the "Dalvik VM", which is simply a new kind of Java VM. It runs Java apps. No magic. No, there isn't somehow a Dalvik VM associated with "every process", but yes, each application runs in an independent process.

2. No. There's a directory structure, not distinct filesystems.

3. Why Binder?

4. Android uses the usual Linux MTD and MTD-Block devices. And the world is LBA, whether for flash or hard drives. CHS is only for those time-travelling thirty years to the past.

hobbs
@hobbs thank you very much.
mousey