Mini-Project On Visopsys

General discussion about Visopsys. We'll create more specific forums if the number of posts justifies that.
Post Reply
c2p_11
Posts: 2
Joined: Sun Apr 26, 2015 4:10 pm

Mini-Project On Visopsys

Post by c2p_11 » Sun Apr 26, 2015 6:15 pm

I have been doing a project in our Operating System Course for which i have chosen my topic as to study the working of Visopsys.
So we thought that we could try implementing any one of unimplemented part. So we decided on working on the IPC(Inter Process Communication) , as we thought it could be better developed and explored for wider range of applications.
So we would like some suggestions as in how to proceed and if possible some ideas as in which would be the best to further explore and develop on.
We already started studying the basic codes of different implemented sections over VISOPSYS. :D

User avatar
andymc
Posts: 479
Joined: Tue Nov 16, 2010 7:20 pm

Re: Mini-Project On Visopsys

Post by andymc » Mon Apr 27, 2015 9:55 am

Hi c2p_11, welcome.

That's cool that you guys are studying Visopsys. I guess a smaller project like this one is a bit easier to study, than something like Linux, and is still missing parts that you can do.

A proper IPC system would be good to have. Indeed, I think one will be needed soon, when the Window shell becomes a user space program instead of a kernel thread. The various programs, and perhaps the kernel, will need to be able to talk to it. There are already mechanisms for doing shared memory and signals, so these may come in handy for you. Then you maybe just need a standard interface; a way to structure data and maybe do remote procedure calls. It's an interesting design problem.

c2p_11
Posts: 2
Joined: Sun Apr 26, 2015 4:10 pm

Re: Mini-Project On Visopsys

Post by c2p_11 » Thu Apr 30, 2015 11:45 am

Thanks a lot for your reply.
And actually speaking your insight gave us a better clarity over what to work on , since we were wandering around IPC on exactly what to work over. The problem statement you have mentioned was pretty catchy and interesting to work on.I guess there must be something which others or may be you yourself have developed something over this.
So we would be grateful if you could help us out regarding this.

User avatar
andymc
Posts: 479
Joined: Tue Nov 16, 2010 7:20 pm

Re: Mini-Project On Visopsys

Post by andymc » Fri May 01, 2015 11:42 am

I think designing the IPC protocol is the fun part, and I think I should leave that up to you guys, as a design exercise.

In the simplest version, we need a way to pass data objects and some form of metadata describing what the object is. You have to pass these between separate executables that don't share memory space generally, but can use specific pieces of shared memory -- memory that's requested to be mapped into the memory space of both processes. So, most userspace pointers have to be avoided, and data needs to be copied. Another way of sending data is via the kernel and its memory; call the kernel with the data, then the kernel wakes up the receiving process and transfers the data to it, via a callback or similar.

A more sophisticated version would extend this to RPC (remote procedure call) where you would say what function or service you want, and any arguments (presumably using the data mechanism mentioned above), with a way to return results. The caller should be able to choose blocking or non-blocking calls.

You could design and test all of the basic non-kernel-specific stuff in user space on another operating system, such as Linux.

The next part is to integrate all of this into Visopsys. The kernel is monolithic, and usually manages things like this. So, you'd probably want to add some kernel API calls (src/include/sys/api.h, src/lib/libc/_kernapi.c, src/kernel/kernelApi.c) so that processes can register for IPC. You can also look at/copy the way the GUI programs receive windowEvents, using a bit of library code that registers callbacks, then launching a GUI thread to poll the kernel for data (src/lib/libwindow/windowMain.c).

That enough to get started with a design?

Post Reply