POV-Ray : Newsgroups : povray.off-topic : How do you run code in more than one core? Server Time
29 Jul 2024 00:30:15 EDT (-0400)
  How do you run code in more than one core? (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Le Forgeron
Subject: Re: How do you run code in more than one core?
Date: 4 Nov 2012 03:03:08
Message: <5096213c$1@news.povray.org>
Le 04/11/2012 08:02, Warp nous fit lire :
> clipka <ano### [at] anonymousorg> wrote:
>> after that, it wakes up the APs
> 
> How?
> 
> (Also: After the other cores have been started and are running some idle
> process, waiting for tasks to be assigned to them, how do you assign tasks
> to them? IOW how do they detect that they should start running something?)
> 
Is that a general question or is it targeted to a specific architecture
? (like x86 or arm or ... even SoC)

The notion of process/tasks is something that is alien to a CPU/core. It
runs the next instruction or process some interruptions (by stacking the
current state and performing a change of PC).
The process/task concept is an illusion created by the scheduling code
of the OS.


Post a reply to this message

From: Warp
Subject: Re: How do you run code in more than one core?
Date: 4 Nov 2012 03:41:41
Message: <50962a45@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> The notion of process/tasks is something that is alien to a CPU/core. It
> runs the next instruction or process some interruptions (by stacking the
> current state and performing a change of PC).
> The process/task concept is an illusion created by the scheduling code
> of the OS.

That doesn't answer my question.

-- 
                                                          - Warp


Post a reply to this message

From: Le Forgeron
Subject: Re: How do you run code in more than one core?
Date: 4 Nov 2012 05:08:04
Message: <50963e84$1@news.povray.org>
Le 04/11/2012 09:41, Warp nous fit lire :
> Le_Forgeron <jgr### [at] freefr> wrote:
>> The notion of process/tasks is something that is alien to a CPU/core. It
>> runs the next instruction or process some interruptions (by stacking the
>> current state and performing a change of PC).
>> The process/task concept is an illusion created by the scheduling code
>> of the OS.
> 
> That doesn't answer my question.
> 

http://www.mindshare.com/shop/?c=b&section=0A6B17101710

Have a peek inside, page 117 (#363) should answer it. More on the next
pages too.

And next jump to 147-149 (#629-#631)


Post a reply to this message

From: Warp
Subject: Re: How do you run code in more than one core?
Date: 4 Nov 2012 05:50:51
Message: <5096488b@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> http://www.mindshare.com/shop/?c=b&section=0A6B17101710

> Have a peek inside, page 117 (#363) should answer it. More on the next
> pages too.

> And next jump to 147-149 (#629-#631)

How about just explaining it in a few sentences?

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: How do you run code in more than one core?
Date: 4 Nov 2012 20:42:25
Message: <50971981@news.povray.org>
Am 04.11.2012 08:02, schrieb Warp:
> clipka <ano### [at] anonymousorg> wrote:
>> after that, it wakes up the APs
>
> How?

The APs enter Halt state, so to wake them up you trigger whatever event 
gets a CPU out of Halt... Interrupt, maybe? You COULD possibly read up 
on it in the System Programmer's Guide; see the link I posted.

> (Also: After the other cores have been started and are running some idle
> process, waiting for tasks to be assigned to them, how do you assign tasks
> to them? IOW how do they detect that they should start running something?)

An idle processor enters a power-saving state, waiting for an interrupt 
from either a self-set timer or triggered by another processor via 
interrupt controller. Once it is woken up, it checks the list of pending 
jobs, calls dibs on the next one, and goes to work. (Or, if the list is 
empty, goes to sleep again.)

Not much magic in there.


Post a reply to this message

From: clipka
Subject: Re: How do you run code in more than one core?
Date: 4 Nov 2012 20:48:41
Message: <50971af9$1@news.povray.org>
Am 04.11.2012 11:50, schrieb Warp:
> Le_Forgeron <jgr### [at] freefr> wrote:
>> http://www.mindshare.com/shop/?c=b&section=0A6B17101710
>
>> Have a peek inside, page 117 (#363) should answer it. More on the next
>> pages too.
>
>> And next jump to 147-149 (#629-#631)
>
> How about just explaining it in a few sentences?

Say, I might be messing things up here (sorry if I do), but don't you 
happen to be one of the people who love to respond with "GIYF"?


Post a reply to this message

From: Warp
Subject: Re: How do you run code in more than one core?
Date: 6 Nov 2012 08:29:52
Message: <509910d0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Say, I might be messing things up here (sorry if I do), but don't you 
> happen to be one of the people who love to respond with "GIYF"?

What makes you think I haven't tried?

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: How do you run code in more than one core?
Date: 6 Nov 2012 08:33:27
Message: <509911a6@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> The APs enter Halt state, so to wake them up you trigger whatever event 
> gets a CPU out of Halt... Interrupt, maybe? You COULD possibly read up 
> on it in the System Programmer's Guide; see the link I posted.

So far what I have gathered is this:

The correct answer depends on the processor architecture, of course, but
for example in most Intel-based architectures there's a physical controller
chip named APIC (Advanced Programmable Interrupt Controller) that's used
for, among other things, wake up additional processors/cores and make them
run specified code.

What I still can't figure out is how exactly you tell the APIC to do that.

-- 
                                                          - Warp


Post a reply to this message

From: Le Forgeron
Subject: Re: How do you run code in more than one core?
Date: 6 Nov 2012 08:46:10
Message: <509914a2$1@news.povray.org>
Le 06/11/2012 14:33, Warp a écrit :
> clipka <ano### [at] anonymousorg> wrote:
>> The APs enter Halt state, so to wake them up you trigger whatever event 
>> gets a CPU out of Halt... Interrupt, maybe? You COULD possibly read up 
>> on it in the System Programmer's Guide; see the link I posted.
> 
> So far what I have gathered is this:
> 
> The correct answer depends on the processor architecture, of course, but
> for example in most Intel-based architectures there's a physical controller
> chip named APIC (Advanced Programmable Interrupt Controller) that's used
> for, among other things, wake up additional processors/cores and make them
> run specified code.
> 
> What I still can't figure out is how exactly you tell the APIC to do that.
> 

Probably like with any other controller: read & write operation to its
'magical' locations (so, load & store in assembly...)

From page 7, it seems the APIC registers are in a 4K-byte page....


>
http://www.intel.com/content/dam/doc/specification-update/64-architecture-x2apic-specification.pdf


Post a reply to this message

From: clipka
Subject: Re: How do you run code in more than one core?
Date: 6 Nov 2012 15:30:25
Message: <50997361$1@news.povray.org>
Am 06.11.2012 14:29, schrieb Warp:
> clipka <ano### [at] anonymousorg> wrote:
>> Say, I might be messing things up here (sorry if I do), but don't you
>> happen to be one of the people who love to respond with "GIYF"?
>
> What makes you think I haven't tried?

I do believe you did try to google it up, but you don't seem to have 
bothered reading the few pages of documentation Jerome pointed you to.


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.