Forum Discussion
Altera_Forum
Honored Contributor
22 years agouCOS + LWIP limit TCP/IP to 60% of cpu power
Dear All,
I want to use Nios II with the RTOS and have it running as TCP/IP server. BUT I want to limit the processing power used by the TCP/IP server to 60%. Is this possible and if so can someone give me a small intro how it is done (I'll dig up the details myself). I am new to OS systems. If you know how to do it without the OS, OK for me, just explain how. Thank you all, Greg1 Reply
- Altera_Forum
Honored Contributor
Hello Greg,
MicroC-OS/II is a pre-emptive multi-tasking kernel. You can set the priority of the TCP and RX LWIP tasks to be lower than more important tasks. So, if you have a task which you want to run 40% of the time, leaving the remaining LWIP tasks to run during the remaining 60% time, simply create your higher priority task with a priority level above the LWIP tasks. If this higher priority 40% CPU consuming task would otherwise execute constantly, you can have that task give up CPU control by delaying for a fixed time period, thus allowing the MicroC-OS/II RTOS to schedule some time for the lower priority LWIP tasks to run. Best regards, Stephen O'Reilly Altera Embedded Applications Engineering