Computing.Net > Forums > General Hardware > Intel Pentium string intructions

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Intel Pentium string intructions

Reply to Message Icon

Name: soothsayer
Date: February 13, 2005 at 11:19:34 Pacific
OS: Mandrake 10
CPU/Ram: 512
Comment:

Hi, i got the following question and need
some help.

" Many computer architecture have string
instructions which can operate on strings
of considerable length and may take a
relatively long time to execute. It would
be UNSAFE to hold up all interrupts during
the execution of these instructions, yet
the general rule that tends to be followed
wherever possible is that interrupts are
permitted only between instructions, not in
the middle. What Intel Pentium has done to
solve this problem?"

This is a question in my class, any i have
no idea what the problem is. And why
holding up all interrupts would be unsafe ?

Any suggestions ?



Sponsored Link
Ads by Google

Response Number 1
Name: jboy
Date: February 13, 2005 at 11:24:03 Pacific
Reply:

Read the textbook?

I'm not insensitive, I just don't care.


0

Response Number 2
Name: soothsayer
Date: February 13, 2005 at 11:48:20 Pacific
Reply:

If i could find it in any text book, i
wouldn't need to ask.


0

Response Number 3
Name: ...
Date: February 13, 2005 at 13:24:08 Pacific
Reply:

just guessing, since it's been like 2 or 3 years since college...but maybe even a wrong guess might get you thinking...*shrugs* lol

anyway, i think holding all of the interrupts would be bad, since the instructions would take considerable time to execute (imagine a printer or some other device trying to signal for attention, or maybe another program running in the background had to abort)

in college, we had to study the pentium, and design our own computers (adding new instructions, etc.) I somewhat remember how the pentium executes several instructions at the same time (it's like an assembly line, where in the 1st position, an instruction is being read, etc). If I remember correctly, when an interrupt would occur, the cpu would be reset so that it can start interpreting the interrupt. This isn't a problem, since the cpu keeps track of what instruction it was on (the pc counter or something...keeps track of the address). Thus, once the interrupt has been handled, it can go back from the last instruction it was working on.


0

Response Number 4
Name: Galileo
Date: February 13, 2005 at 15:22:00 Pacific
Reply:

Well, I have no idea how old that text book is. Nor do I know if my answer i'm gonna give is relevent to your quetion, But what I do know is that intel's relatively new Hyper Threading Technology allows a CPU to exucute two instructions in parallel with out disturbing one another. So, one physical processor is really two logical processors, its really cool. I have a P4 with HT and in Windows task manager I have two graphs one for each porcessor, I dont really have two CPUs, but my OS cant tell the differance between HT tech and a duel CPU plat-form. I multitask often and intels HT tech makes running two programs seem as if I was running them on two sepreate computers. I dont know if this is even close to what your talking about, but hey, if you dont know, now you do.


0

Response Number 5
Name: ham30
Date: February 13, 2005 at 18:58:47 Pacific
Reply:

String instructions are a function of a high level language. There is no such thing as a string instruction as far as the CPU is concerned.


0

Related Posts

See More



Response Number 6
Name: anonproxy
Date: February 13, 2005 at 19:23:42 Pacific
Reply:

"...What Intel Pentium has done to
solve this problem?"

Basically, in out-of-order execution you also have a reorder buffer. The question doesn't tell you explicitly that the Pentium is OOE pipelined, but you better know that.

An interrupt obviously stops the CPU's execution to handle another routine. While this is being done, the CPU state has to be saved. Remember, software expects the CPU to return results in the order they were sent.

So, we have a specific problem when the CPU is tied for a short time. We have interrupts piling up in a buffer somewhere. Okay, why can't they wait? Some are precise interrupts - precise because to be completed they require a precise state of the CPU. Others are just errors, exceptions, kill signals, etc.

What are we talking about with CPU state? Basically the state of the CPU's instruction queue is in a sequential order (relative to the program counter) and there is no mixing of executed and pending instructions. In other words, the order in which instructions were recieved is correlated to the order in which they have been processed. If we don't have this clean distinction, we will have problems finding where that interrupt should be put in the execution stream.

If the CPU does have a clean order of instructions, then either the CPU knows how to go back and calculate where the buffered interrupt belongs in the chain of instructions or we get undefined behavior (which is always unsafe).

Okay, so why can't these precise interrupts wait? Well, to the software the CPU executes instructions in order. In reality, it's picking and choosing (OOE). This is good, because it is generally more efficient. But, it complicates precise interrupt handling. The internal state of the CPU is not consistent with the order of instructions and hence the demands of precise interrupts.

So, we use a reorder buffer. This buffer holds instructions and ensures the appropriate order of execution. The buffer logic is designed to allow CPU instructions to be executed in efficient order, but retains the sequence of in-order results. The CPU does its work while the buffer holds the necessary state information (the instruction stream order). Instructions are essentually inputted, sorted, and reordered.



0

Response Number 7
Name: anonproxy
Date: February 13, 2005 at 19:38:32 Pacific
Reply:

Not to hog the posting space, but string instructions refer to calculations on words (byte sequences). These are, of course, binary strings and the appropriate CPU instructions operate on them in blocks.

String = continugous bytes
(maximum size usually corresponds to maximum address space of an architecture; 32bit = 2^32 for example)

Bit String = contiguous bits
(same max size limit)

Also, the question is not talking about threading, but instruction level sorting. This also is not about parallelism (though the Pentium does that as well). Finally, the program counter only keeps one address, but delayed interrupts often require the state of an instruction stream (because they must be matched to the state at which they were recieved).


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to General Hardware Forum Home


Sponsored links

Ads by Google


Results for: Intel Pentium string intructions

Amd Athlon Vs. Intel Pentium 4 www.computing.net/answers/hardware/amd-athlon-vs-intel-pentium-4/38695.html

Gericom WEBBOY 14.1 - Intel Pentium www.computing.net/answers/hardware/gericom-webboy-141-intel-pentium/44650.html

No Startup... Blankscreen www.computing.net/answers/hardware/no-startup-blankscreen/48470.html