Preview: Lecutre 3
http://d.hatena.ne.jp/tito_3G/20070508/1178616061#c
- specify my working environment
- fork: reasonably well done, but you should use perror() to determine why the fork fails.
- fork timing: not done.
- a) linux kernel source for fork: not done.
- b) another OS process defn: not done.
- how many processes: This problem was actually not well formulated, but the intent was for you to look at the PIDs assigned, to understand that a LOT of processes are created, and ideally to be aware that the PID space can loop. Are PIDs on your system 16 or 32 bits? I’m not subtracting points for not getting this problem.
Wow, I have a lot of problems about lecuter 3. Let's review.
specify my working environment
OS: FreeBSD6.1-RELEASE (on VMWare) Memory : 256 MB CPU: .. Virtual Processer?
use perror() to determine why the fork fails.
okey, use perror(). see my_fork2.c
If fork fails...
... 135 clock: I'm 783 th generation!! 135 clock: I'm 784 th generation!! 135 clock: I'm 785 th generation!! ERROR!: Resource temporarily unavailable
I can see this error is temporarily space is full!
fork timing: not done.
Really?? I intented to do it. So I changed a timing unit from CPU clock to second. and the result is. Like this.
1.164062 [sec]: I'm 997 th generation!! 1.164062 [sec]: I'm 998 th generation!! 1.164062 [sec]: I'm 999 th generation!! 1.171875 [sec]: I'm 1000 th generation!! ( '3') < the end !
I want to know this expression satisfies my homework?
a) linux kernel source for fork: not done
I show freeBSD kernel source for fork. I ordinary use BSD to study.
kern_fork.c
how many process
okey, I changed my program not to stop if there are 1000 children. And print error.
see my_fork.c
2.203125 [sec]: I'm 1783 th generation!! 2.203125 [sec]: I'm 1784 th generation!! 2.203125 [sec]: I'm 1785 th generation!! ERROR: : Resource temporarily unavailable
Oh, my pc can hvae 1785 children at most. I want to try check another enviroment.
To Do
What I have to do are
- decide my project theme
- homework of lecture 1
- homework of lecture 5