An unexpected UNIX

by Matt 30. November 2007 04:04

One of the 300+ features of the latest version of OSX caught my eye (do you really think that drivers for a rival OS are a feature of your operating system?). Apparently, OSX is now a fully certified UNIX environment.

Phew. Glad about that. What does it mean, again? Wikipedia explains both the Single UNIX Specification, and the POSIX standards, but to be honest, I'm not too sure how to translate this to the real world. Both specifications should allow for a high level of command line and source code compatibility, but then there's still the need for crazy AutoConf build scripts. At least these systems are now allowed to use the name UNIX (unlike BSD and Linux, surprisingly. They aren't certified).

Anyway. Good for Apple. It's (genuinely) a decent sales feature.

So would it be churlish of me to point out that Windows is a certified UNIX environment? And that it has been since 1998? Probably, but whoa - Windows. UNIX. What? Gosh.

Now this is an easy thing for Apple to do - OSX has always been UNIX-based (based on Mach, which is based on BSD?) But Windows quite clearly isn't UNIX. Or is it?

Well, this is the cool bit. What we're talking about is the POSIX subsystem for Windows NT, and it's one of those really nice little nuggets of technology most people haven't even heard of. Here comes the science.

Windows NT has a nifty feature in its design. As per most OS's it has kernel mode and user mode (where the kernel runs the OS, and user mode runs your programs). But on top of that, Windows NT splits user mode up into environment subsystems.

I can pretty much guarantee that you'll have never noticed this, because the default subsystem is Win32 - what you and I call Windows. Explorer and notepad are win32 applications, as are .net apps. The majority of the dlls on your hard disk are win32 - hence the "win32 API". Win32 even has the killer app - the window manager and the graphics display are part of the win32 subsystem. (Even win16 and DOS - and presumably win64 - are part of this subsystem.)

Windows NT has traditionally supported more subsystems, specifically, POSIX and OS/2. The latter was even going to be the default and primary subsystem, but languished once win32 was chosen. It was apparently only character based, and had no graphical support.

(The Gentoo Linux subsystem turned out to be an April Fool's joke, but the article is still worth a read.)

But the POSIX subsystem is still alive and kicking, and it provides an actual UNIX operating environment, translating the POSIX system calls to Windows NT kernel calls. All the familiar UNIX sights are there - a case sensitive file system (yeah, NTFS supports case sensitivity - purely for POSIX), a root based view of the file system, where everything lives under "/" - /bin, /usr. Your environment startup scripts live in /etc, and you've got access to a bunch of devices under /dev (including /dev/null). And those lovely, familiar, cryptic commands are all present too - ls, vi, grep, awk, sed. It's like a home away from home.

Of course, it's not all a bed of roses. You're now living in a separate subsystem to win32, and you can't call win32 APIs from the POSIX subsystem. And since the user interface lives in win32, you're stuck in that horrible console window (it's not cmd.exe - but it's the same window that cmd.exe uses). There are ways round this, though. And there's some pretty good voodoo to make all of this work as seamlessly as possible. You can run win32 commands from a POSIX app, and vice versa. POSIX apps display in the task manager, and can be killed (handy if you accidentally happen to cat /dev/random, for example. Ahem).

It's had a bit of an interesting history, too. It was originally implemented by Microsoft, apparently just providing enough functionality to satisfy government contracts. Softway Systems managed to get a source license, renamed in OpenNT, then Interix and developed it far enough that Microsoft bought it back and repackaged it as Services for UNIX. And now it's bundled with Vista and known as Subsystem for UNIX Applications.

Rodney Roddick, one of the key developers from the OpenNT days, maintains an Interix website, where you can find a potted history, and a "blog" that includes a slightly more personal remembrance (scroll down to the "10 Years of Interix" entry. There are no links).

I really like this approach to running and porting UNIX programs onto Windows. It has its advantages and disadvantages, but it's one of those lovely ideas that you like even if it's not perfect.

Tags:

Comments (46) -

suv review
suv review
7/20/2011 10:32:50 PM #

Fantastic task I like your type! Would really like to right here your feedback on my website! I am also seeking for someone to help you me make websites!

Reply

hybrid vehicles 2011
hybrid vehicles 2011
7/21/2011 12:49:18 PM #

Is it ok if I quote your article in my monthly newsletter? I would think this article suits my topic perfectly. Well ya, thanks for posting this article.

Reply

best hybrid cars
best hybrid cars
7/22/2011 4:29:54 AM #

Hi, just required you to know I he added your website to my Google bookmarks due to your layout. But seriously, I consider your net web-site has 1 in the freshest theme I??ve came across. It extremely helps make studying your blogging site significantly easier.

Reply

iphone os 4
iphone os 4
7/23/2011 8:34:45 PM #

Is it ok if I quote your article in my monthly newsletter? I would think this article suits my topic perfectly. Well ya, thanks for posting this article.

Reply

iphone developer program
iphone developer program
7/24/2011 5:43:23 AM #

hi!,I like your writing so so much! proportion we communicate extra about your post on AOL? I require a specialist in this area to unravel my problem. May be that's you! Taking a look forward to see you.

Reply

philix
philix United States
11/19/2015 10:19:01 PM #

Great Web Site

Reply

philix
philix United States
11/21/2015 12:54:54 PM #

Wonderful Web Site

Reply

Jeannine Mischel
Jeannine Mischel United States
1/7/2016 2:29:08 AM #

Congrats! This is such a great website, I know it will translate well into book form. Which is AWESOME!

Reply

Hannah Barbarino
Hannah Barbarino United States
1/15/2016 4:56:56 AM #

AWESOME!Can't wait for that, will be something to want to accomplish day by day, to do something AWESOME!

Reply

Silvana Bellipanni
Silvana Bellipanni United States
1/15/2016 8:31:10 AM #

Congrats! This is such a great website, I know it will translate well into book form. Which is AWESOME!

Reply

Bea Sawin
Bea Sawin United States
1/15/2016 8:54:28 AM #

Congratulations on your success! You deserve it for brightening all of my work days with something to be excited about.

Reply

Kellie Arciba
Kellie Arciba United States
6/26/2016 1:52:35 AM #

Virtually all of the comments upon this blog dont make come to feel.

Reply

Terrance Kutchera
Terrance Kutchera United States
6/29/2016 4:39:37 PM #

Although I seriously like this create, I believe there was an spelling miscalculation near against the end with the 3rd section.

Reply

Terrence Wenstrand
Terrence Wenstrand United States
8/25/2016 4:16:35 AM #

Hola! This is my first visit to your blog! We are a group of volunteers and starting a new projects in a community in the same niche. Your post gives us valuable information to work on. You have done a marvelous job!

Reply

醫學美容 自體 cosmetic.wiki
醫學美容 自體 cosmetic.wiki United States
10/15/2018 1:40:03 PM #

王君馨「Un-photoshopped」展示真我,總比假素顔好! - STYLE-TIPS.COM  王君馨在國際婦女節當天上載了自己的素顔照,引起了網民的討論,當中有不少網民留言表...      

Reply

質感染
質感染 United States
10/16/2018 11:17:19 AM #

由舒顏萃、洢蓮絲談膠原蛋白、Collagen type I and III、真皮填充劑(dermal filler)、刺激劑、異物反應foreign body reaction、異物肉芽腫(Foreign body granuloma)

Reply

醫學美容 魔髮 cosmetic.wiki
醫學美容 魔髮 cosmetic.wiki United States
10/16/2018 11:18:53 AM #

The Body Shop 美體小舖 【限量粉紅麝香香氛系列】粉紅麝香身體芳香噴霧的商品介紹   The Body Shop 美體小舖,限量粉紅麝香香氛系列,粉紅麝香身體芳香噴霧       

Reply

手機藍光很傷皮膚?夏天想美白,防曬隔離產品少不了抗藍光 Harpersbazaar HK  想維持肌膚年輕,抗藍光成了低頭族近年保養的課題,由於電腦、手機等行動裝置,都會發出波長與紫外線接近的「藍光」,光線強度更是紫外線的十多倍,令不少女士驚覺就算不外出都有機會曬黑,而不斷有研究指出,藍光會導致肌膚產生如同 UVA UVB 的壞影響,所以要是有機會令皮膚衰老,知性的女士都會做好預防措施。夏天想美白做好防曬,除了挑選能阻隔紫外線、空氣污染的防曬產品及隔離霜,對女生來説,更重要更是抗藍光!      

Reply

醫學美容 矜貴 cosmetic.wiki
醫學美容 矜貴 cosmetic.wiki United States
10/19/2018 5:32:46 PM #

濕疹  濕疹是一種不具傳染性的皮膚炎,任何年齡均有機會患上。患者的皮膚會有機會對外在環境產生過敏反應,並通常於面部、頸部、手腕、手臂及兩腿內側等皮膚出現紅疹,患處表面會變得乾燥痕癢和出現紅疹,情況嚴重時甚至會發炎流膿。  濕疹的成因  濕疹可分為原發性及繼發性:原發性濕疹多與遺傳因素有關,常見的小兒濕疹正是屬於原發性濕疹,只要配合適當的治療,超過八成病童有機會於長大後便會痊癒;而繼發性濕疹則可能與外在因素,如天氣、濕度變化、汗或食物等致敏原有關。除此之外,雙手經常濕水或長期接觸化學用品的人士,亦較 ...      

Reply

Liana Sympson
Liana Sympson United States
10/22/2018 9:03:46 PM #

Reply

Alva Freid
Alva Freid United States
10/27/2018 7:54:37 AM #

Heya i’m for the first time here. I came across this board and I find It truly useful & it helped me out a lot. I hope to give something back and aid others like you helped me.

Reply

https://www.melbournecarwrecker.com.au
https://www.melbournecarwrecker.com.au United States
10/29/2018 12:50:45 PM #

As soon as I  noticed this  site I went on reddit to share some of the love with them.

Reply

Byron Ficklen
Byron Ficklen United States
10/31/2018 7:45:38 PM #

Hello! This is my first visit to your blog! We are a collection of volunteers and starting a new initiative in a community in the same niche. Your blog provided us beneficial information to work on. You have done a outstanding job!

Reply

Myron Balak
Myron Balak United States
10/31/2018 10:10:56 PM #

Reply

Mike Swiger
Mike Swiger United States
11/1/2018 2:18:04 PM #

Reply

jollys wreckers ringwood
jollys wreckers ringwood United States
11/1/2018 2:40:44 PM #

Enjoyed reading  this, very good stuff,  regards . "All things are difficult before they are easy." by John Norley.

Reply

Mario Perring
Mario Perring United States
11/1/2018 7:58:47 PM #

Reply

we buy any car quote
we buy any car quote United States
11/6/2018 12:08:14 PM #

I really like your writing style, excellent info, regards for putting up Laughing. "Freedom is the emancipation from the arbitrary rule of other men." by Mortimer Adler.

Reply

Kasandra Gurrad
Kasandra Gurrad United States
11/6/2018 10:58:50 PM #

I’ve been exploring for a bit for any high quality articles or blog posts on this kind of area . Exploring in Yahoo I at last stumbled upon this web site. Reading this information So i’m happy to convey that I have an incredibly good uncanny feeling I discovered just what I needed. I most certainly will make certain to don’t forget this website and give it a glance regularly.

Reply

Barbie Decos
Barbie Decos United States
11/10/2018 10:05:59 PM #

I just couldn't leave your site prior to suggesting that I actually enjoyed the usual information an individual provide in your visitors? Is gonna be again steadily to check out new posts

Reply

Ronald Dossman
Ronald Dossman United States
11/11/2018 11:27:06 PM #

My brother suggested I would possibly like this blog. He was once totally right. This post truly made my day. You cann't consider simply how so much time I had spent for this information! Thank you!

Reply

Randall Shishido
Randall Shishido United States
11/12/2018 5:02:37 PM #

Simply  a smiling visitor   here to share the love (:, btw  outstanding  layout.

Reply

Kendra Fousek
Kendra Fousek United States
11/15/2018 10:15:45 PM #

Hello there, Can I download your photo and usage that on my website?

Reply

Anthony Dyba
Anthony Dyba United States
11/16/2018 8:17:07 PM #

Hi there, just changed into alert to your blog through Google, and found that it's truly informative. I am going to be careful for brussels. I will be grateful in the event you continue this in future. Lots of people shall be benefited out of your writing. Cheers!

Reply

Kurtis Ewoldt
Kurtis Ewoldt United States
11/17/2018 12:50:15 PM #

Hi! I've been reading your web site for some time now and finally got the bravery to go ahead and give you a shout out from  Atascocita Texas! Just wanted to say keep up the excellent work!

Reply

Crista Lagatta
Crista Lagatta United States
11/17/2018 2:23:55 PM #

Hi my friend! I want to say that this post is awesome, nice written and include approximately all significant infos. I would like to see more posts like this.

Reply

Mica Quicksey
Mica Quicksey United States
11/18/2018 6:42:38 AM #

Its such as you read my mind! You appear to grasp so much approximately this, such as you wrote the ebook in it or something. I think that you could do with a few percent to force the message house a bit, however instead of that, that is magnificent blog. A fantastic read. I will certainly be back.

Reply

Sonya Olney
Sonya Olney United States
11/18/2018 6:47:38 AM #

Great post. I was checking continuously this blog and I'm impressed! Extremely useful info specially the last part Smile I care for such info much. I was looking for this certain information for a very long time. Thank you and good luck.

Reply

Tracey Justian
Tracey Justian United States
11/18/2018 7:15:32 AM #

Someone essentially help to make seriously posts I might state. This is the first time I frequented your web page and to this point? I surprised with the analysis you made to make this particular post extraordinary. Magnificent job!

Reply

Elbert Berlanga
Elbert Berlanga United States
11/18/2018 7:43:31 AM #

I've been surfing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my view, if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before.

Reply

Jesus Antoniou
Jesus Antoniou United States
11/18/2018 6:52:29 PM #

I used to be more than happy to find this internet-site.I wished to thanks to your time for this glorious learn!! I definitely enjoying every little bit of it and I've you bookmarked to take a look at new stuff you weblog post.

Reply

car removals
car removals United States
11/20/2018 3:04:28 PM #

I simply wished to thank you so much once again. I do not know the things I could possibly have achieved in the absence of the techniques documented by you about this industry. It was actually a very challenging problem in my circumstances, but coming across the professional fashion you treated that made me to jump over gladness. I am just happy for this work as well as wish you really know what a great job you're accomplishing educating others all through a site. Most likely you have never got to know any of us.

Reply

Cash for Cars
Cash for Cars United States
11/20/2018 3:07:54 PM #

Someone essentially lend a hand to make critically articles I would state. This is the very first time I frequented your website page and to this point? I surprised with the research you made to create this actual post extraordinary. Great job!

Reply

car wreckers
car wreckers United States
11/20/2018 3:08:35 PM #

Thank you a lot for providing individuals with an exceptionally marvellous possiblity to read articles and blog posts from this website. It is always very nice and packed with a great time for me and my office co-workers to search the blog at the least 3 times in one week to learn the latest stuff you have. Of course, I'm always satisfied with all the effective creative concepts you serve. Selected two facts in this article are unquestionably the most efficient we have all ever had.

Reply

car removals
car removals United States
11/26/2018 6:50:52 PM #

Only  wanna comment  on few general things, The website  design and style  is perfect, the  subject matter is  rattling  wonderful : D.

Reply

car wreckers
car wreckers United States
11/26/2018 6:59:16 PM #

Very   excellent  info  can be found on  web site. "Politics is applesauce." by Will Rogers.

Reply

Add comment

biuquote
  • Comment
  • Preview
Loading

Rel=Me

Month List