
  If you have a single threaded application that runs on a PC with a quadcore processor then does a .net program use all four processors?


No, it can’t, at least not simultaneously. However, it’s theoretically possible that the operating system’s scheduler first executes your thread on one processor and later moves it to another processor. Such a scheduler is necessary to allow simultaneously running more applications / threads than there are physical processors present: execution of a thread is sliced into small pieces, which are fed to the processor(s) one after the other. Each threads gets some time slice allocated during which it can calculate before usage of the CPU switches to another thread.


  Do you have any control of this as a developer?


Not directly. What you can control is the priority of your thread to make it more important to the task scheduler.

On a more general note, you should not use threads in your use-case – at least not directly. Threads are actually pretty low-level primitives. For your specific use-case, there’s a component called BackgroundWorker which abstracts many of the low-level details of thread management for you.


  If you have a multi threaded application (say four threads) on a quadcore processor then does each thread execute on different cores?


Not necessarily; again, the application has next to no control over how exactly its threads are executed; the operating system however tries really hard to schedule threads “smartly”. This means that in practice, if your application has several busy threads, they are spread out as evenly as possible across the available cores. In particular, if there are no more threads than cores then each thread gets its own core.

VB.NET multi threading and system architecture
How can I call external javascript in my default admin html page in Django. 

I know that using MEDIA class I can do this in admin.py file.

Here is the my try:

  class PlayerAdmin(admin.ModelAdmin):
      class Media:
        js = ('/static_files/js/adminsettings.js')


But I am not getting data written in the JavaScript file.
