Fork() system call time?

  • nectuss
  • Born
  • Born
  • nectuss
  • Posts: 1

Post 3+ Months Ago

One more question. How can i calculate the time that system needs to make fork() system call? I need to make it with times function but i really don't know how. :(
  • Mas Sehguh
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1852

Post 3+ Months Ago

Record the time before forking, record the time after forking (in both parent and child). Take the lesser of the two post-fork times, and subtract from it the pre-fork time.

Run this program 1000 times, and use the minimum measurements.

If the resolution of CLK_TCK is too low, you could use cycle counting.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 51 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2016. Ozzu® is a registered trademark of Unmelted, LLC.