Home   Info   DevZone   Wiki  
UsersWeb  |  MainWeb  |  InfoWeb  |  DevZoneWeb  |  SupportWeb
ClarkOnLine ] [ not logged in ] [ Web: Imported ] goto:  options
[ get info on or edit ] login or new user ] [ list of topics, hubs & nodes, or recent changes ]

Yep. I'm in the same boat... should head home.


More details...

Basically, the memory manager would then service the request and put/get the memory from the stack. That's that.

There are a few items that need to be addressed:

  1. Not all classes can be supported by all managers
  2. Inter-manager object references.
Hmmmm.....


Database=no file system? Well, from a users perspective, NO. They have no clue how the information is stored (unlike, say Word).


To detail how this might work for references:

Ok. First of all, the VM reference says that object references are 32 bits. Fun. I do not think that there is a reason why we can't implement this differently as long as we meet this illusion to the corrsponding bytecodes.

For the time being, let us limit our conversation to get/set for fields of an object since this is 80% of the meat.

Lets say that our "Reference" data type is partitioned into two parts. The high word gives an address or offset in a jump table for the interface of the memory manager being used to minipulate the object. The low word is can be used by the memory manager any way we see fit.

Although this is not the best solution, it is the most obvious. This gives us 16 bits to define the memory managers (too much) and 16 bits that the memory manager can use to identify an object (too few). We could play lots of games to make this ratio a bit better, for instance we could use the first bit to denote if we are using the "normal, volitale RAM" manager. This would give us 31 bits of address space for that one manager, 15 bits for other managers, and 16 bits for the address space in that manager. Alternatively, a double dispach can be used... but these are just (important) details....


Did you get what I was saying about the bytecodes?

They are the interface to move information from the data store (RAM,Disk,OODBMS,RDBMS,DistributedObject,etc) to the stack.

Make sence? They are interface unified model. Processing:

  1. Input (Get ByteCodes, Implemented by memory manager)
  2. Processing (Implemented by the other bytecodes)
  3. Output (Set Bytecodes, Implemented by memory manager)
The Oracle memory manager, for instance, would be serving up objects.. the objects would never actually exist in RAM on the computer... the Get/Set would be translated into the correct SQL and executed. There are lots of issues here... but it would be great if the OS supported the pluggable opportunity.


GrandUnifiedMemoryModel? Do you have a better name for the MultipleMemoryManagers concept then?

Actually, most of the applcations I work with are database applications. So, yes, there is no file system. Just one big gigantic object space. And it is a shit load of code to make the illusion magical. I just keep having to reinvent this wheel again and again and again and again and frankly I'm getting sick of operating systems that don't DoTheRightThing(tm). Basically the user interface talks to the user in "their" terms. When a word processing document is finished it says "publish?" not "save?". Save is stupid. Of course it is saved.

Oracle's object-relational support is mediocre. The binding is what is really poor and needs help. Yep, actually in this years EuroPloP a rather nice 15 page paper was published on the topic. Code listings don't really help much since it lacked so much necessary detail. JavaBlend is basically the same approach.... although majorly flawed. It sits on top of JDBC. I need to spend more time to really evaluate it, but so far I am not really that impressed. I can imagine it being painfullly slow and not handling all of the distribued concerns that you need to be worried about (JDBC simply hides most of them). Anyway, a Oracle memory manager woudl talk directly to the sockets of the Oracle DBMS and leverage distribued transactions, etc the whole shebang!


I don't know, perhaps I am just being plain old weird here. But why not? Sure performance. Well, lets finish brain storming it out, make a quick prototype and claim inneficient later? Or is this too much to ask.

  1. One interface for object storage
  2. One interface for array allocations.
  3. One for local variables?
  4. One for stacks? (really far fetched here.)
  5. etc.
A memory manager can implement the interfaces it chooses. A class can specify which memory manager is used for its class instances in the ClassRepository. We can make an intelligent guess (the default) for most entries.

In addition, different ProcessEnvironments might want to use different managers for their objects if the classes requested have not specified which one they require.


About GrandUnifiedMemoryModel,

Well... the Java byte codes __are__ the model.

Sure you can say that it is an ideal, and some of the later things are a bit on the, well, shall we say, heated list? I have read Sun's papers on making distribued access the same as local acess.. they have valid points, but I think they are being overly pessimistic.

Anyway, persistent storage is about ignoring the difference between ram and disk and leaving it up to the operating system to handle the details.

It would be nice if we could make our memory management model open so that people could play around and perhaps find a practical way to do this effectively... It just might happen. (I might make access to objects in an relational Oracle database happen) Any other way to do this is just as flawed. And database programmers do not handle the errors, I say let's push it down to the memory manager level where I believe it really belongs.


About the bytecodes....


When I think memory manager, I'm thinking of the part of the OS that's responsible for allocating RAM, tracking available RAM, and managing paging to disk. Yep.

There is nothing saying that a user level memory manager might not use default kernel level memroy managers for some of the really nasty implementation stuff.

