Inside the Windows Vista Kernel 298
Reader trparky recommends an article on Technet (which, be warned, is rather chaotically formatted). Mark Russinovich, whose company Winternals Software was recently bought by Microsoft, has published the first of a series of articles on what's new in the Vista kernel. Russinovich writes: "In this issue, I'll look at changes in the areas of processes and threads, and in I/O. Future installments will cover memory management, startup and shutdown, reliability and recovery, and security. The scope of this article comprises changes to the Windows Vista kernel only, specifically Ntoskrnl.exe and its closely associated components. Please remember that there are many other significant changes in Windows Vista that fall outside the kernel proper and therefore won't be covered."
Soft links? (Score:4, Interesting)
Re: (Score:2)
Re: (Score:3, Informative)
Re:Soft links? (Score:4, Informative)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re:Soft links? (Score:5, Informative)
Re:Soft links? (Score:4, Informative)
From wiki:
Soft Link [wikipedia.org] and Hard Link [wikipedia.org]
Re:Soft links? (Score:5, Funny)
Re: (Score:2)
Re: (Score:2)
"A symbolic link (also known as a soft link) may point to an existing file or to a nonexistent one; the latter case is known as a dangling link."
Re: (Score:2)
On the "symbolic file links finally arrives to Windows Vista.."
Has it really arrived? really? Considering only Administrators have access to creating them by default?
Re: (Score:3, Insightful)
The usage is established, but "symlink" or "symbolic link" are far more common:
Wikipedia: Wikipedia article [wikipedia.org] (redirects to "Symbolic link" article)
Google hits: ~1M hits for ("symbolic link" OR "symlink") unix [google.com] vs. ~419K hits for ("soft link" OR "softlink") unix [google.com] ("unix" appended to avoid potentially irrelevant matches)
Ocurrences in manpages (my Gentoo Linux system):
$ find /usr/share/man -type f -name '*.gz' | xargs zcat | grep -i "soft link" | wc -l /usr/share/man -type f -name '*.gz' | xa
27
$ find
Re: (Score:2)
Re: (Score:2)
Finally... (Score:4, Insightful)
Re:Finally... (Score:5, Informative)
Re:Finally... (Score:5, Informative)
Oh, the horrors! I've had this happen to me many times, as well, especially on Linux. Not even a kill -9 would get rid of the wedged process. Why is there even such a thing as "non-interruptible sleep"? If I don't need the process anymore, I should be able to get rid of it no matter what.
And wedged drivers, too. I think you can still see this for yourself by doing I/O with some USB device, and then yanking it out while the I/O is in progress. You get at least one process that you can't kill (I guess the comatose state causes ethical issues), and probably a driver you can't unload (although maybe new kernels allow you to do that). If you're "lucky", you get a whole lot of hardware devices that you can't use anymore, and any program that tries to gets into the dreaded D state.
Re: (Score:2)
I haven't yet read the internals of the linux kernel, but I understand that disk dma requests are a major source of non-interruptible sleep. I imagine it has to do with locking the RAM the disk is going to write to safe f
Re: (Score:2)
Re: (Score:3, Insightful)
Re:Finally... (Score:4, Interesting)
Re:Finally... (Score:5, Informative)
Yes. A round robin scheduler, which runs every task for exactly 2 clock ticks except for foreground tasks which are run for 6 (or is this an XP improvement ?) - assuming there's no interrupts occurring during those ticks, of course - and not paying any attention to whether the task is IO- or CPU-bound. It performs absolutely shitty if you have anything heavy running in the background (say, POV-Ray rendering an image while you try to browse the Net). Praising that to be "O(1) scheduler" is about the same as calling the Goatse picture "art": sure, it may be technically true, but...
What Linux was praised was getting a scheduler that handles 40 priority levels, real-time tasks, and multiple CPUs (500+, in some cases) while retaining both interactivity and high throughput, and doing all this in O(1) time. No version of Windows has ever gotten even close.
Ideas borrowed from QNX. But bulkier (Score:4, Informative)
Much of this new stuff sounds like features of QNX. QNX has a "sporadic scheduler", for when you need things like 10ms of CPU every 100ms. QNX has had I/O cancellation for years. In QNX, you can set a timeout on any system call that blocks. If you set a 35ms timeout on a write, after 36 milliseconds, you'll have control back. Very useful in real-time systems where you're doing something less important, like logging, that should never take very long but, in some trouble condition, might. QNX has had prioritized I/O for years, too.
It all works, too. I've done compiles on QNX while running a real time program on the same machine, without the real time program missing a deadline.
Of course, in Vista, it's all more complicated.
Re: (Score:2)
Anyone wanna start a pool for when they'll roll out a patent for symlinks?
They might! But it would be embarrassing for M$ if the judge to hear that Windows as the last OS to get them and that UNIX supplied the concept.
But I am also amazed at how "excited" people are over new-4-Windows features like this. Might as well jump right into Linux/UNIX and get it all now. I will never forget when W98(?) said it would not check the disk on boot if it was previously shutdown nicely. UNIX has this for a decade
Re: (Score:3, Insightful)
The longer operating systems are around for, the more heterogenuous they will become. Although Linux/UNIX might have a bunch of features that Microsoft is getting around to implementing, similar arguments can be made in the other direction as well. The fact of the matter is that computer users as a whole will demand certain things from their operating system
Re: (Score:3, Insightful)
Everytime I read anything about Vista's new features, I hear myself saying "fucking finally" like half a dozen times.
Funny, I think exactly the same thing almost every time I hear about the latest "innovation" in Linux or OS X.
Re: (Score:2)
Re: (Score:2)
Is this the same as... (Score:5, Funny)
Proper care for your Vista "Beast"
1) Feed it plenty of CPU cycles. Preferrably multiple cores.
2) Give it obsene amounts of memory. 2.5G preferable.
3) This one seems to really enjoy Video Ram as wll, probably it tastes better. 256M advised.
4) Keep feeding it a constant supply of disk space. Interestingly enough, this version seems to consume HD space simply with doing nothing.
Thats the basics folks. Give your Vista beast what it needs and you should have a kind of good experience. At least for at least 6 months or so... Then you must slay the beast and re-install..
Re: (Score:3, Interesting)
Re: (Score:2)
Thankfully we have pirates to repair XP and/or post corporate versions of it online. How anyone pays for the wga "experience" is just one of those modern mysteries.
Re: (Score:2)
AMD and NVIDIA are not shipping OpenGL drivers yet. NVIDIA's is very slow and you can not play most games like Enemy Territory (quake3 based). WoW works.
Windows consumes half my ram on startup. I have 2.5GB of ram. Granted I have a NVIDIA 7300 GS w/ turbocache too.
My system is:
Pentium D 805 (dual core 2.6Ghz)
2.5GB PC5300 DDR2
SATA II Hitatchi disk.
Intel DP965LT Motherboard
NVIDIA Geforce 7300 GS 2
Re: (Score:2, Informative)
The NVIDIA drivers suck, but UT2004 and Warhammer 40000 Dawn of War work fine, if slower than in xp/2003. The old Ghost Recon and R6 games work ok too. Di
Re: (Score:2)
Screenshot (Score:5, Funny)
Re:Screenshot (Score:5, Funny)
Re:Screenshot (Score:5, Funny)
Whoa (Score:5, Interesting)
Re:Whoa (Score:5, Funny)
What are still you doing here?
Re: (Score:2, Funny)
Are you kidding? You think that the design staff at Microsoft writes most of the Vista articles posted on Slashdot?
OS classes will always be open OS based (Score:5, Insightful)
For this reason, OS classes in school will be based on Linux,BSD,Minux,or even ReactOS. With all of these, if want to really know how it works, there is the code.
The secret-software-business is quite different that the shared discoveries of the scientific method that works well in education and science.
Historically, the open ones will be the only ones that survive. In 50 years: You want to know how DOS worked in the 1980s? Well, no source is available. But freedos provides a good example of how it worked. You want to know how some random UNIX worked. Well the source to that specific one is not available, but BSD and Linux are a good examples of how it worked. You want to know how Windows-2000 worked? Well, no source code is available, but ReactOS provides a close approximation of how it worked.
Re:OS classes will always be open OS based (Score:5, Informative)
http://www.microsoft.com/resources/sharedsource/L
Re: (Score:2, Interesting)
Re: (Score:3, Informative)
"You may use any information in intangible form that you remember after accessing the software."
http://www.microsoft.com/resources/sharedsource/l
Re: (Score:2)
Re: (Score:3, Interesting)
I disagree. I have not had the dubious pleasure of seeing Windows source code but I have worked with older monolithic closed source kernels such as OpenVMS where at various points I had access. With a good book about the kernel, finding your way around wasn't a major issue. Some items were complex but you could easily extract, for example, material for a course on say lock management, I/O or scheduling.
A prof would want a commercial system to counterpoint something like Linux. However, if I was teaching,
Re: (Score:3, Insightful)
Whereas professors are born knowing Linux, or magical documentation fairies just wave their little wands and give the professor knowledge about the subject.
This might be a wild guess, but a professor teaching OS architecture might already know a thing or two about the OS architecture of the OS implemented by the source he's looking at.
Re:OS classes will always be open OS based (Score:5, Insightful)
Although you're right about closed software, computer science as a whole is actually much more open in many respects than some other scientific fields. In particular, the medical and biological science fields are quite closed-off. Even physics is somewhat closed-off, not by design, but because the equipment required to perform experiments is so expensive.
Few computer science experiments take more than a couple thousand in capital investment. Also, if you have questions, you can often discuss your experiments, ideas, data, findings, etc. with an expert (or even industry leader) simply by signing up to a mailing list or going on IRC.
Re: (Score:2, Insightful)
did mention ReactOS (Score:2)
UNIX - BSD, Linux, Minix
DOS - FreeDOS.
Windows NT/200 - ReactOS.
VMS - FreeVMS
Mach,XNU,OSX - Darwin
Microkernel - Hurd
Multics - SIMTICS
Plan9 - Plan9
BeOS - Haiku
OS/2 - NuDawn ?
Solaris - OpenSolaris
RT-OS - eCos
Inside the Windows Vista Kernel (Score:5, Funny)
"you are in a maze of twisty passages all alike"
sent a shiver up the spine.
Classic Microsoft patchwork (Score:2)
Why would they do this? Just make the default be the deletion of the symlink instead of the target. And why would you need this permission if you already have permission to modify the directory (to create the link) and the permission to read the target? Instead they go and take the ability of normal users (meaning most p
If it's not on by default, it doesn't exist. (Score:2)
They should have added an API call to tell kernel32, "hey, I know how to use symbolic links, so let me use them".
Melissa
Re: (Score:2)
Re: (Score:2)
For security probably. On Unix programmers are (should be) aware of the fact that any file can possibly by a symlink. Especially processes with higher privileges must check if a filename that is passed to them as user input is a symlink to a file that is not normally under control of that user. So introducing this feature and running code that isn't symlink safe introduces a security risk.
Re: (Score:2)
This has got to be the most succinct wording yet of the "confused deputy" problem. There's just no good reason that a process should be running with higher privileges if it has to constantly second-guess itself in order to not actually use them. Monolithic permission levels just suck.
Re: (Score:2)
The problem is when the privledged program generates it's *own* filename that it assummes is going to be a new file or something owned by the user or nobody, but the user has cleverly set a symbolic link at the name he knows the pri
Re: (Score:2)
There are plenty of other ways to fix this,
Process startup changed significantly (Score:4, Interesting)
In previous versions of NT, process creation was quite different from systems such as UNIX. The system call NtCreateProcess creates a "blank" process with nothing in it but ntdll.dll and the new
This changed in Vista for one reason: DRM. Microsoft made it so that certain processes, namely wmplayer.exe and halo2.exe, cannot be a target of the debugger API calls for obvious reasons. It ignores privilege level in blocking the API. If the old method of starting processes were used, then the parent process could start wmplayer.exe with patches to steal the DRM keys or dump decrypted data to disk. Vista's kernel now does the entire initialization for these processes to close this hole.
By the way, Microsoft needs to change that web page so that it doesn't select Spanish over English if you have Spanish listed as an acceptable language in your browser, even if English is higher in the list. This happens for both IE7 and FF2.
Melissa
Re: (Score:2)
Video of MS kernel developer talking about this (Score:4, Interesting)
Melissa
Making Symlinks in GUI? (Score:4, Insightful)
Correct me if I'm wrong, but don't people criticize Linux all the time of a lack of GUI utilities in comparison to Windows? Yet when I drag a file somewhere in KDE, I can just click on "Link Here" and poof, I've got a symlink. Why have I not heard a single complaint about the lack of a user-friendly way to do this in Vista?
Furthermore, you need to have Administrator access (or use Administrator to give yourself the priviledge) to create a symlink, "because not all applications may handle symbolic links correctly". Doesn't this seem broken to anyone? Or at the very least, worrysome?
Re: (Score:2)
That's how it works in OS X and everyone gets on just fine. Symlinks, unlike OS X's aliases, easily break. You don't want normal users creating them and then complaining when suddenly they don't work any more.
Re: (Score:2)
advantages:
symlink - works in both GUI and terminal, works across platforms with linux, bsd, and anything else that supports symlinks
alias - doesn't break as easily
vista symlink - ????? (possibly cross platform)
shortcut - attach command line parameters, keyboard shortcuts
disadvantages:
symlink - breaks easily
alias - doesn't work i
Re: (Score:2)
It's ultimately an application compatibility problem. You don't want some pre-Vista app to blow away the user's stuff because the app recursively deleted a folder that contained a user-created symbolic link. It's fine on Unix OSs because they've h
"not all apps may handle symlinks correctly..." (Score:2)
In Mac OS 9, and in 8, and 7... when did they add aliases (the Mac OS equivalent to symlinks) anyway, I think it was 7... all the standard file routines, including the "open file" and "save file" dialogs, automatically resolved aliases.
A Mac application doesn't need to know anything about aliases to handle them "correctly." It is only a Mac application that needs to open an alias file directly as a file that needs to do some
Re: (Score:2)
Lnks are good enough for users to make links on their Desktops, but are useless for actually getting a program to believe a file is really there.
Re: (Score:2)
The first one is just a shortcut, as is the second one. A link is an entirely different concept.
To put it very simply, a symlink is a special type of file which when referenced calls a linked file. So let's say you symlinked C:/foo to D:/bar; if you then opened C:/foo, you'd get the contents of D:/bar. They're called "symbolic" links because they're just that; they do not point to data directly, merely represent it, so if you delete the symlink the original file is unaffected. Hard links, on the other ha
Re: (Score:2)
Re: (Score:3, Informative)
Incidentally, now that Linux has the concept of UUID in filesystem structures, one could extend hard links to prefix an inode ID with the owning volume UUID and make cross-mount hard links possible.
e
Is it true? (Score:4, Funny)
; Hah! Take that user!
; Oh nice try but we thought of that!
; Clearly they are trying to steal this.
; Thief! Thief!
; MP3s have no DRM. Refuse to play.
; Block association away from Windows Media Player
; SONY rootkit plugs in here
; Powered up. Now lets get today's authorization.
Closed source (Score:2)
Unfair CPU scheduling (Score:3, Interesting)
Ok, I'm not trying to troll, but the latest CPU scheduling algorithm is just yet another example of how when it comes to Windows, the design is done more by the marketing department than by the engineers. At least we hope the engineers would have raised objections!
I understand their CPU cycle counting is intended to improve fairness between applications, but the proposed scheme will have just the opposite effect. Consider, for example, that interrupts aren't counted against a process' cpu usage. All well and good in theory, but the practical result is that a process which is I/O intensive - that is, one which causes interrupts to occur - will actually run much longer than it would otherwise. So, the problem of one I/O intensive process locking out all of the other applications will only get worse in Vista.
And the interesting thing is that this will actually give a subtle priority boost to multimedia applications, without them having to raise their priority level. IOTW, your multimedia app gets realtime priority whether you asked for it or not.
Well intentioned, yes. But also naive.
Re:MMCSS (Score:5, Informative)
??? This is in Vista
thought for a second that they required admin access to activate MMCSS; but upon a second reading, it looks like they've merely reimplemented nice with some kind of setuid root service.
"nice" as you call it has been in NT since its conception.
He's talking about multimedia specific scheduling related to I/O operations here, you might want to read this whole document a 3rd time, he's not talking about "regular" kernel scheduling of threads/processes, he's talking about scheduling based on I/O needs which is a whole different beast.
Re:MMCSS (Score:5, Insightful)
Unfortunately many programmers seem to misunderstand this. Usually you can give user-interface processes very high priority, even if they are far less important than some of the background processes. Very often user-interface processes consume only limited amounts of processor cycles. When this happens, no matter how high their priority, they will leave plenty of cycles for the other processes.
It doesn't matter if a virus-scanning process gets delayed a few additional seconds, because there's no person waiting for it and getting impatient. It does matter if a web browser or text editor gets delayed, because there is a human waiting for them.
Re:MMCSS (Score:5, Insightful)
Yes, as it should. If the AV activity is a scheduled full system scan, then it can indeed wait those few tenths of seconds extra, as if you're already infected, they won't make any difference. If it's a real time scan on a file you're accessing, then it can definitely wait, as the file won't be opened/executed until the scan has completed anyway.
So what exactly is the problem with giving a multimedia app a higher priority on the processor than your AV software? We're not talking about killing the AV soft, just lowering the priority; it's still running.
they've merely reimplemented nice
You've been able to set process priority through the Task Manager since at least NT4 (the earliest I remember it being available; it may have been in earlier versions too, I just don't remember seeing it personally).
Re:MMCSS (Score:5, Insightful)
Bah! (Score:2)
Re:Bah! (Score:5, Informative)
Re: (Score:2)
ionice [die.net]
> and outbound network queues.
QoS/Differentiated Services [opalsoft.net] + marking with iptables --pid-owner <pid>
As (almost) always under linux, the tools are already there, but simple accessible GUIs are lacking.
Re: (Score:2)
Re: (Score:2)
Looking briefly at the Vista description, it sounds like there might be some milage in trying to implemen
Re: (Score:2)
* I appreciate that this post has nothing to do with Vista's IO scheduling, but it should not be possible for any application to suck up 100% of the
Re:MMCSS (Score:5, Insightful)
There are basically two options here:
1. Antivirus hooks into the OS, and scans every program BEFORE it gets executed. In that case, the scanner's priority doesn't matter, it gets run before the program starts anyway.
2. You run the antivirus scanning every file on disk, as a normal process. This would be what the priority adjustments affect, but doing things this way you can't really detect a new virus in real time. You can just find it during the scan, and the priority only determines how fast it will proceed when something else wants CPU time.
Re:MMCSS (Score:5, Insightful)
The general sequence of events is:
1 user double-clicks a file
2 the AV soft's real-time scanner is invoked to scan it
3a the file is clean, access is granted
3b the file is dirty, access is denied
It doesn't matter how long step 2 takes, or what other apps get to use cycles while it's suspended - it will complete before either of steps 3a or 3b.
Re: (Score:3, Informative)
Re: (Score:2)
woo
Remind me of an ex-college whose project has been delayed because, during the demo meeting, one of its manager was not happy with the name of the shortcut that launched the demo. ( It was an abbreviation instead of the full corporate name ).
Let's make some more 'professional' comments
1. They still call their kernel, kernel. Fucking not original.
2. They still call their product Windows. The same name they have been using for 20 year
Re: (Score:3, Informative)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Where I work (video editing) we have a file of logos of clients (and no clients too in case they're needed) in vector format. I don't know who created them, since they were handed to us by someone else, but there are several that have no extension. We have both windows and OSX computers, and in the windows computers, freehand opens them just fine just by renaming the extension to
Re: (Score:2)
But it IS broken (Score:2, Insightful)
It's the fact that the backwards compatibility is still there. C:\PROGRA~1 etc is fucking ugly and confusing for the new user. They stole long file names from other OSs but implemented it poorly. They need to take the same route as OSX. Start from scratch (sort of) and forget backwards compatibility for once. Allow good implementation of a virtual machine for that sort of crap. You can't get rid of the burdens from your old OS if you allow backwards compatibilty. 8.3 filenames are just one of the burdens.
Re: (Score:3, Informative)
Re: (Score:3, Insightful)
Would you upgrade to a new version of Windows if it meant you having to repurchase or reinstall *all* your existing software? Consumers want the software they purcha
Re: (Score:2)
Not quite... (Score:4, Informative)
The Winternals Administrator's Pak is also ">being discontinued [winternals.com], and have its functionality available only to those with Software Assurance agreements [microsoft.com].
Re: (Score:2)
Do you really mean that, "For once and for all" part? I sure hope so, becaues that means now that you've made your declaration, you'll shut up right?
Get this through your head: NOBODY GIVES A DAMN WHAT OS YOU USE!