Dear Jason,

thank you for your answer. It gives me a hint how does gem5 work, but I am
unsure about the details. Is there any document which explains this?

To be concrete, if there are 4 cores and 4 threads, within once cycle, each
of them executes tick() on their own?

Best regards,
Jasmin

On Tue, Jan 17, 2017 at 3:59 PM, Jason Lowe-Power <[email protected]>
wrote:

> Hi Jasmin,
>
> gem5 is an event-driven simulator. So, when there are multiple objects
> (e.g., multiple CPU cores, or caches, or memory controllers, etc.) all of
> these objects can execute in parallel in simulated time (or guest time to
> use virtual machine nomenclature). The CPU models don't necessarily execute
> one instruction at a time. Instead they are simulated at the clock-cycle
> level. Each action which takes place at some clock-cycle boundary is
> scheduled and then executed as an event in the event-driven simulation.
>
> gem5 is mostly single threaded. All of the CPUs in your simulated system,
> and all of the other objects like caches, etc. are simulated in a single
> host thread. There are a few places where this isn't true, but it's unusual
> to run gem5 with parallel event queues.
>
> Hopefully this helps explain things. Let us know if you have more
> questions.
>
> Cheers,
> Jason
>
> On Tue, Jan 17, 2017 at 4:29 AM Jasmin Jahic <[email protected]>
> wrote:
>
>> Hello,
>>
>> I have one question regarding multi threading in gem5, in full system
>> mode. Since gem5 is seen as one process at host OS, how does gem5 actually
>> emulate multiple threads/processes? Let's say that we have 4 core CPU and
>> several processes and threads. Are these run in parallel really (one
>> instruction of this thread, then one instruction of another thread...?) or
>> there is some more complex mechanism?
>>
>> Is there perhaps a presentation or document which explains this?
>>
>> Best regards,
>> Jasmin JAHIC
>> _______________________________________________
>> gem5-users mailing list
>> [email protected]
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> --
>
> Jason
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to