A OS Idea... working.
Posted: Wed Jan 11, 2006 9:42 pm
A OS idea working. Well, it needs alot more work such as working on the CRT to add in functions to allow better managment of persistant packets for IPC. But, this snipplet of code shows a thread establishing a connection with a kernel process. Querying the number of nodes on its ring. Then querying the IDs of those nodes using packets like a network. No ring changes, no stack switches.
You can batch kernel calls together, and send them all out at once. Right now the CRT function netCmdWait waits on completion of the entire packet. I know for sure, that you would be able to pack together alot of calls or just one in any case. The kernel could then place functions that are not a big priority such as querys and stuff below doing IRQ commands, and other things. Or, even take care of stuff it needs to do - and since other process could also take advantage of this by doing other things while they wait such as processing GUI packets.
Also, the packets are not copied from process memory to process memory. They are shared using a technique that allows shared memory to not become a security issue in any way - except for bugging problems writting secure information onto shared packets.... And, not having to resend the packets by using persistant packets.
I also have a idea and im sure it will work, not 99.9% sure. That persistant packets(not being sent each time) can be used with remote system by way of distributed processing. Since the programs are writting using this model; lag time from networking would be natively handled.
For one thing, getting rid of the need to copy results out of the packet just to reuse it is something I know can be done.
I just could not wait to post something. Im sorry.
If someone wants to see all the code I can send it via email. You need MSVC to compile it right off the bat. It consists of the kernel project(kernel). The two programs firstapp, and vgas.
HAHAHAHAHA
Code: Select all
???unsigned int netCount;
???unsigned int * result;
???/* ------------------------- */
???netCmdInitialize(a);
???result = (unsigned int*)netCmdAdd(a, NETCMD_QNETCOUNT, 0, 4);
???netCmdExecute(a);
???netCmdWait(a);
???netCount = *result;
???
???netCmdClear(a);
???result = (unsigned int*)netCmdAdd(a, NETCMD_QNET, 0, 4 * (netCount));
???netCmdExecute(a);
???netCmdWait(a);
???/* -- copy results; we are about to reuse this packet. -- */
???for(unsigned int x = 0; x < netCount; x++){
??????((unsigned int*)(a + 0x1000))[x] = result[x];
???}
???netCmdClear(a);
???netCmdAdd(a, NETCMD_NULL, &netCount, 4);
???for(unsigned int x = 0; x < netCount; x++){
??????netCmdAdd(a, NETCMD_NULL, &((unsigned int*)(a + 0x1000))[x], 4);
???}
???netCmdExecute(a);
???netCmdWait(a);
Also, the packets are not copied from process memory to process memory. They are shared using a technique that allows shared memory to not become a security issue in any way - except for bugging problems writting secure information onto shared packets.... And, not having to resend the packets by using persistant packets.
I also have a idea and im sure it will work, not 99.9% sure. That persistant packets(not being sent each time) can be used with remote system by way of distributed processing. Since the programs are writting using this model; lag time from networking would be natively handled.
For one thing, getting rid of the need to copy results out of the packet just to reuse it is something I know can be done.
I just could not wait to post something. Im sorry.
If someone wants to see all the code I can send it via email. You need MSVC to compile it right off the bat. It consists of the kernel project(kernel). The two programs firstapp, and vgas.
HAHAHAHAHA