WhatThisAllows:

  1. Different memory managers implement different policies.
  2. Some memory managers manage "persistent memory".
  3. There might be some "don't cash" memory mangers.
  4. Depending upon object granulairy a few classes (sound files) might want to implement their own memory manger that would cashe the object appropriately for performance.
  5. (I always get slammed here, but remote objects)
  6. A memory manger to handle objects in a relational datbase
  7. A memory manager to handle object oriented databases
  8. A memory manager for my EEPROM or Hardware card.
  9. Security to be moved to a lower level (if needed)


About half of the bytecodes are used for the following:

Anyway, there is no reason why we could not make an interface out of this and allow multiple memory managers on a process/class level? Mabye even object level.


Hmm. Well. MemoryManger... the problem with many operating systems is that you are forced into the memory management policies set by the one and only memory manager. In short I would like this monster replaceable... on a class by class level. In this way my Order objects can be managed by a OracleMemoryManager... etc. Bathroom break.


Well, sure desktop vs process. I need to think more on this one. However, what is a "service" in Windows? It is a program that is always running in the background - infact some services do their best to carry on as they left off.

There is another big problem with saving processes, that is transient variables.... this might make things unworkable.

But actually, saving process is only about 5% or less of what I am really after....


1. I agree here. We could use serilization to save classes. I see this as a policy of a memory manager. :) Agree here

2. Nope, nothing dictates, infact even though they say that references are 32 bits, nothing saying we can use something else as long as the VM works as expected. :) Agree here

3. ObjectStore TM They have a pre compiler that creates Load/Save methods on existing class files. Basically they modify the class files and do swizzling without help of the VM. It is a really nasty way to do it and it is not very transparent.. they use proxy objects everwhere. (The pre compiler generates a class with the identical interface that does a residency check and then delegates)

4. I am no expert here either. Just interested. I have alot of Oracle background and a math degree so it is not so rough. Simple stuff they have going.

5. Hmm. Don't get this point. Let me try to explain the Memory Manager.


Yes. Processes __can__ be persisted. This saves the users desktop right were they left off, etc. It brings up a host of problems, like locks. I guess your point is somewhat valid, what good is it. Hmm. Well it would leave the user right where they left off... plain and simple. With their "unsaved" (or I would re-name it "unpublished" ) document up in their editor...


Great! Hmm History, well Markus is the one who wrote the 1.

WikiClone and set up the mailing lists. I can get you the source if you want. Can Markus This mechinism for chatting really sucks. Goddamit! I should just write a HTTP tunneling vesion of IQC so I can get through the firewall here.

2. Hmm bit aggressive. It is not always good to put everything in the glossary.. but you recognize this. I would love a NameJustRight TM but am very afraid that it is impractical.

3. :) This is nice, sounds a bit like JavaLobby.... My vision for this is different than Java Lobby. I want people to edit other peoples stuff. This is what is different. This signing shit is for the birds. I wish for instance, that you would have edited in your comments/uncertienties and merged them with what I wrote. It ends up being much more cohesive document that way. Hmm... well I don't know.


Bill wrote: What did you think about the idea that processes don't have persistence? That's at least partially false, I guess, if we're going to put them to sleep with some sort of time slicing & paging algorithms. But maybe that works? Can we say a process has it's own ClassRepository which references the system and user repositories but contains local copies of unsafe code. This ClassRepository is part of the disk space used by the Process when it is "sleeped" by the scheduler. Sorry, can't remember the word for switched out tasks.

Well, I think that process can be persisted. If you read the grasshopper stuff they are doing it, PJama will do this in the future as well.... There is nothing saying that during the "stabiliation" process the stack is saved, etc.... We can pull really nice tricks to pull this off beacuse we are writing our own VM.


1. A persistence mechanism exists in Java: Serializable, etc.

Yes it does, but it is an all or nothing kind of thing. You have to stream the object and all of its references in one big file. This does not scale to a corporate order entry system.

2. This mechanism relies on streams.

Yep. It is also slow beacuse the "saved" format is different from teh internal format. Read about Grasshopper and PJama.... they are doing what is called OthogonalPersistence

3. If we define some "default" serialization for Object in the VM or kernel that makes sense for JOS, we could persist anything we wanted to.

Yep. This is the way to go.....

  1. 5 Alternatively, we might have created a portable object store if we can implement it in 100% Pure
Hmm. Nope ODI has done the best they can... and it sucks. Working within the confines of 100% Pure is good, but it is just not going to scale. Sun recognizes this, which is why they are funding a bunch of persistence research... eventually this will make its way into Java.

4. A streaming file system can be efficient. Look up the stuff on Sprite that I added to the OS readings. It claims improved performance over Unix I/O.

Hmm. Could you educate me here?

5. I just generally like the idea that we build on Java to handle what we want, instead of hacking extra stuff in if we can help it.

I understand the concern. I want the kernel extensible. And yes, the kernel extensions will not be compatible with other VMs. My pet favorite kernel extension is persistence.




Content of these pages are owned and copyrighted by the poster.
Hosted by: