Re: Queue task

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Sergey ...

> Thank you for your reply. You answered to most of all my questions.
> Additional RTFM is required for me :)

Well, everybody should RTFM at some point anyway :)


> Yes, abs. correct. I would like to modify ns2 simulator to get  an
> opportunity to emualate real-world IP packets.

First of all, I know nothing about ns2 simulator, but I'll try my best 
to give some hints based on your given informations.

> So, the ns2 application is a userspace application. Now my LLD is
Pardon me, what is LLD?

> Also, this design distrubs me about perfomance. See:
> When virtual event starts execution, I block all singnals (using
> sigprocmask(SIG_BLOCK)) and release them after (using
> sigprocmask(SIG_SETMASK)). I would like to protect my timetable
> (scheduler) from multiply changes at the the same time (like Critical
> sections).

Hm, I think you need better way to increase concurrency. If what you 
want to do is protecting the timetable, find better way to do the 
locking instead of doing "global" lock, in other word protecting the 
whole list. A better idea is by using spinlock/semaphore per item 
(event) on event list, try to manipulate the entry list (add, delete, 
move etc etc)  in atomic style and so on. The best solution is of 
course a lockless mechanism.

> So, the last question: Is there any possibility to make it faster?
> Can anybody advice me more efficient ways?Are there some examples of
> such kind communication between kernel and userspace?

Faster, maybe...but you really need to tweak it by yourself according to 
the general design of ns2 simulator's internal. 

regards

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux