You are not logged in.


#1 2005-05-03 11:53:13

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Hardware or Software task/process/thread switching

I'm nearly completed my memory manager and am considering to the two options of Hardware or Software mutitasking. Before I hit the big boards, I figured I'd poke you'all first and get your reactions. What are the pros and cons of each implementation? Thanks!


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#2 2005-05-03 12:31:43

bubach
Administrator
From: Trollhättan, Sweden
Registered: 2005-02-15
Posts: 367
PM  Website

Re: Hardware or Software task/process/thread switching

Most people used software multitasking becasue it was faster. Nowdays it's not an issue and more people use hardware becasue it's easier(?).
The thing is that if you want to go 64-bit (if you use C you could support it "easily"), hardware taskswitching is removed since most big OS's didn't use it. Thats kind of funny. Now that the hardware taskswitching if finally starting to get used it's removed.. wink

http://www.mega-tokyo.com/osfaq2/ wrote:

Long mode does not support hardware task switching or virtual 8086 tasks, and most of the segment register details are ignored (a flat memory model is required). In long mode CS determines if the code currently running is 64 bit code or 32 bit code.

HTH

/ Christoffer

Offline

 

#3 2005-05-03 14:30:44

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: Hardware or Software task/process/thread switching

What are your thoughts on predictability of speed? Would it be easier to predict Hardware or Software? What sparks my question is what if you have a specific task that needs time slices right now, this moment, but isn't too critical, you could predict an ample amount of time for it to run based on its size and code fragment. This leads into, why; there are certain measurments I wish to conduct that I don't wish to loose at all, I want to collect them all. A certain time hack is needed in order to make certain every measurement is received...I know this runs the gambit of RTOS, but I want to be able to use multitasking for less critical tasks, but where measurements are concerned, I want to ensure it gets a time slice before loosing the data.

As for long mode, I haven't read anything concrete about 64-bit, but expect this is the AMD implementation? Since the hardware market is heading in that direction, your point is well taken that I should consider the future path as well. It may be that I'm stuck in 32-bits until a hardware implementation is defined in the future...<OhNo!>

Thanks for your input!

Last edited by smiddy (2005-05-03 14:32:24)


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#4 2005-05-03 14:47:42

bubach
Administrator
From: Trollhättan, Sweden
Registered: 2005-02-15
Posts: 367
PM  Website

Re: Hardware or Software task/process/thread switching

I don't know much about it. Haven't gone to deep into that, no need to in BOS. I would suspect that software multitasking is best either way.
Maybe someone else have something to say about it?

And yeah, I was talking about AMD64. Though I think that Intel has released a compatible 64-bit processor called EM64T.. ? Don't know how AMD compatible it is, but it's supposed to be backwards compatible with 16/32 bits.
IA64 on the other hand is a "clean" 64-bit processor from intel without any support for 32-bit.

/ Christoffer

Offline

 

#5 2005-05-03 17:22:51

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: Hardware or Software task/process/thread switching

bubach wrote:

I don't know much about it. Haven't gone to deep into that, no need to in BOS. I would suspect that software multitasking is best either way.

That would make the code more portable I suspect so that worrying about which processor to implement on or implementing code fragments for each processor within one OS.

It also means, as I've read so far, that I would need to implement mode code in order to do multitasking, which also gives me direct control over the OS, I suppose.

I'll see what I can dig up on IA64 implemetation and see what the particulars are there with regard to multitasking.

I am real interested in the Hyper-Threading which I think is hardware specific, though would limit my OS work to those processors. I need to research that more too. <fun>

Thanks for your thoughts!


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

#6 2005-05-03 22:07:04

DennisCGc
Member
From: Zoetermeer, The Netherlands
Registered: 2005-03-01
Posts: 49
PM  Website

Re: Hardware or Software task/process/thread switching

Hi,

I think there are two things mixed up. First theAMD-64 (which indeed does NOT support hardware multitasking) and the IA-64, which is a total different beast (different ASM, etc).

Now, I'm going to do software multitasking, because I (as you said before) have total control of the multitasking thing.

It also means, as I've read so far, that I would need to implement mode code in order to do multitasking,

Entirely correct ;-)

I am real interested in the Hyper-Threading which I think is hardware specific

More CPU specific ;-).
You can google around for it. I thought (I'm NOT sure) it was like SMP. HT could be interesting, but I don't want to implement it because I simply don't have a P4 HT smile

HTH, DennisCGc.

Offline

 

#7 2005-05-03 23:30:18

smiddy
Active member
Registered: 2005-02-15
Posts: 183
PM

Re: Hardware or Software task/process/thread switching

Thanks Dennis!

Yeah, I know that IA64 and AMD64 are different entirely. I'm at odds with deciding on the future though of my OS which I am leaning towards AMD64. However, I do have a P4-Extreme in my wife's laptop which I can play with HT. I don't expect to get an AMD64 anytime soon. I'm about to move across country and while my home is in upheaval I won't have much time to code...not that I do now either. So for the most part I'm reading the majority of what I can in order to understand where I might be heading.

When I get the opportunity I'll give your site (and code) a look see and give you areport on how it works my machines.


- [color=red]s[/color][color=blue]m[/color][color=red]i[/color][color=blue]d[/color][color=red]d[/color][color=blue]y[/color]

Offline

 

 

Board footer

Powered by PunBB
BOS homepage © Copyright 2005 Christoffer Bubach
Strict XHTML and valid CSS.