Hot!A minimalist RTOS for the PIC24

Page: < 12 Showing page 2 of 2
Author
marcov
Super Member
  • Total Posts : 234
  • Reward points : 0
  • Joined: 2006/10/08 01:59:40
  • Location: Eindhoven, NL.
  • Status: offline
Re: A minimalist RTOS for the PIC24 2018/07/25 14:13:45 (permalink)
0
Yes, it should be increase, I saw it after posting, but the @%!@#! forum doesn't let me edit it (well it lets me edit, but then gives an error when I try to save)
 
JorgeF:
You still have the interrupt, and its state saving/restoring to check that  (its prologue/epilogue). It depends how far you want to go. It is not entirely black/white, there are shades inbetween.
 
In real OSes, you can also check if an important interrupt occurred on every system entry (syscall), and invoke the scheduler if needed.
 
If you are interested in this stuff, I can recommend the "design and implementation of 4.4BSD" book.
#21
JorgeF
Super Member
  • Total Posts : 3297
  • Reward points : 0
  • Joined: 2011/07/09 11:56:58
  • Location: PT/EU @ Third rock from the Sun
  • Status: offline
Re: A minimalist RTOS for the PIC24 2018/07/25 14:33:39 (permalink)
3 (1)
Hi
marcov
JorgeF:
You still have the interrupt, and its state saving/restoring to check that  (its prologue/epilogue). It depends how far you want to go. It is not entirely black/white, there are shades inbetween.

I was not refering to the CPU context save/restore that happens in any ISR, I was refering to the task context, that the scheduller saves/restores when switching tasks.
marcov
In real OSes, you can also check if an important interrupt occurred on every system entry (syscall), and invoke the scheduler if needed.

"can" or "must"?
Without that the task management decays to a basic time-sharing system and will lose most of its "real time" characteristics.
marcov
If you are interested in this stuff, I can recommend the "design and implementation of 4.4BSD" book.

I've been playing with this stuff since back in 1982 (i8085, Z80, i8086,......,Linux,  PICs), but can allways learn some new tricks. Thank you for helping in the selection, when you don't have much free time, its hard to review all the stuff out there to select what is worth the time and money.
 
post edited by JorgeF - 2018/07/25 14:35:30

Best regards
Jorge
 
I'm here http://picforum.ric323.com too!
And it works better....
#22
marcov
Super Member
  • Total Posts : 234
  • Reward points : 0
  • Joined: 2006/10/08 01:59:40
  • Location: Eindhoven, NL.
  • Status: offline
Re: A minimalist RTOS for the PIC24 2018/07/26 02:32:49 (permalink)
0
JorgeF
I was not refering to the CPU context save/restore that happens in any ISR, I was refering to the task context, that the scheduller saves/restores when switching tasks.

 
I know. That is why I said it was grey.  Checking more (leaving the ISR at a fixed interval) has some overhead, but improves realtime characteristics (a different interrupt is reacted to in less time, max the time between intervals, on average half)
 
BUT in systems like x86 where interrupts are expensive, this can eat into throughput, so usually depending on priority and past history of using a full slice, the slice is sometimes elongated. On the otherhand, x86 typically has very high freq and very high throughput/freq, so the slices are already quite small (1us magnitude)
 

marcov
In real OSes, you can also check if an important interrupt occurred on every system entry (syscall), and invoke the scheduler if needed.

"can" or "must"?
 Without that the task management decays to a basic time-sharing system and will lose most of its "real time"
characteristics.

 
If it is a non-blocking call (e.g. fetching some data from the thread context), it is not a must.
 
Also doing the checks also costs time, and while average response improves, there is no guarantee that the task actually calls a syscall (it might be calculating pi or the golden ratio to many digits, and then render a fractal based on that calculation), and having fixed limits is a bit a case for (hard) real time.
 
So no, I don't think that is a requirement for realtime.
 

marcov
If you are interested in this stuff, I can recommend the "design and implementation of 4.4BSD" book.

I've been playing with this stuff since back in 1982 (i8085, Z80, i8086,......,Linux,  PICs), but can allways learn some new tricks. Thank you for helping in the selection, when you don't have much free time, its hard to review all the stuff out there to select what is worth the time and money.
 



Andrew S. Tanenbaum - Modern Operating systems is another such classic. For IPC and TCPIP you want Richard Stevens' books. I picked up slightly older editions at bargain prices.
 
It is wise to have a bunch of desirable titles on list, and regularly check marketplace sites for cheap used copies.
#23
Page: < 12 Showing page 2 of 2
Jump to:
© 2018 APG vNext Commercial Version 4.5