28th October, 2006

Brief Introduction to PCI – Part I /--evilbitz   

This article is written in simple language and is intended for the common knowledge of the average computer user that should know what is happening under the “hood”, yet most advanced users can find this information interesting and it might introduce some new topics for them.

Before we will delve into the interesting part, let’s move through some basics. PCI is an acronym which stands for Peripheral Component Interconnect. It is the medium by which the CPU is talking with the rest of the devices in the computer. In the computer Jargon, it is called a bus. It is a set of lines that connects all the devices to the CPU and RAM (Random Access Memory) all together. For example, a sound card may be connected into a PCI slot on the Mother Board. When the operating system boots, it probes for PCI devices and get’s a list of all the devices which are connected in the system.

Each device owns the bus for just a period of time. Since there are several devices on the bus, a mechanism that determines which device may use the bus is needed. Fundamentally, this is called bus arbitration.

A PCI device also may have a need to communicate with its driver, which is a piece of software that runs in the operating system’s context and operates the device. Since there are a lot of operating systems, that same device may have several different versions of drivers, one for each OS. To communicate with the driver, the device holds an IRQ Line (Interrupt Request) and uses it to signal the CPU that the driver should be called and handle the event.

In this request, which is called an Interrupt, the driver may need to read some data from the device (think about a network packet that arrives to the machine). To pass the data (I/O), a PCI device may have two options, to pass the data by some I/O ports or by sharing a pre-determined memory region. The IRQ line and the addresses of the shared memory region are called the device’s resources.

When an interrupt occurs, the CPU stops the execution of the current software that is running and passes control to the driver. This is called pre-emption. So, the driver handles this event, and a function that is called the ISR (Interrupt Service Routine) is being executed. It reads and writes some data from the device and processes it. When a user’s software will ask for this data, the driver will have it ready.

Ok… let’s get back to PCI itself. PCI is actually the successor of an older bus called ISA, which was slower, and the predecessor of PCI-e (PCI Express ), which is newer and extremely faster. But yet, most of the hardware is designed for PCI and it is still the most common bus in the PC market. Don’t be mislead, even those “On-Board” devices which are so common those days are connected through the PCI bus. PCI slots are used for expansion.

The PCI bus is composed of 32 lines of electricity, each represents a bit, which is the smallest representation of data. It might be 0 or 1. Together, those 32 bits are composing a number in the range of 0 to 4,294,967,296. The PCI bus is working on a clock speed of 33MHz. That means that each line (bit) may be sampled in less than 1/33 of a second.

In the next article, I’ll introduce some new terms like DMA and BIOS.

Thanks for reading!



Posted in design, lowlevel, programming | 11 Comments

25th October, 2006

Commercials Are The Cause Of All Evil! /--evilbitz   

Old Cocacola Commercial

I just had an enlightenment! :-)

How far would all those companies go for marketing? How the future looks like?

The thing about commercials is that they “control the herd” in some way. Commercials are everywhere, in any place and they control your mind eventually that you start thinking that if you’ll follow, you will take part in this big mainstream.

50 years ago, the situation wasn’t so provocative like it is on these days. Every couple of years someone decides to be provocative to promote his business, and he drags everybody into a new level of “allowed provocativeness”, it happen in small doses (or else it wouldn’t work), so that it creates a linear line, and the end can be seen already. Today, sexy women sells you almost everything, even math books.

As I see it, future marketing will be based on sex, and I mean it in the full meaning of the word, porn if you would like. Eager people that want to get rich will strive humanity closer and closer to this point. Future commercials will try so hard to stand-out because there would be just too many of them that turning into sex will be inevitable.

Let’s hope that it will happen fast enough for us to enjoy it :-)



Posted in random | Be The First To Comment!

24th October, 2006

Sun Blackbox Project /--evilbitz   

Sun Blackbox Project

http://www.sun.com/emrkt/blackbox/index.jsp

I’m wondering about their marketing landing page, it’s kind of dull, some videos, podcasts and blogs, they should learn what they can do with their budget. Intel beat everybody with their “Second Life” Core Duo campaign last week.

After watching the video at Sun’s website I tought about something:

A unit like this can be worth millions (depending on the data that it contains). I can imagine a fiction future scenario that a special crew steals the whole datacenter in “one shot”. If I were them, I wouldn’t mention the roof and stick to the basement :-)



Posted in random | Be The First To Comment!

23rd October, 2006

Ecological Computer Viruses /--evilbitz   

One can create an ecological computer virus.

  • The Printer Virus – The virus will schedule it’s destruction event to a certain date, it needs to do it’s job without interference. It will detect when the computer is idle for a couple of hours and the local time shows that it is early in the morning. It will send an ACPI event to turn on the printer and start printing on low quality to waste as much paper as it can.
    The results can be devastating, if it will spread to 1,000,000 computers covertly and print 25 pages on average at each computer it infected. Then the earth will loose 25 * 1,000,000 * 100gr = 2,500,000,000gr of paper which is 2756 tons (907kg a ton) of paper. According to enote, each ton of paper is equivalent to 17 trees, so it turns out to be a total waste of ~49,000 trees!
  • The WiFi Virus – It’s job is to fry out human beings, the virus will transmit nonstop until someone will feel bad.
  • Power Consumption – A virus can be designed to use as much power as it can by turning off ACPI (or using it to it’s advantage) and using the hardware (especially the disks) in an excessive way. Higher power consumption equals to higher power plant duties, they’ll burn more oil and pollute the environment.
  • The Subwoofer Virus – This one plays a continuous low frequency sound. In accordance to the theory of chaos, a hurricane will be created somewhere :-)

The product of 1,000,000 infected computers can really create a difference, even with small things.

It’s nice to have fun about it, but now you can guess what a stupid bug(?) in Yahoo Messanger for example with millions of clients world wide can do.



Posted in virus | 4 Comments

22nd October, 2006

NTFS Partition Restore /--evilbitz   

Here is how I burned away 4 precious hours from my life:

Yesterday I went and bought a new Western Digital 250GB HD because I wanted to install another two operating systems, I planned to install Windows Vista and Fedora Core 5 Linux.

I created some partitons for the OSs and first installed FC5, I’d also created a 180GB for misc files. After I installed Fedora, I filled the “Misc” partition with some files from my older HDs. then I noticed that I accidently created the 180GB partition as a primary one while the Vista partition was logical.

As you probably know, a maximum of 4 primary partitions could be created on the same HD, and operating systems could only be installed on primary partitions. You can however create one of those partitions to be an extended one and create more logical partitions inside of it.

Well, I turned to partition magic 8, a widely known partitioning tool for the windows platform, and done the following:

  1. Convert the Vista Partition to primary
  2. Convert the “Misc” partition to logical

I guess that those two simple tasks were hard for PM8 because after applying them, my computer didn’t show the “misc” partition at all!!!

I booted from my fresh fedora linux and installed the ntfs kernel module (arghhh Linux…), after this useless waist of time I didn’t have success in mounting the “misc” partition either. obviously those files where important to me so I tried to fix the partition.

After searching for and installing several partition restoring tools I encountered TestDisk (who gave it it’s name anyway?), a software that supposedly fixes partition tables, It’s being done by analyzing the HD and writing over the partition table. So I took the risk (the only thing I could lost is the new fedora installation). After booting again from windows, I was relieved to see that the partition appeared in “My Computer” and that the files are there!

The files are there alright but about 20% of them have additional random bytes added to them at the begining! but I still look on the bright side :-)



Posted in random | 1 Comment

Top »
"If you can't join them, beat them!"
Search Evilbitz: