Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

V9.0.0 round robin bahaviour simulation on windows 10, dual core PC

Posted by bobbyfengb1124 on April 8, 2017

Hi,

I am doing a round robin simulation on my dual core PC running Windows 10. So I am using the windows port. I am trying to create a task1, then in task1, I create a short task task2 with same priority, then I call taskyield() to give up the processor. based on my understanding of the sheduling behaviour, task2 should always run after I call taskyield(), when task2 is completed, task1 will be schedule, if it is in a single processor environment. However, what I experience is that sometimes task2 will be scheduled after taskyield() is called in task1, sometimes task1 will be running again after taskyield() is called.

May I check with you if the simulation version will utilized the dual processors when schedule the tasks with same priority?

Thanks & Regards Feng Bo


V9.0.0 round robin bahaviour simulation on windows 10, dual core PC

Posted by richard_damon on April 8, 2017

I would prsume that the Windows simulator will run single (Windows) threaded (and thus single core) as that is the mode that most looks like the processors it runs on natively. What can happen if you have Preemption enable is that if the (simulated) timer tic occurs just after the call to taskyield(), then the taskyield call would switch to task2, and the time tick then switchs control back to task1.


V9.0.0 round robin bahaviour simulation on windows 10, dual core PC

Posted by rtel on April 8, 2017

Correct assumption - only a single core is used.

From the OP: >when task2 is completed

What do you mean by completing a task? Does the task delete itself?


V9.0.0 round robin bahaviour simulation on windows 10, dual core PC

Posted by bobbyfengb1124 on April 9, 2017

Yes, task 2 will delete itself.


V9.0.0 round robin bahaviour simulation on windows 10, dual core PC

Posted by bobbyfengb1124 on April 9, 2017

Thank you Richard, but I think what you are refering to is the TIMESLICING option, right? When I disable TIMESLICING option, when task1 call taskyield(), it will always come back to schedule task1 again.


V9.0.0 round robin bahaviour simulation on windows 10, dual core PC

Posted by bobbyfengb1124 on April 9, 2017

V9.0.0 round robin bahaviour simulation on windows 10, dual core PC

Posted by richard_damon on April 10, 2017

Yes, I was thinking of Time Slicing (which requries Preemption)


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists