News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Multitasking in x86-64 systems

Started by woonsan, September 19, 2008, 10:00:00 PM

Previous topic - Next topic

woonsan

I want to multitask in the x86-64 systems. But, I have no idea about this.
If in the x86-32 systems, I can use 32-bit TSS to provide hardware task switching. However, there is no method to switch the task in x86-64 systems.
Of course, I can use software task switching method but it might be too slow.

Are there any other methods to switch tasks fastly in x86-64 systems?

hutch--

Stephanos,

The details will vary from OS to OS but the hardware fundamentals are issues of threading and thread priority. These are directly supported hardware capacities but you will need to know how the OS you use does these things. Task switching without threading is an architecture from the 286 days and it was superceded by multithreading from the 386 upwards.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

woonsan

Quote from: hutch-- on September 20, 2008, 12:06:44 AM
Stephanos,

The details will vary from OS to OS but the hardware fundamentals are issues of threading and thread priority. These are directly supported hardware capacities but you will need to know how the OS you use does these things. Task switching without threading is an architecture from the 286 days and it was superceded by multithreading from the 386 upwards.

Thank you for replying my question. But, I am not sure that I understood your reply exactly.
What I want to know is the fastest way to switch tasks in x86-64 systems. In the Intel 64 IA-32 Architectures Software Developer's Manual, it says that hardware task switching is no more supported in x86-64 architecture. Of course, there is a 64-bit TSS but, jumping to the 64-bit TSS Descriptor is invalid in x86-64.
Currently, I made the task switching in x86-64 with software task switching method.
I just want to know any other faster ways that can be used in x86-64 systems (Like some tricky ways,).

japheth


Hi,

task switching by task gates on the 80386 ("hardware task switching") wasn't used that much because usually it was faster to do the switch manually. So I guess that they simply removed this feature for 64bit.

PS: please forgive the admin! He usually replies without bothering to  read the question.  :toothy

woonsan

Hmm. If so, I will keep this method to multitask in x86-64 systems.
I thought that it would make more overhead than hardware ts. Basically, it must be so.
But, I could think that the hardware ts would have more complexity and overheads than software ts in a big system.
Thank you for letting me know the fact. :D

hutch--

 :bg

> PS: please forgive the admin! He usually replies without bothering to  read the question.

You would think this guy was writing an assembler.

Quote
task switching by task gates on the 80386 ("hardware task switching") wasn't used that much because usually it was faster to do the switch manually. So I guess that they simply removed this feature for 64bit.

Which leaves hardware based multi-threading introduced in the i386 processor.  :green
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

woonsan

> You would think this guy was writing an assembler.
I am just writing an O.S. for x86-64 systems.
Recently, I studied the x86-64 architecture and I just want to write a simple O.S. on the arch. :D

Mark Jones

Your attempts are commendable Stephanos.

I believe the comment "You would think this guy was writing an assembler"  was directed towards Japeth, who is actually writing an assembler. :bg
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

woonsan

Quote from: Mark Jones on September 20, 2008, 09:30:06 PM
Your attempts are commendable Stephanos.

I believe the comment "You would think this guy was writing an assembler"  was directed towards Japeth, who is actually writing an assembler. :bg

Sorry, that might be because of my bad English --  :(

hutch--

 :bg

> Sorry, that might be because of my bad English --

Your English is better than my Greek but I can still read your signature in greek.

There are guys in this forum if they are not busy who have worked on their own OS so they may be able to help you as well.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

woonsan

What a good message  :bg
Is there anyone who is interested in Virtualisation with Intel VT?
I have just tried to run a basic virtual machine with Intel VT. It worked but, I cannot make it more complex.

MazeGen

Quote from: Stephanos on September 21, 2008, 08:14:33 PM
Is there anyone who is interested in Virtualisation with Intel VT?
I have just tried to run a basic virtual machine with Intel VT. It worked but, I cannot make it more complex.

Hi, few guys at http://board.flatassembler.net work with this technology, namely vid, HyperVista, and Feryno. Try to ask there (you need to register first).

You can find there also quite active OS dev subforum.

woonsan

MazeGen,
Thank you very much for serving me the information.
I did not know that there is another forum for x86 assembly as big as that.