visopsys.org

Visopsys Forums
It is currently Sun Jan 21, 2018 7:28 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Mini-Project On Visopsys
PostPosted: Sun Apr 26, 2015 6:15 pm 
Offline

Joined: Sun Apr 26, 2015 4:10 pm
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: Mini-Project On Visopsys
PostPosted: Mon Apr 27, 2015 9:55 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 460
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.


Top
 Profile  
 
 Post subject: Re: Mini-Project On Visopsys
PostPosted: Thu Apr 30, 2015 11:45 am 
Offline

Joined: Sun Apr 26, 2015 4:10 pm
Posts: 2
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.


Top
 Profile  
 
 Post subject: Re: Mini-Project On Visopsys
PostPosted: Fri May 01, 2015 11:42 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 460
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group