topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 25, 2025, 7:08 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 314 315 316 317 318 [319] 320 321 322 323 324 ... 364next
7951
Developer's Corner / Re: Real-time OS drivers and their scheduling
« Last post by f0dder on November 11, 2006, 11:40 AM »
In NT, a process is basically a container which holds one or more threads, various objects the process uses (files, sockets, pipes, mutexes, ...), the process memory map and some other stuff.

A thread is register set, as well as a stack, an structured exception chain, and a few other things. (Hm, I guess I should look up whether the thread register set includes CR3 (page table pointer), or if that's taken from the process block).

Each process has a process info block, and each thread has a thread info block.

So the scheduler only schedules threads, since that's the only schedulable entity in the system. It does take various factors into consideration though, and the scheduler isn't only driver by the timer interrupt. If scheduling a thread within the same process, it's about as simple as updating registers, but when the thread lives in a another process, the pagetables etc. has to be updated as well. It's a bit more complicated than this though, especially because of multi-CPU systems.

Servicing an IRQ will allways go to kernelmode, and so will subsequent processing, so you'll always have ring transition overhead (unless the IRQ happens in the context of thread that was already in kernelmode - NT is pretty much fully pre-emptible). But this doesn't involve updating the page table, since no *process* switch needs to be done.

Usermode processes(!) are isolated against eachother, and the kernel is isolated from usermode processes as well. You can't say that *threads* are isolated against eachother, since isolation happens on a process boundary.

Btw, linux supports dynamic load/unload of drivers (or "kernel modules" as they call them) as well, and I'm pretty sure that other OSes do as well - I'd be very surprised if anything with a microkernel design doesn't, actually.
7952
Developer's Corner / Re: Real-time OS drivers and their scheduling
« Last post by f0dder on November 11, 2006, 08:07 AM »
Well, purge 9x from your mind - it's ancient and outdated, and is basically a DOS extender on steroids, with large parts of it carried directly from 16bit win3.x, large mutex-protected non-preemptible sections etc. (And yes, 32bit apps on 9x still end up using large 16bit portions; try tracing any GDI call with a kernelmode debugger if you don't believe me :) ).

9x VXD driver model is pretty different from the NT driver model, whereas the "WDM" driver model is mostly some PnP and power-saving additions to the original NT model as far as I can tell.

NT kernel design isn't to farr off your description of a RTOS design - a fundamental difference, though, is that NT doesn't make any hard guarantees. But there's IRQLs (which determines which interrupts are allowed to be serviced, as well as which level of kernel calls that are safe), completion routines, etc.

I've never seen any mention of "real time NT", and afaik even for NT4 it was called "NT embedded" - but I could be wrong. other people have experimented with realtime NT, though, and there's at least one company that have realtime addons for NT.

Now as for scheduling... the NT scheduler schedules threads. Not "processes" or "drivers", but threads - although obviously it does deal with some process data, since thread priority is a mix of base process priority and thread priority, the process owning the current foreground window gets a slight boost, etc.

Generally the scheduler will not scheduler a lower-priority thread if there are higher-priority threads on the ready queue, but do consult "Inside Windows"/"Windows Internals" - it's a pretty good read.

Lots of stuff is pageable in the NT kernel by default, which IMHO is a bad idea - with the amount of RAM machines have had for the last many years, keeping base kernel + drivers locked is a good idea performance-wise. Even back when I had less RAM, "DisablePagingExecutive=1" meant that my system "recovered" faster after quitting some intensive game.

There are kernel-mode threads as well as user-mode threads, for example the "lazy dirty-page writer" and "zero-page provider" are kernel-mode threads.

Iirc an interrupt happens in the context of whatever active thread - which means that often a r3->r0->r3 context switch is needed, while a full register/state preservation and CR3 reloading isn't. This also means that at that IRQL, you can make very few assumptions on which operations are safe to perform.

What I meant about the NT scheduler being "all over the kernel" is based on things like threads blocking on a resource. Instead of having a centralized scheduler that continously checks events to see if they've been triggered and then wake up threads, basically each operation that can cause a thread to unblock will set off the notification itself.
7953
I know NT isn't real-time, but 50ms for an IRQ to be handled sounds ludicruous. And AFAIK, data processing isn't done directly in the IRQ handler, instead some state information is saved and passed down as an IRP, and the IRQ handler itself finishes quickly. Iirc linux does somewhat the same by having "high" and "low" parts of their IRQ handlers.

Hadn't heard about real-time NT, are you sure you're not thinking of NT embedded? Just because something is embedded doesn't mean it has to be hard realtime :)

Iirc there's also just one scheduler in the whole of NT, used for both usermode and kernelmode stuff - although there's a distinction between usermode and kernelmode threads. The "scheduler" also isn't a separate modular part, it's interweaved in most of the NT kernel because of it's particular design.

