Re: Multitasking in Mac OS Gets 100% CPU

new topic     » goto parent     » topic index » view thread      » older message » newer message

I don't have XP for testing. In Windows 7 the CPU usage is really awesome. Same multitask sample code, except I changed the For loops to 100 for longer run time.

csrss.exe between 1% to 7%
eui between 2% to 5%

Nothing else is out of the ordinary.

I do understand having a while loop doing get_key() is probably CPU intensive. So I'm merely looking for ideas for a better coding practice to code a "get_line" routine that's suitable as Shell command input, sometimes with background processes, sometimes not (just like a Unix shell)... without taking up 100% CPU in Linux and Mac OS. The Mac gets hot and the fan starts fanning as soon as the multitask sample is run.

I'll try task_delay within the get_key loop again tonight using the multitask sample code in Mac and report.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu