• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Timers
 

Timers

on

  • 2,722 views

 

Statistics

Views

Total Views
2,722
Views on SlideShare
1,217
Embed Views
1,505

Actions

Likes
1
Downloads
0
Comments
0

6 Embeds 1,505

http://sysplay.in 771
http://profession.sarika-pugs.com 716
http://www.userspace.org 7
http://www.sysplay.in 6
http://www.linkedin.com 4
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Timers Timers Presentation Transcript

    • Timers © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> All Rights Reserved.
    • What to Expect? Alarm based Trivial Timer Interval Timers based on other Signals © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 2 All Rights Reserved.
    • Trivial Timer Based on the alarm signal (SIGALRM) One Timer per Process Timer resolution is in seconds Activated using the alarm() system call Any subsequent calls to alarm cancels the previous ones, if not already triggered Triggered after seconds specified in last alarm() call SIGALRM handler is the timer handler One shot behaviour, unless activated again © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 3 All Rights Reserved.
    • Other User Space Timers Based on Interval Timers Total of three timers possible per Process ITIMER_REAL (Based on real time) – SIGALRM ITIMER_VIRTUAL (Based on execution time) – SIGVTALRM ITIMER_PROF (Based on overall execution time) – SIGPROF Timer Resolution is in micro seconds Though expiry may be a little later Activated using setitimer system call And can be queried using gettimer system call Triggered Periodically, every interval, after current value As specified in the setitimer call From the call to setitimer © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 4 All Rights Reserved.
    • Other User Space Timers ... POSIX.1-2008 marks the setitimer / getitimer calls obsolete Rather recommends the following timer_settime, timer_gettime timer_create, timer_delete timer_getoverrun With these, many more interval timers could be used Using signals other than the 3 usual ones Also including the real-time signals © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 5 All Rights Reserved.
    • What all have we learnt? Alarm based Trivial Timer Interval Timers based on other Signals © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 6 All Rights Reserved.
    • Any Queries? © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 7 All Rights Reserved.