direct-code-execution / ns-3-dce

Run real programs in the discrete time simulator ns3
http://www.nsnam.org/projects/direct-code-execution/
75 stars 46 forks source link

DCE LKL integration #88

Open usama54321 opened 6 years ago

usama54321 commented 6 years ago

Description of the problem

I'm trying to interface DCE with the Linux Kernel Library. I am a bit unsure about how the current Process/Thread/Task system is working. I do have a basic understanding. However, I am facing a problem while trying to interface with LKL.

During the call to InitializeStack https://github.com/direct-code-execution/ns-3-dce/blob/aa5de622d84a1c9d3a2b285a06d8b9304fb7f30d/model/kernel-socket-fd-factory.cc#L558 The call to Current: https://github.com/direct-code-execution/ns-3-dce/blob/aa5de622d84a1c9d3a2b285a06d8b9304fb7f30d/model/utils.cc#L121 which is supposed to be the current thread, is returning null. This does not cause any problems with net-next-nuse, but I need to initialize Semaphores etc, inside LKL during its initialization, which in turn needs a context. I am going through the events and figure out why the context is empty, but a general idea about the overall TaskManager class would really help me.

I hope this is the right forum to ask this question.

Thanks, Usama

SPYFF commented 5 years ago

Maybe this one helps: https://ns-3-dce-gsoc-2018.github.io/