As for priority levels, there's 32 of them, with one being REALTIME. While that priority isn't strictly "realtime" by computer science terms, it's good enought that you can lock up a single-cpu system if you don't manually relinquish control...

Btw., might be a good idea for a moderator to cut off these last few posts into a separat thread so as to not pollute the rest of the thread :)
7954
Hrm, are "mS" referring to mili- or microseconds?

Your above post on scheduling etc. doesn't really sound like the Windows NT I'm familiar with, and described in "Inside Windows 2000" (think it's been renamed to "Windows Internals" for the XP+ version).
7955
superticker: I'd say that hardware has a good deal to do with it, once we deal with stuff more advanced that dumb raw audio playback (and even there, issues like IRQ/DMA effiency and DMA buffer sizes might say a tiny bit, on older hardware anyway).

But once you start taking audio mixing, effects etc. into account, there's bound to be some difference between (simplistic) onboard audio and a "real" board - how much is done in hardware, how much is done in (possibly CPU-expensive?) driver software, etc...
7956
General Software Discussion / Re: Best free firewall for Windows?
« Last post by f0dder on November 09, 2006, 05:14 PM »
Once you've got malware on your system, it's too late anyway.

This is not entirely true *if* you run as a non-admin user.  In that case you can unknowingly and inadvertantly download malware, and it will usually be unable to get itself installed or reconfigure your system (such as punching through firewalls).

Well, then you don't really have it "on the system". Sure, it's sitting there as a dumb binary file, but if it can't activate...  :harhar:
7957
Living Room / Re: does having many program windows open slow the sysem?
« Last post by f0dder on November 09, 2006, 07:22 AM »
Yeah, many apps seem to reduce memory usage when minimized - dunno if it's some internal logic or if it's just windows itself trimming the working set.

Other than that, I've only noticed speedup/slowdown when dealing with bad-mannered apps... Iirc Acrobat Reader can have pretty slow repaints and such.
7958
General Software Discussion / Re: Best free firewall for Windows?
« Last post by f0dder on November 09, 2006, 04:25 AM »
Some thoughts:
a) ISTR XP's firewall doesn't stop outbound baddies.

Once you've got malware on your system, it's too late anyway. The only use outbound protection is, at the software firewall level, is to stop "regular" apps from phoning home. And if so inclined, it wouldn't be too hard for an app to target various popular products and punch holes through them, or use covert channels.
7959
General Software Discussion / Re: Windows Vista goes gold
« Last post by f0dder on November 09, 2006, 04:21 AM »
will be interesting to see how it shapes up.
...or falls apart, as I hope.
7960
Living Room / Re: 1 Sheet of Paper
« Last post by f0dder on November 08, 2006, 05:19 PM »
Wow :)
7961
Site/Forum Features / Re: Should we add a ratings/vote mod to the forum?
« Last post by f0dder on November 08, 2006, 04:48 PM »
I dunno about this - it's usually a bit sucky when added to a forum that has existed for a while. Who's going to go through all the old threads and rate them? This means that possibly superior threads might show up at the bottom of search results, just because newer threads have been rated while the old ones haven't.

