Hi all. I have a duo-core PC which runs win XP 32. The graphics card has lots of RAM, at least 512 MB, maybe more. As I understand it, one of the cores is assigned to run OS tasks, handle graphics and some other stuff. In particular, the graphics card RAM 'spends' significant amounts of the memory address space of this core. Which - if correct - means that I have one core that is busy and constrained on RAM, and another core that has little to do and can access the full RAM memory space (2GB). I am in the very awkward situation where I have a core with 2 GB RAM, but the task scheduler assigns my program to the busy core, with the end result that my program bails out for 'out of memory' reasons at a mere 500-600 MB (yes, I have checked). So, how can I trick my PC to assign this single-thread program to run on the idle core? (Yeah, I know. It's no reason to expect that it can be done, but I have to ask...) Rune
Whip a duo-core PC into submission...?
Started by ●November 18, 2008
Reply by ●November 18, 20082008-11-18
Rune Allnor wrote:> I have a duo-core PC which runs win XP 32. The graphics > card has lots of RAM, at least 512 MB, maybe more. > > As I understand it, one of the cores is assigned to run OS > tasks, handle graphics and some other stuff. In particular, > the graphics card RAM 'spends' significant amounts of the > memory address space of this core. > > Which - if correct - means that I have one core that is busy > and constrained on RAM, and another core that has little > to do and can access the full RAM memory space (2GB).In Win XP professional, the multiprocessing is symmetrical. The task scheduler throws whatever active thread to either one of the cores; there is no predestination of the threads and the memory spaces.> I am in the very awkward situation where I have a core > with 2 GB RAM, but the task scheduler assigns my program > to the busy core, with the end result that my program > bails out for 'out of memory' reasons at a mere 500-600 MB > (yes, I have checked).This is a system issue not related to the multiprocessing.> So, how can I trick my PC to assign this single-thread > program to run on the idle core? (Yeah, I know. It's no > reason to expect that it can be done, but I have to ask...)Perhaps your version of XP doesn't have the full support of the multiprocessing. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●November 18, 20082008-11-18
On Tue, 18 Nov 2008 15:20:48 -0800, Rune Allnor wrote:> I have a duo-core PC which runs win XP 32. The graphics card has lots of > RAM, at least 512 MB, maybe more. > > As I understand it, one of the cores is assigned to run OS tasks, handle > graphics and some other stuff. In particular, the graphics card RAM > 'spends' significant amounts of the memory address space of this core.I'm pretty sure that's not the way multi-core PCs work. They're typically "SMP" systems, where the S stants for "symmetrical". Both cores are identical, and both communicate with the same, single chunk of memory (once they reach past their caches, which may be independent or shared or both). The operating system assigns whichever processor is idle to the next runnable process (or interrupt handler) in the task queue, unless some special operation has been performed to "pin" a task to a given CPU, or unless the OS is doing "NUMA processor affinity" scheduling to make better use of the already-loaded contents of the per- core caches. Your milage will definitely vary, depending on which operating system you're running. Since you didn't specify, I'll guess that's Windows-XP, which behaves essentially as described, I think (I don't use it much myself). If you're using DOS or Windows 3.x, 95, 98 or ME, then it will only *ever* use one core, because that's all it knows how to handle.> Which - if correct - means that I have one core that is busy and > constrained on RAM, and another core that has little to do and can > access the full RAM memory space (2GB).Nope, they both get all of RAM. Of course, your application tasks aren't the only things competing for that RAM. Windows tends to give a *lot* of it over to disk cache, and the operating system itself uses a fair chunk.> I am in the very awkward situation where I have a core with 2 GB RAM, > but the task scheduler assigns my program to the busy core, with the end > result that my program bails out for 'out of memory' reasons at a mere > 500-600 MB (yes, I have checked).How much disk activity are you doing? That could affect the result. If your program is the only "busy" process on your system, and it is only single threaded, then by definition the processor that it is running on will be the busy one, and the other one will be mostly idle. There's nothing that you can do about that other than re-writing the application to use multiple threads.> So, how can I trick my PC to assign this single-thread program to run on > the idle core? (Yeah, I know. It's no reason to expect that it can be > done, but I have to ask...)It does: and immediately that other core is no longer idle... Cheers, -- Andrew
Reply by ●November 18, 20082008-11-18
Rune Allnor <allnor@tele.ntnu.no> writes:> I am in the very awkward situation where I have a core > with 2 GB RAM, but the task scheduler assigns my program > to the busy core, with the end result that my program > bails out for 'out of memory' reasons at a mere 500-600 MB > (yes, I have checked).Perhaps your memory is fragmented? -- % Randy Yates % "Ticket to the moon, flight leaves here today %% Fuquay-Varina, NC % from Satellite 2" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://www.digitalsignallabs.com
Reply by ●November 18, 20082008-11-18
Randy Yates wrote:> Rune Allnor <allnor@tele.ntnu.no> writes: > > >>I am in the very awkward situation where I have a core >>with 2 GB RAM, but the task scheduler assigns my program >>to the busy core, with the end result that my program >>bails out for 'out of memory' reasons at a mere 500-600 MB >>(yes, I have checked). > > > Perhaps your memory is fragmented?Good point. Nitpick: in the virtual memory systems, memory fragmentation doesn't matter, but the address space fragmentation does. It is easy enough to run out of the address space in the 32 bit system. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●November 19, 20082008-11-19
On 19 Nov, 00:39, Vladimir Vassilevsky <antispam_bo...@hotmail.com> wrote:> Rune Allnor wrote: > > I have a duo-core PC which runs win XP 32. The graphics > > card has lots of RAM, at least 512 MB, maybe more. > > > As I understand it, one of the cores is assigned to run OS > > tasks, handle graphics and some other stuff. In particular, > > the graphics card RAM 'spends' significant amounts of the > > memory address space of this core. > > > Which - if correct - means that I have one core that is busy > > and constrained on RAM, and another core that has little > > to do and can access the full RAM memory space (2GB). > > In Win XP professional, the multiprocessing is symmetrical. The task > scheduler throws whatever active thread to either one of the cores; > there is no predestination of the threads and the memory spaces.Hm...> > I am in the very awkward situation where I have a core > > with 2 GB RAM, but the task scheduler assigns my program > > to the busy core, with the end result that my program > > bails out for 'out of memory' reasons at a mere 500-600 MB > > (yes, I have checked). > > This is a system issue not related to the multiprocessing.I would think so too...> > So, how can I trick my PC to assign this single-thread > > program to run on the idle core? (Yeah, I know. It's no > > reason to expect that it can be done, but I have to ask...) > > Perhaps your version of XP doesn't have the full support of the > multiprocessing.No. What seems to have happened was that some salesman told me some BS. I use the thing to develop and run heavy-duty data processing, so the graphics card was essential. According to the spec the PC has 512 MB graphics memory and 256 MB video memory. According to the salesman, the address space of this graphics card "_comes_out_of_the_regular_RAM_address_space_ so the PC only needs 3GB RAM. No need to install the last GB since most of it can't be accessed anyway." It might not have made much sense to me at the time, but I was placing a large order so I didn't expect the salesmen to tell BS. Besides, they (the salesmen and techies) seemed to have made their mind up pretty strongly. And besides, it's 20 years since I knew the PC in sufficient detail to know for sure when somebody told me BS. So does anybody know where I can find a good overview of the PC architecture? With particular focus on task scheduling and addressing of graphics cards. I might need to have a chat with somebody at the PC venodor's in a few days... Rune
Reply by ●November 19, 20082008-11-19
Rune Allnor <allnor@tele.ntnu.no> writes:> Hi all. > > I have a duo-core PC which runs win XP 32. The graphics > card has lots of RAM, at least 512 MB, maybe more. >Or does it make use of the system RAM?> As I understand it, one of the cores is assigned to run OS > tasks, handle graphics and some other stuff. In particular, > the graphics card RAM 'spends' significant amounts of the > memory address space of this core. > > Which - if correct - means that I have one core that is busy > and constrained on RAM, and another core that has little > to do and can access the full RAM memory space (2GB). >No, both cores are available to both OS and application code. The graphics RAM takes up address space that can't then be populated with real memory, but not on a particular core.> I am in the very awkward situation where I have a core > with 2 GB RAM, but the task scheduler assigns my program > to the busy core, with the end result that my program > bails out for 'out of memory' reasons at a mere 500-600 MB > (yes, I have checked). >The task scheduler assigns your program to whichever core looks best at the time, taking into account which core it ran on last, and all sorts of other information. I don't think this has anything to do with your out of memory error though - as others have said, the cores are identical and used equally by OS and app. Is anything else using lots of RAM?> So, how can I trick my PC to assign this single-thread > program to run on the idle core? (Yeah, I know. It's no > reason to expect that it can be done, but I have to ask...) >You can (under windows) use the task manager to assign a process to a particular core, but I'm not sure that's your problem. Sorry not be more helpful! Cheers, Martin -- martin.j.thompson@trw.com TRW Conekt - Consultancy in Engineering, Knowledge and Technology http://www.conekt.net/electronics.html
Reply by ●November 19, 20082008-11-19
On 19 Nov, 14:01, Martin Thompson <martin.j.thomp...@trw.com> wrote:> Rune Allnor <all...@tele.ntnu.no> writes:> > So, how can I trick my PC to assign this single-thread > > program to run on the idle core? (Yeah, I know. It's no > > reason to expect that it can be done, but I have to ask...) > > You can (under windows) use the task manager to assign a process to a > particular core, but I'm not sure that's your problem.Ah! That did the trick. I just assigned the process to the 2nd CPU and the thing just went through the roof. I'm watching the task manager as I write this, and the program is easily chewing 750 MB of RAM, increasing as we speak. Well, write.> Sorry not be more helpful!More than enough as it is. More than enough. Thanks! Rune
Reply by ●November 19, 20082008-11-19
Rune Allnor wrote:> What seems to have happened was that some salesman told me > some BS.BS is his job.> I use the thing to develop and run heavy-duty data > processing, so the graphics card was essential.So, you are using the math library which takes advantage of the graphics processor. That is supposed to speed up the operations like matrix multiplication immensely. How well does this work in the reality?>> According to the >> spec the PC has 512 MB graphics memory and 256 MB video memory.What does this mean? 256M on the card + another 256M allocated from the main memory? Sharing main memory is a cheap variant.> According to the salesman, the address space of this graphics card > "_comes_out_of_the_regular_RAM_address_space_ so the PC only needs > 3GB RAM. No need to install the last GB since most of it can't be > accessed anyway."In the 32 bit PC, the address space of the 4th gigabyte is partually or completely taken by the hardware peripherals. So, there could be some sense.> It might not have made much sense to me at the time, but I was > placing a large order so I didn't expect the salesmen to tell BS.Bigger order -> more BS :-)> Besides, they (the salesmen and techies) seemed to have made their > mind up pretty strongly.BTW, as a life philosophy principle, I don't allow anyone making decisions for me.> And besides, it's 20 years since I knew the PC in sufficient detail > to know for sure when somebody told me BS.The architectures change every year. Perhaps only the few system hardware and software developers know the details.> So does anybody know where I can find a good overview of the > PC architecture? With particular focus on task scheduling and > addressing of graphics cards. I might need to have a chat > with somebody at the PC venodor's in a few days...I can get you in touch with a guy who develops the math libraries for the graphic cards. Drop me an email. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●November 19, 20082008-11-19
On 19 Nov, 15:35, Vladimir Vassilevsky <antispam_bo...@hotmail.com> wrote:> Rune Allnor wrote: > > What seems to have happened was that some salesman told me > > some BS. > > BS is his job.I'm too jaded tpo expect anyone to be good at their jobs; not even that one...> > I use the thing to develop and run heavy-duty data > > processing, so the graphics card was essential. > > So, you are using the math library which takes advantage of the graphics > processor.Nope. I'm processing large amounts of data. Each individual operation is trivial, but the scale makes stuff hard. Since this is interactive processing, I need to be able to visualize large amounts of data easily and fast. It only tages $$ to get a large graphics card; naive OpenGL programming does the rest.> That is supposed to speed up the operations like matrix > multiplication immensely. How well does this work in the reality?I don't do that. I'm focusing on the commercial side of things, not th etechnical. It's a matter of being able to do stuff no one else have done before.> >> According to the > >> spec the PC has 512 MB graphics memory and 256 MB video memory. > > What does this mean? 256M on the card + another 256M allocated from the > main memory? Sharing main memory is a cheap variant.I don't know. I interpreted the ad such that the graphics card has dedicated memory. It's a top-of-the-line model (at least what $$ is concerned) so I expected it to be dedicated memory.> > According to the salesman, the address space of this graphics card > > "_comes_out_of_the_regular_RAM_address_space_ so the PC only needs > > 3GB RAM. No need to install the last GB since most of it can't be > > accessed anyway." > > In the 32 bit PC, the address space of the 4th gigabyte is partually or > completely taken by the hardware peripherals. So, there could be some > sense.The 32 bit system has 4G addresses but only 2G are used for RAM. I'd espect that peripherals were mapped in the >2G range. But then, Microsoft is involved...> > It might not have made much sense to me at the time, but I was > > placing a large order so I didn't expect the salesmen to tell BS. > > Bigger order -> more BS :-) > > > Besides, they (the salesmen and techies) seemed to have made their > > mind up pretty strongly. > > BTW, as a life philosophy principle, I don't allow anyone making > decisions for me.Nope. But a 20-something-year-old kid who has made up his mind on what he considers to be his home turf, isn't easily persuaded by somebody old enough to have taught his teachers. Which I might actually have done.> > And besides, it's 20 years since I knew the PC in sufficient detail > > to know for sure when somebody told me BS. > > The architectures change every year. Perhaps only the few system > hardware and software developers know the details.Which was why I early on decided to stay away from the HW side of things.> > So does anybody know where I can find a good overview of the > > PC architecture? With particular focus on task scheduling and > > addressing of graphics cards. I might need to have a chat > > with somebody at the PC venodor's in a few days... > > I can get you in touch with a guy who develops the math libraries for > the graphic cards. Drop me an email.Thanks, but a general on-line description will do. Rune






