Page 4 of 4

Posted: Wed Oct 22, 2003 11:38 pm
by VLSmooth
No, you can't have my child.

Posted: Wed Oct 22, 2003 11:40 pm
by VLSmooth
I'll see about trying that out tomorrow, but the extra bool requirement is definitely hackish. In the end, I'm fairly certain I won't be using that approach.

btw, any idea why funct_passing.cpp is returning 0 ms? Perhaps sleep is a special function.

Posted: Wed Oct 22, 2003 11:42 pm
by VLSmooth
Also, yes, I would ask some people here, if they didn't leave early (at normal?) times. Pfft.

Posted: Wed Oct 22, 2003 11:44 pm
by Jonathan
VLSmooth wrote:I'll see about trying that out tomorrow, but the extra bool requirement is definitely hackish. In the end, I'm fairly certain I won't be using that approach.
There. I changed it.

Posted: Wed Oct 22, 2003 11:45 pm
by Jonathan
VLSmooth wrote:Also, yes, I would ask some people here, if they didn't leave early (at normal?) times. Pfft.
If you spend more than 9 hours per day in the office, you are a loser.

Posted: Wed Oct 22, 2003 11:47 pm
by VLSmooth
Try less then 6 ^_^;

Really need to get going though, buying some snacks for a poker night/world series at my apt. Would suck if I was late.

Posted: Wed Oct 22, 2003 11:47 pm
by Jonathan
VLSmooth wrote:Try less then 6 ^_^;

Really need to get going though, buying some snacks for a poker night/world series at my apt. Would suck if I was late.
No, you must test version 2.0 of my void* code!

Posted: Wed Oct 22, 2003 11:48 pm
by Jonathan
VLSmooth wrote:Try less then 6 ^_^;

Really need to get going though, buying some snacks for a poker night/world series at my apt. Would suck if I was late.
If you arrive later than 10:30, you are a slacker.

Posted: Thu Oct 23, 2003 4:12 am
by quantus
Yes, I'm not a slacker! Well, not too much of one.

Posted: Sat Oct 25, 2003 11:30 pm
by VLSmooth
In conclusion, I really should've learned of the "make" training before doing any of this. A very nice make process and timing infrastructure already exists (make is a very convenient wrapper for gmake as well). Too bad I can't compile anything since a massive CVS conversion is taking place. Fun fun.

Posted: Sun Oct 26, 2003 2:37 am
by Jonathan
What kind of environment are you in, that make is not aliased to gmake?

Posted: Sun Oct 26, 2003 2:41 am
by VLSmooth
Er, maybe I wasn't clear. make IS aliased to gmake, and then some. It's linked to a wrapper with lots of functionality, perfectly meshing with a process I just found the online training for yesterday.

Posted: Tue Nov 18, 2003 10:14 pm
by Jonathan
I have a long running process currently taking up 100% CPU.

What happens if I copy over an object file that the binary for my process is dynamically linked against while the process is still running?

There are three cases:
Functionally equivalent object file
Slightly different object file (bugfix, doesn't affect functionality)
Completed different object file

My current thinking is that all three are the same, because the object file has been loaded into memory already, so it doesn't matter what happens on the disk. However, I could see that perhaps only some of the object file got loaded into memory (the portions that are currently used) so that if the running process had to access disk to get other parts of the object file, it would find a completely different object file and cause a crash. I'm not so sure what would happen if the slightly different object file case is considered if not all of the object file is loaded into memory. If the changes don't affect the process's functionality but, say, have the functions at a slightly different offset in the file, this may break the process too. Or, maybe all the linking is done via alias or name and the absolute positions don't matter as long as the names stay the same.

Anybody with more systems experience than me care to comment? This is on a Linux 2.4 platform.

Posted: Tue Nov 18, 2003 10:31 pm
by Peijen
I don't really have an answer to your question. But from what I have been doing in the last few month, I found myself tend to load all the data into memory when the program first loaded to have less number of disk access and more centralized location for code that load data from disk.

So I guess what I am saying is that it depends on how the program is written. If all the libraries are loaded as soon as the process starts then you shouldn't have too much problem. However if the libraries are loaded as needed then there is no telling what will happend: library already loaded, library is getting loaded, library has not been loaded.

I have no idea what linux kernel does and I have no idea what your process/compiler do either.

Couldn't you just version the libraries? I think Linux allows you to link different program to different version of library all running at once, but I could be talking out of my ass.

Posted: Tue Nov 18, 2003 10:34 pm
by Peijen
actually now that I reread your post and realize your process isn't necessary a compiler, I would say all the object files are probably loaded when the process started.

Posted: Tue Nov 18, 2003 10:42 pm
by Jonathan
I was simplifying the issue. What is happening in reality is this: I have 338 processes running on that number of machines. I have realized there is a bug in one of my object files that affects some of those processes that has to be corrected. I killed all those processes, since the results were junk anyway. I am left with 222 processes which will produce good data. I want to keep whatever intermediate results they've calculated so I don't want to kill them. However, I need to start new processes to redo the calculations that I junked using the fixed object file. I was trying to figure out if I could just copy over the bad object file and restart my processes.

The way I solved this was by letting the currently running processes continue to run with the bad object file. I then redid everything else with the good object file saved in a different location. This way the two sets of runs won't stomp on each other. I still don't know if I could have copied over the object file, but I guess it doesn't matter at this time.

Man, I wish I had done this check on Sunday like I meant to. I had to delete 300~ results for a one line fix.