Fortunately some of the other problem (read: forum whoreism) that thread rating (or even worse: karma system) can give probably won't happen on DonationCoder, because it's such a unique place. But still: think this through.
7962
And they should NOT combine anything with Process Explorer - would make it too big & bloated.
7963
Living Room / Re: how wide can you stretch the width of your windows?
« Last post by f0dder on November 08, 2006, 09:04 AM »
Even if using a tool like WinScraper, resizing is clipped to total monitor(s) width :(
7964
Too bad they're not porting over the sysinternals source code section, as well as some of the "smaller" apps, to the new MS home. Knew there'd be a catch.
7965
General Software Discussion / Re: Best free firewall for Windows?
« Last post by f0dder on November 07, 2006, 05:08 PM »
Edvard: I think that hackbusters URL needs some fixing, as it looks pretty much like a DNS-squatter to me. You probably meant http://www.hackbusters.net/ ? The story sounds like a bunch of FUD anyway.

Now, I don't know just how bad the windows firewall is. Sure, locally, given admin rights, you can punch holes through it (duh, same can be done as root on *u*x). And of course there's probably some privilege escalation bugs around in both *u*x and XP. The interesting part is if there's any remote holes in the windows firewall. If there isn't, it should be perfectly fine for protecting your box against worm attacks.
7966
General Software Discussion / Re: Best free firewall for Windows?
« Last post by f0dder on November 07, 2006, 09:47 AM »
I do exactly the same.  Personally speaking, I have never used a software firewall that wasn't more of a nuisance for me than anything else.  My computer habits are good enough where a good antivirus program and a few spyware programs is good enough for me.  I don't know if my computer is vulnerable to attacks or anything, I hope not.
Well, if you use Windows Firewall, that should hopefully protect you against worms etc. - which, with a decent NAT router setup, would only happen if somebody on your LAN got infected. Dunno if there's any remote exploits for the windows firewall, oh well :)
7967
General Software Discussion / Re: Best free firewall for Windows?
« Last post by f0dder on November 07, 2006, 09:18 AM »
If you plan on using IRC, forget Norton, it will block you from IRC for no good reason whenever it pleases.
And IIRC (grin) it was also Norton that would BSOD if anybody on IRC wrote some special command (from a list of commands that Norton was monitoring because they were used by zombie bots).

Personally I've stopped using software firewalls; I depend on my NAT'ing router to keep incoming traffic away, and Kaspersky to keep malware from running. Of course I can't detect "phone home" in regular software that way, but oh well.
7968
lanux128: no, no, just praising subversion (and subverting the thread? :P). I haven't tried it with essentially binary files like .doc, but it's awesome for text files like source code...
7969
TNT2? Wow, that's ancient :) - I think I had a Riva TNT2 around the time when Quake3 was released, or perhaps the demo of it.
7970
superticker: remember that digital output is supported; I doubt that you'd get much surround sound without digital out anyway? The amount of noise on analog out is still interesting though, for hooking up headphones without a long cable going next room to the amp :)

For the Realtek chips, the EAX stuff is very likely solved in driver software, since it seems to be a pretty dumb chip. Would be nice knowing if the intel HD audio supports EAX, how well it supports it, and if it's done in hardware or software.

My next system will most likely be core2duo based, with intel HD audio - and it would be nice knowing if I can scrap my Audigy card and use onboard, or if I'll just do as usual and disable onboard audio.
7971
I have owned a full-length gravis ultrasound (max? can't remember) - not when it was new and fancy, though. Biggest ISA card I've ever seen. Was a pretty damn cool card, in comparison the SB16 sounds pretty bleep-blop :)

7972
Living Room / Re: Mobo dying .... suggestions please on upgrading my system ...
« Last post by f0dder on November 06, 2006, 05:17 PM »
Also keep in mind that, even though it added DDR2 support etc., initial reports on socket AM2 was that it was slightly *slower* when running with a CPU at the same clockspeed - dunno if they fixed that problem now, but it was a bit embarassing.

Core2Duo might seem a bit pricey, but it is pretty kickass, and ~35W lower power consumption than a similar AMD64x2.

The machine you've picked will probably suit you fine (even if you should consider dualcore a bit more :)), but you won't be upgrading it - by the time you might want to add a SLI card, a card identical to the one you bought might be hard to find. Same goes for CPU, and DDR prices may very well rise above DDR2 prices soon.

But you're probably not going to need/want an upgrade for the next "x" years anyway - and there's no telling if both intel and AMD have moved to new sockets and DDR3 by then anyway. In my experience, buying for upgradability only works if you upgrade every few months...

Btw, no reason for SLI just to run dual monitors, get a graphics card with two (DVI) outputs. Works like a charm.
7973
Shaders require... ho humm... Friend of mine says GeForce3, although it wasn't with Shader Model 2.0 until it got really useful - probably around GeForce5/Radeon9x00 or so. Can't really remember, never did shader coding, but it was added "fairly long ago", in the graphics card scene sense of "fairly long ago" anyway :)
7974
Yes, if you're a bit of an audiophile or a gamer, a separate card is always better. With the onboard sound chips you're playing the Russian roulette, you can have good results or you can end with a terrible sound as it happened to a couple of friends.

Are you sure that goes for an audiophile with Intel HD audio? I've only read the specs, but those do seem pretty good (8 channels at 192KHz/32bit, Dolby Pro Logic IIx...). Might not have super EAX support for the gamerz, but (at least on paper  :-\ ) it seems decent enough.
7975
Living Room / Re: Mobo dying .... suggestions please on upgrading my system ...
« Last post by f0dder on November 06, 2006, 08:36 AM »
I am still wondering whether to ring up and go for the X2 processor - but can I really justify nearly £100 extra - probably not.
Well, it depends. Even if you only use single-threaded applications, you should notice a general improvement in system performance/responsitivity when the system is under load. If you use applications that support threading, then you might get some really nice speedups here and there; I think some photoshop filters support threading? Many 3D rendering programs do. And with recent versions, WinRAR added threading support for compression, giving a decent speed boost.

But whether you can justify it depends on how much pressure and pain you put your computer under, and how often :)
Pages: prev1 ... 314 315 316 317 318 [319] 320 321 322 323 324 ... 364next