Jinx, I recommend a good book on systems engineering. Well, not a particular book, just find a good one. And when you’re done, hand it to Mr. Gates, I guess.
For something as complicated as an operating system, what you ask is very hard to do. My Unix-based, mostly modular OS is a hard nut to crack, but I could be a victim of a virus if I do something stupid, like give a program permission to run as a higher-level user.
In Windows XP home and all consumer Windows below, you’re always running as the highest user! So anything you get can infect you.
This all has to do with file access, which is where a virus does its damage.
So let’s look at my OS – it’s a good, rock solid OS where all of the hardware abstraction is done via a true microkernel, and all of the pretty stuff is done as a process on top of that. To install a kernel extension that prevents my modularly-loaded modem driver from working, all I have to do is give the virus permission to write to the kernel extensions directory. Maybe I want to try-before-you buy in the non-legal sense, so I get something off of the internet that carries a trojan, maybe a virus scanner (just to be ironic). Logically the virus scanner exists in a low, low level of the OS, so I give the installer my root password, and it has access to literally every file on my OS. So the installer plants a virus without my knowing it.
So it doesn’t really matter if Windows sucks or not; any OS is vulnerable. Unix permissions, though, really help things out. Windows XP Pro has a wierd, overly-complicated persmissions system, too, but most people have their main user set as an Admin, so you’re still at risk. At least on my OS choice, even Admin users have to type their passwords for certain types of access.