flat assembler
Message board for the users of flat assembler.

Index > OS Construction > tss index

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 27 Oct 2007, 01:40
is there any need to have a tble with all tss pointers that are in memory or just handling them from gdt?

how to make a periodic task change
it needs to switch at the speed of ( ntask*fps ) per second
fps will be set to 24 image / second
it is the cinema seting and seems to be a good choise even if a system can have fps of 100 or more
Post 27 Oct 2007, 01:40
View user's profile Send private message Visit poster's website Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 27 Oct 2007, 08:07
Quote:
is there any need to have a tble with all tss pointers that are in memory or just handling them from gdt?

By the "TSS pointers" do you mean the 104 bytes forming the TSS? Of course you need them. What you have in the GDT is just the TSS descriptor, which of course should point to a valid TSS structure. And if you'll implement hardware task switching (which most people don't) you will most probably have to dynamically set a new TSS up for every task.

Quote:
how to make a periodic task change

You should find all that information in the Intel manuals. As far as I remember far jump, call and iretd all cause task switches. For a periodic switch you just use a timer like the PIT.

Quote:

it needs to switch at the speed of ( ntask*fps ) per second
fps will be set to 24 image / second
it is the cinema seting and seems to be a good choise even if a system can have fps of 100 or more

So you want to have one task per video frame? I'm not sure it's the best design.
Post 27 Oct 2007, 08:07
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 27 Oct 2007, 08:35
Don't use TSS for task switching, as it often is with the Intel CPU, the simple and hardware-assisted way to do things is (much) slower than doing it manually. Also, it's been removed in 64bit long mode.

And what the hell does task-switching have to do with frames per second? O_o
Post 27 Oct 2007, 08:35
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 27 Oct 2007, 11:36
if there are 10 tasks:
10*24=120 task switch/s

each task need to have access the images
and this screen buffer is refreshed 24 times per s

every task can then modify the screen every 24th of second

no??

task switch without TSS?
ok
i'll see this in more details

you say it's faster than the intel task switch?
if it's true i will not waste my time by learning this shitty TSS management, for me it's not a simple hardware assisted way, it's a super complex thing with spaghettis
Wink
Post 27 Oct 2007, 11:36
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 27 Oct 2007, 11:58
Well, you need to set up a single TSS, but after that you shouldn't rely on it for task switching, do register swapping yourself.

What exactly are you trying to do anyway, it sounds like some extremely bad design...
Post 27 Oct 2007, 11:58
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 27 Oct 2007, 12:02
you just have to wait now

in some weeks i will post a disk image with a basic os!
Post 27 Oct 2007, 12:02
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 15 Nov 2007, 01:05
forget the idea of 24 fps
if a program need to show 24 images / seconds, then it's to the program to give the timing passing by timer

but to speak about TSS, i just say this:
a task switch occurs when a task is called, jumped to or task gated
so a good X86 based OS need to manage the BAD hardware task switch!

but the switch time is a problem
and for the earlier µP it's more complicated because the number of reg to save is hudge, general registers, segments registers, MMX/FPU registers, XMM registers and all these new registers added in the x86-32 µP

and this task switch needs to be register set sensitive, if an application don't use the FPU or SSE , no need to save them

the IOPL bitmap, where is it exacttly located? in TSS segment or in linear memory?
this is full of questions!
Post 15 Nov 2007, 01:05
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.