last day (37 days later) » 

04:56
@Tanuj hi :-)
hey
(: good morning
I have a couple of questions regarding kernels and modular programming etc
would you be free during the next hour ?
kernels and modules and awk and makefile etc
Yes, I'm around for several hours.
@JohnRennie thanks , I've just been reading from the ppts my teacher sent me , and its really confusing
OK ... ?
I am not able to solve any questions related to them
yeah , also I've never worked with Linux as such , so it gets more confusing
@JohnRennie i was reading about modular programming and it kind of sounds like a normal programming environment where we use functions to implement a particular task
is there any difference ?
05:01
Yes, the four things you mention are four completely different and unrelated things.
I'm thinking modular programs are handled by the kernel space whereas normal programs are handled in user space
A module typically means a device driver, so yes they are chunks of code that can be linked into the kernel.
hmm
so like can I say that modules are analogous to functions in a user program ?
Suppose you write a program that does some graphics. You don't want to write all the graphics code so you use a library that contains the graphics code.
@JohnRennie okay
that would be what I would do in a normal user space programming
05:08
So your program might call a function DrawCircle, and the code for this function is in the graphics library not in your program. Your program calls into the graphics library, and when the graphics are done it returns back to your program again.
(all in user space)
@JohnRennie got it
Now suppose you have some device, e.g. a coffee maker, attached to your computer.
yeah
The kernel doesn't know how to operate a coffeemaker because Linus Torvalds didn't think of it when it wrote the kernel.
So the code to operate the coffee maker is put into a module.
okay
ah
right
05:11
Then when something needs to be done with the coffee maker the kernel calls into the module. The module does whatever needs doing then returns to the kernel.
so like we can continue to update the kernel according to our needs by updating it with new modules
So it's like your program using a graphics library except that all this happens in kernel space not user space.
@Tanuj exactly, yes.
Ah , so modules are analogous to functions arent they ?
functions , or subroutines , or libraries
I would have said analogous to libraries i.e. collections of many functions.
@JohnRennie Gotcha
suddenly it makes so much sense
I have some more questions I need to ask
I'll be back in 5
05:13
OK ... :-)
I need to work now for a bit ...
@JohnRennie I'll ping you the doubts , and if you could afford to have a look at them it would be great

  last day (37 days later) »