Case Study: Myke Predko's RTOS

From the Myke Predko's "Programming and Customizing the PIC Microcontroller", one of the topics which caught my attention is the RTOS/Multitasking chapter which is inside the book.
However, most of the content in the topic and in the book are already dated and no mentions of newer microcontrollers are there, so wading through the assembly codes are downright painful and difficult.
To improvise on his RTOS program which is his "Digital Clock and Thermometer", I used OSA RTOS : http://www.pic24.ru/doku.php/en/osa/ref/intro which is for the Hi-Tech PICC16/18, MikroE and MPLAB C18. I placed his routines carefully into each tasks formed.
The rest of his project in another RTOS are done well, except for the thermometer part. His thermometer is a DS18S20, and there are no mentions of how this one-wire emulation will affect the whole RTOS. Emulating a bus or an interface in a RTOS task isn't easy and it may corrupt readings if done improperly. I got a nasty fluctuating readings from +127 degrees celsius and some erroneous readings.
So, I tried to let the reading of DS18S20 to be a "critical task" which is to temporarily halt the RTOS, the timers and stuff to perform that particular task, and when it is done, the system continues the RTOS as usual. But this has a very bad drawback - the clock is being 14 minutes late due to this one interrupting the digital clock task.
Another practical way is to use a hardware UART to send/receive data to/from the DS18S20, and ditching the emulated bit-banged 1-wire immediately. By this way, there will be (probably) no or less chances the RTOS being stalled. I have yet to test this due to the absence of the open-drain buffer (it requires that for UART).
If I have made it working, I will write a sample code in MPLAB C18, Hi-Tech PICC16 and also for the MikroC.
However, most of the content in the topic and in the book are already dated and no mentions of newer microcontrollers are there, so wading through the assembly codes are downright painful and difficult.
To improvise on his RTOS program which is his "Digital Clock and Thermometer", I used OSA RTOS : http://www.pic24.ru/doku.php/en/osa/ref/intro which is for the Hi-Tech PICC16/18, MikroE and MPLAB C18. I placed his routines carefully into each tasks formed.
The rest of his project in another RTOS are done well, except for the thermometer part. His thermometer is a DS18S20, and there are no mentions of how this one-wire emulation will affect the whole RTOS. Emulating a bus or an interface in a RTOS task isn't easy and it may corrupt readings if done improperly. I got a nasty fluctuating readings from +127 degrees celsius and some erroneous readings.
So, I tried to let the reading of DS18S20 to be a "critical task" which is to temporarily halt the RTOS, the timers and stuff to perform that particular task, and when it is done, the system continues the RTOS as usual. But this has a very bad drawback - the clock is being 14 minutes late due to this one interrupting the digital clock task.
Another practical way is to use a hardware UART to send/receive data to/from the DS18S20, and ditching the emulated bit-banged 1-wire immediately. By this way, there will be (probably) no or less chances the RTOS being stalled. I have yet to test this due to the absence of the open-drain buffer (it requires that for UART).
If I have made it working, I will write a sample code in MPLAB C18, Hi-Tech PICC16 and also for the MikroC.