Clan x86

Member Forums => Joe's Bunker of Pie => Topic started by: Joe on August 22, 2007, 04:18:46 am

Title: My new toy..
Post by: Joe on August 22, 2007, 04:18:46 am
A HP Compaq 6710b Notebook!

Yeah, I know Compaq's aren't really computers at all, but actually a work of the devil, but this is sort of GI (it's my school machine) so I just have to deal with it. It's a pretty decent machine, equipped with 1GB of RAM (in a single slot, so if I feel like dumping $200 into another SODIMM, I can!) and a (IMO, blazing fast) Intel Core 2 Duo 2.00GHz (so, 4GHz?) processor. As soon as I get my everyday things situated on this, I'll probably end up using this as my main machine.

By the way, does anyone know how to kill NetNanny? It told me I wasn't allowed to view the board index because it had mature/adult content.. which doesn't really surprise me. Lol, it's process can be killed and simply disabled in msconfig. WHO WILL PROTECT YOUR CHILDREN NOW, NANNY? MUAHAHAHA. Sorry.
Title: Re: My new toy..
Post by: Chavo on August 22, 2007, 08:51:56 am
Having a dual core processor does not mean you have performance comparable to twice the frequency of a single core.
Title: Re: My new toy..
Post by: iago on August 22, 2007, 09:26:56 am
According to the commercial for future shop, not only is dual core "way faster than previous generations", they advise you to get "2gb of ram so you can run multiple programs". Have fun running a single program, sucker!

(Note: Future Shop is the Canadian version of Best Buy (and owned by BB, too), and I really hate their commercials.)
Title: Re: My new toy..
Post by: chuck on August 22, 2007, 12:36:18 pm
According to the commercial for future shop, not only is dual core "way faster than previous generations", they advise you to get "2gb of ram so you can run multiple programs". Have fun running a single program, sucker!

(Note: Future Shop is the Canadian version of Best Buy (and owned by BB, too), and I really hate their commercials.)
Future Shop is also overpriced... CompuSmart was alot better than them till they stopped doing retail. :(
Title: Re: My new toy..
Post by: Joe on August 22, 2007, 09:03:29 pm
Having a dual core processor does not mean you have performance comparable to twice the frequency of a single core.

I'm sort of having difficulty understanding exactly what is what. I know that a single thread only runs on a single core, but if I'm using multiple programs (say, I'm converting WMA to MP3 in one programming and browsing the web in another), the programs will be split between the two cores doubling the possible workload that it can handle, correct?
Title: Re: My new toy..
Post by: Chavo on August 22, 2007, 09:14:02 pm
In theory, the effective speed is comparable to double a single cores speed (~190-195% max efficiency even in theory) but that requires the programs running on the processor to support the dual core ISA.  If you know how HyperThreading works, you know that only programs designed to take advantage of it benefit.  If you want to know more, I can probably find something online or recommend a couple books regarding computer architecture. 
Title: Re: My new toy..
Post by: Joe on August 23, 2007, 02:40:34 am
That'd be cool! I'm sort of interested in both sides of the concept (the user side and programmer's side) since I plan on using this machine for development as well.
Title: Re: My new toy..
Post by: Chavo on August 23, 2007, 11:43:39 am
You can start with wikipedia: http://en.wikipedia.org/wiki/Multi-core_%28computing%29
and: http://en.wikipedia.org/wiki/Parallel_computing

Most of the links aren't that great though, I'll look through my books when I get home and see if any are entry level enough.
Title: Re: My new toy..
Post by: MyndFyre on August 29, 2007, 04:41:55 am
In theory, the effective speed is comparable to double a single cores speed (~190-195% max efficiency even in theory) but that requires the programs running on the processor to support the dual core ISA.  If you know how HyperThreading works, you know that only programs designed to take advantage of it benefit.  If you want to know more, I can probably find something online or recommend a couple books regarding computer architecture. 

A book such as Windows Internals might also be worthwhile.  It is of course more specific to Windows programming, but it is enlightening nonetheless.

In Windows, the scheduler assigns processor time on a per-processor, per-thread basis.  Threads are not assigned priority based on a process, unless the process or thread has been given process affinity.

By saying that a program must be designed to take advantage of hyperthreading or dual-core systems, for Windows specifically, that means that you'd only need to create multiple threads in order to take advantage of these kinds of benefits.

Cool, huh? :)
Title: Re: My new toy..
Post by: Chavo on August 29, 2007, 12:59:05 pm
That's not completely accurate :)  The OS definately has the job of optimizing multithreading, especially with multiple processors/cores (Parallelism).  However, there is significant optimization that has to be done at the instruction set level.  The OS can't do anything about this ;)  I don't know of any OS that will actually modify the binary executable to use new or optimized instructions.  That would be pretty cool though.  I suppose the trade-off in run-time optimization might not produce a net benefit though.

The comparison is similar in principle to 64bit application development compared to 32bit applications.  The OS has to first support the extended instruction set and the application has to take advantage of the larger field sizes where applicable as well.

It's very difficult to show this with benchmarks because so much of the time doing a given task is spent accessing memory, transferring data to/from secondary memory, etc.  Of course, that just shows the diminishing returns of the current PC architecture.
Title: Re: My new toy..
Post by: MyndFyre on August 29, 2007, 04:18:57 pm
However, there is significant optimization that has to be done at the instruction set level.

It depends on what you're talking about.

If you're talking about whether two threads can run in parallel, no additional coding is required to achieve this in a Windows program, short of creating and starting a new thread.

If you're talking about whether two threads can manipulate and perform calculations on the same series of data in parallel, well then you're right.  You run into problems such as concurrency.  You also frequently see problems with making sure that instructions can be executed out-of-order and achieve the same result.  But this isn't the same as what I said about dual-core/multi-core systems programming in a Windows environment. :P
Title: Re: My new toy..
Post by: Chavo on August 29, 2007, 04:54:25 pm
My point was that Parallelism is only one piece of the 'advantages of multiple cores' pie.
Title: Re: My new toy..
Post by: Camel on September 04, 2007, 03:20:34 pm
I started development my bot primarily on a single-core machine. When I got my X2, I realized I was missing quite a bit of synchronization. Fortunately, it's very easy to solve those problems in Java. While it's not impossible for these types of issues to come up in a single-core operating environment, it's less likely by an extremely large factor. Before you dive in, I'd strongly recommend learning about synchronization, in addition to the aforementioned topics.
Title: Re: My new toy..
Post by: Newby on September 04, 2007, 07:53:03 pm
Whenever I see this topic, I think you bought some sort of sex toy or dildo. :/
Title: Re: My new toy..
Post by: MyndFyre on September 04, 2007, 09:26:52 pm
Whenever I see this topic, I think you bought some sort of sex toy or dildo. :/

Who doesn't enjoy them??
Title: Re: My new toy..
Post by: Joe on September 04, 2007, 10:52:01 pm
I started development my bot primarily on a single-core machine. When I got my X2, I realized I was missing quite a bit of synchronization. Fortunately, it's very easy to solve those problems in Java. While it's not impossible for these types of issues to come up in a single-core operating environment, it's less likely by an extremely large factor. Before you dive in, I'd strongly recommend learning about synchronization, in addition to the aforementioned topics.

By synchronization, do you mean methods running synchronously and asynchronously? I've already learned a bunch of that kind of stuff through threading, especially in the ways I work with sockets.
Title: Re: My new toy..
Post by: rabbit on September 05, 2007, 12:12:04 am
Talk to GS, he sells fleshlights :D
Title: Re: My new toy..
Post by: Chavo on September 05, 2007, 12:27:43 am
The book I have (An earlier version of this one (http://www.amazon.com/Designing-SOCs-Configured-Cores-Unleashing/dp/0123724988/ref=sr_1_29/102-9859454-4311303?ie=UTF8&s=books&qid=1188966539&sr=1-29)) is easily beyond your level but you might try this one if you can find it at the library or something:
Optimizing-Applications-Multi-Core-Processors-Performance (http://www.amazon.com/Optimizing-Applications-Multi-Core-Processors-Performance/dp/1934053015/ref=sr_1_12/102-9859454-4311303?ie=UTF8&s=books&qid=1188966157&sr=1-12)

I haven't read it but I've seen it lying around and the synopsis seems like you would understand it better.  Be forewarned that it is most likely a very dry read.

edit:
This one looks good too.  Talks more about the hardware side and embedded system (your truly).
Multiprocessor Systems-on-Chips (http://www.amazon.com/Multiprocessor-Systems-Chips-Systems-Silicon/dp/012385251X/ref=pd_sim_b_4/102-9859454-4311303?ie=UTF8&qid=1188966539&sr=1-29)
Title: Re: My new toy..
Post by: Killer360 on September 07, 2007, 12:47:01 pm
Why the fuck do you have netnanny installed?  :D
Title: Re: My new toy..
Post by: Joe on September 07, 2007, 01:36:24 pm
Why the fuck do you have netnanny installed?  :D

My school == gay^2, apparently.
Title: Re: My new toy..
Post by: Sidoh on September 07, 2007, 02:01:51 pm
Your school is (http://latex.sidoh.org/?render64=Z2F5IFxvcGx1cyAy)? ;D
Title: Re: My new toy..
Post by: Camel on September 07, 2007, 02:08:25 pm
Your school is (http://latex.sidoh.org/?render64=Z2F5IFxvcGx1cyAy)? ;D
gay \oplus2?

(http://latex.sidoh.org/?render=\displaystyle\int\frac{d(cabin)}{cabin}=ln(cabin)%2Bc=houseboat)
Title: Re: My new toy..
Post by: Sidoh on September 07, 2007, 02:17:33 pm
Since he used ==, one usually would assume that ^ is the exclusive or operator, which is mathematically expressed with (http://latex.sidoh.org/?render64=XG9wbHVz).

Really, though, I'm just giving him a hard time. :P

And, in response to your edit:

(http://imgs.xkcd.com/comics/useless.jpg)
Title: Re: My new toy..
Post by: Joe on September 07, 2007, 03:07:22 pm
Gay squared, to be precise.
Title: Re: My new toy..
Post by: Sidoh on September 07, 2007, 03:10:55 pm
Gay squared, to be precise.

Yep, I know, but ^ is pretty ambiguous when you're in a "programming" context. :)
Title: Re: My new toy..
Post by: Joe on September 07, 2007, 03:13:52 pm
I was ignoring that. :P
Title: Re: My new toy..
Post by: iago on September 07, 2007, 03:26:29 pm
I always try to use "**" for exponents, I was taught that in school. But that seems to confuse people even more than "^". :-o
Title: Re: My new toy..
Post by: rabbit on September 07, 2007, 06:26:43 pm
People are stupid :D

** is power, ^ is eXclusive Or

Not difficult to remember :\
Title: Re: My new toy..
Post by: Sidoh on September 07, 2007, 07:31:38 pm
I always try to use "**" for exponents, I was taught that in school. But that seems to confuse people even more than "^". :-o

I'd never seen that notation until you mentioned it a while ago.  When writing in an environment where superscripts and subscripts aren't trivially available, I've always copied the notation that calculators use, which is ^.  TeX uses ^ to indicate exponents too. :-\

People are stupid :D

** is power, ^ is eXclusive Or

Not difficult to remember :\

Since it's totally arbitrary, "remembering" can't occur when there isn't a standard...
Title: Re: My new toy..
Post by: rabbit on September 07, 2007, 08:26:33 pm
It's totally a standard: http://en.wikipedia.org/wiki/Exponentiation#Exponentiation_in_programming_languages
Title: Re: My new toy..
Post by: Sidoh on September 08, 2007, 02:32:12 am
Its use in a bunch of programming languages doesn't really make it a standard, especially since there are so many other ways that it's done.

Plus, that's in the syntax of the programming language; it doesn't really apply in a situation like this... :-\
Title: Re: My new toy..
Post by: Joe on September 09, 2007, 01:49:48 pm
People are stupid :D

** is power, ^ is eXclusive Or

Not difficult to remember :\

Man, I wish everyone else in my math class knew C.
Title: Re: My new toy..
Post by: iago on September 09, 2007, 06:59:28 pm
Let's just all start using Math.pow(x, y) for exponents. That should solve everything.
Title: Re: My new toy..
Post by: Sidoh on September 09, 2007, 07:03:57 pm
Let's just all start using Math.pow(x, y) for exponents. That should solve everything.

Haha, agreed!
Title: Re: My new toy..
Post by: Joe on September 09, 2007, 09:33:52 pm
Man, I wish everyone else in my math class knew Java.

Fixed.
Title: Re: My new toy..
Post by: iago on September 09, 2007, 09:39:37 pm
Man, I wish everyone else in my math class knew Java.

Fixed.

Huh?

Incidentally, it would be even more complicated if they only knew C, because in addition to having to type pow(x, y), you'd have to find a way to link in the math library (-libm) when they, err, compile your text?
Title: Re: My new toy..
Post by: Joe on September 10, 2007, 02:40:07 am
I was saying that using Math.pow is Java-specific, making it even more complicated than C syntax.
Title: Re: My new toy..
Post by: Sidoh on September 10, 2007, 02:51:31 am
I was saying that using Math.pow is Java-specific, making it even more complicated than C syntax.

How does it being Java syntax make it more complicated than C? :S
Title: Re: My new toy..
Post by: Joe on September 10, 2007, 10:18:24 am
I was saying that using Math.pow is Java-specific, making it even more complicated than C syntax.

How does it being Java syntax make it more complicated than C? :S

Math is a class. ^ and ** are operators. Math is language specific, whereas ^ and ** are part of the syntax, and can be taken to any most programming languages.
Title: Re: My new toy..
Post by: Sidoh on September 10, 2007, 12:06:12 pm
Math is a class. ^ and ** are operators. Math is language specific, whereas ^ and ** are part of the syntax, and can be taken to any most programming languages.

Yes, I know, but Math being Java-specific doesn't make the syntax any more complicated.

If you start throwing ** around in C, I'm pretty sure you're not going to get the desired results. :P
Title: Re: My new toy..
Post by: Joe on September 10, 2007, 12:47:35 pm
Math is a class. ^ and ** are operators. Math is language specific, whereas ^ and ** are part of the syntax, and can be taken to any most programming languages.

Yes, I know, but Math being Java-specific doesn't make the syntax any more complicated.

Let my bad joke die, okay? :P