I wasn't aware we supported fork at all in SE mode, and you may have
gotten as far as you did in X86 because the same system call is used to
spawn new threads in Linux. If you need processes to be able to create
each other, I would suggest FS mode. If you just want to run multiple
processes, you can assign each one as a workload to a hardware thread on
a CPU. If you want to use the m5threads package (which is what the
sys_clone support was added with) I believe you'll want to assign the
very same process object (not just an identical one) to multiple thread
contexts on a CPU.

Gabe

Sudhanshu(Duke) wrote:
> I tried using fork() function in a program and I got errors. I ran on
> SPARC_SE and X86_SE
> Following are the results generated:
> X86
> [wiz...@dungeon m5]$ build/X86_SE/m5.debug configs/example/forkmm.py
> ...
>
> **** REAL SIMULATION ****
> info: Entering event queue @ 0.  Starting simulation...
> warn: instruction 'fnstcw_Mw' unimplemented
>          <<
> For more information see: http://www.m5sim.org/warn/437d5238
> warn: instruction 'fldcw_Mw' unimplemented
>           <<
> For more information see: http://www.m5sim.org/warn/437d5238
> warn: This sys_clone implementation assumes flags
> CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD (0x10f00),
> and may not work correctly with given flags 0x1200011
> For more information see: http://www.m5sim.org/warn/8e4189bc
> fatal: Called sys_clone, but no unallocated thread contexts found!
>  @ cycle 1579435500
> [cloneFunc:build/X86_SE/sim/syscall_emul.cc, line 835]
> Memory Usage: 732336 KBytes
> For more information see: http://www.m5sim.org/fatal/d4b6f1ba
>
> SPARC64
> [wiz...@dungeon m5]$ build/SPARC_SE/m5.debug configs/example/forkmm.py
> **** REAL SIMULATION ****
> info: Entering event queue @ 0.  Starting simulation...
> fatal: syscall fork (#2) unimplemented.
>                <<
>  @ cycle 913047500
> [unimplementedFunc:build/SPARC_SE/sim/syscall_emul.cc, line 82]
> Memory Usage: 733416 KBytes
> For more information see: http://www.m5sim.org/fatal/be2b42f
>
> Correct me if I am wrong to say it is because fork implementation is
> missing in sparc and some problem with its implementation in x86. Now
> I wanted to test for multiple processes in multiprocessor environment
> but if I can't fork then how can i engage all the processors. Can
> pthread be used in SE mode??
>   

_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to