MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] Multi-threaded mud server.
On 17 May 99,, Jo Dillon wrote:
>
> Isn't the point that every time you context switch you invalidate the
> cache (since the new thread of execution will be in a different chunk of
> memory to the old one), and therefore if you have more threads than
> processors you context-switch <bignum> times a second, therefore constantly
> invalidating your cache and giving yourself a big speed hit?
>
Any pre-emptive multi-tasking operating system will do a context switch
between processes/threads every couple dozen micro-seconds or so. That's
the nature of the beast. Either the process/thread runs out of time or
goes into a wait. At any given time an OS has dozens of ripe
processes/threads waiting for execution, even if it's lightly loaded. So
even a single-threaded server will be context-switched by the OS hundreds
or thousands of times every half hour. So, I let my operating system
worry about processor cache, and I let it worry about picking which
processor to use. I tune the operating system to use the hardware
efficiently, and I tune the application to use the operating system
efficiently.
--
--* Jon A. Lambert - TychoMUD Email:jlsysinc#ix,netcom.com *--
--* Mud Server Developer's Page <http://pw1.netcom.com/~jlsysinc> *--
--* To fight the empire is to be infected by its derangement. Whosoever *--
--* defeats part of the empire becomes the empire; it proliferates like a *--
--* a virus... thereby it becomes its enemies." -- P.K. Dick *--
_______________________________________________
MUD-Dev maillist - MUD-Dev#kanga,nu
http://www.kanga.nu/lists/listinfo/mud-dev
- Thread context:
- Re: [MUD-Dev] Multi-threaded mud server., (continued)
- Re: [MUD-Dev] Multi-threaded mud server.,
Jon A. Lambert jlsysinc#ix,netcom.com, Mon 17 May 1999, 15:45 GMT
- Re: [MUD-Dev] Multi-threaded mud server.,
Mik Clarke mikclrk#ibm,net, Tue 18 May 1999, 07:01 GMT
- Re: [MUD-Dev] Multi-threaded mud server.,
Jo Dillon emily#thelonious,new.ox.ac.uk, Tue 18 May 1999, 07:02 GMT
- Re: [MUD-Dev] Multi-threaded mud server.,
Ross Nicoll rnicoll#lostics,demon.co.uk, Fri 28 May 1999, 21:03 GMT
- Re: [MUD-Dev] Multi-threaded mud server.,
Ola Fosheim Grøstad olag#ifi,uio.no, Wed 19 May 1999, 04:46 GMT
[ Other Periods
| Other mailing lists
| Search
]