Thursday, November 22, 2007

Virtual memory implementation Mach OS

Hi, this might help you a bit in understanding how Virtual memory(VM) is implemented in FreeBSD and Mach OS
http://www.geocities.com/no_escape03/mach-vm.pdf

njoy!!!
vaibhav

Tuesday, November 20, 2007

FreeBSD Network Buffer Allocation

You may find some important information on how Network buffer and its allocation works in FreeBSD in the following pdf file

http://www.bsdcan.org/2004/papers/NetworkBufferAllocation.pdf


njoy!!
Vaibhav

Saturday, November 17, 2007

KTR log support implementation in FreeBSD

How can you monitor/log changes you make inside the FreeBSD Kernel?

The KTR support is provided by FreeBSD for tracing the logs that come from the kernel during
its execution.
The following lines must be added to the /usr/src/sys/i386/conf/MYKERNEL file to support
the KTR logs.
options KTR
options KTR_COMPILE=(KTR_MYLOG|KTR_PROC)
options KTR_CPUMASK=0xff
options KTR_ENTRIES=8192
options KTR_MASK=(KTR_MYLOG|KTR_PROC)
To see the logs following command can be used after logging on to the system or any
time during the user processes are run.
sysctl debug.ktr.cpumask=0
ktrdump –o > mylog.log
The file can be viewed using vi mylog.log


use
#man ktr for more information..

vaibhav

Friday, November 16, 2007

How are priority levels handled in FreeBSD for x86?

Question : What FreeBSD 5.2.1 does to handle priority level for x86?
Solution :
(A) Does FreeBSD 5.2.1 still use the spl() macros?

--- POST DELETED----

Thursday, November 1, 2007

FreeBSD- compile & install kernel

I am writing here after a very long time ..yeah coz of course work I hardly get time... When the sem started I had no clue what i will be studyin in my OS course but we were made to study FreeBSD deisgn & arch... I now i must say : "I am lovin it". I didn't know what a kernel was & how it worked until I saw the kernel code...
I will be posting a series of imp info on freeBSD and all I know.. I might be wrong at times coz m still studyin it...

The first step one must know is how to compile and install the kernel on freeBSD..
1.
#make -DNOCLEAN buildkernel KERNCONF=MYKERNEL
the -DNOCLEAN allows you to avoid the complete compilation of kernel and compiles only those files that have been modifies. i.e. helps you in avoiding clean compilation
2.
#make installkernel KERNCONF=MYKERNEL
this installs the kernel..
3.
#reboot

the system makes a copy of your old kernel /clean kernel in boot/kernel.old/kernel

Now when you reboot, just let the system use the new copy of your kernel

If you wish to rollback to the old configuration u may choose option "6" from the menu that comes during the booting process .... For this just press "6" .
When u get OK prompts type

OK unload kernel
OK boot boot/kernel.old/kernel

& u r back to the old copy of kernel...yeah the code changes you made will still be there & u need to remember what all changes to did....

my suggestion : When you make change & reboot.. come back to the old copy again to make changes so that the clean copy of kernel remains there...if u make changes to the modified copy & install the changes.. you will loose the clean kernel as u will have a dirty copy of kernel in kernel.old.

there is a lot more to come...
thanx to Dr chapin...

njoy!!!!
Vaibhav ..
Life is all about innovation & quality .....

Monday, September 3, 2007

Persistant storage in Pocket PCs

Nice article on persistant storage by --Mike Calligaro

Here's a quick primer on why you want Persistent Storage on your Pocket PCs.
Persistent Storage (PS) on PocketPC is new for Windows Mobile 5.0. (All Smartphones since the original 2002 release have had PS.)
Previously, your user data (email, contacts, calendar, settings, apps you installed, etc) were stored in RAM. RAM has the advantage of being really fast, but the significant disadvantage of needing a constant source of power for it to hold its data. Leave your device unplugged for long enough, and you'll lose all your data. Fixing that was the primary reason for moving PocketPCs to Persistent Storage.
PS gives you a nice sense of certainty about your data. Batteries running low? No problem. Worst case, the device shuts off and you can't use it again until you get to a power supply. But when you get there, it'll boot back up and all your data will still be there.
But PS has a number of other effects that might not be quite so obvious.
Would you believe that moving to PS can double your battery life and enable devices with significantly more storage than were previously possible?
Here's why. Remember that RAM requires power to keep its data. The amount of power needed is linear with the amount of RAM. That is to say, 64M of RAM needs twice as much power to keep it running as 32M does. 128M needs four times as much power as 32, etc. And this power drain is constant. The RAM is sucking your batteries dry while the device is in use and while it's suspended. It even continues to drain your batteries when they are "critically low" and the system won't let you turn it on. Also, people didn't buy 128M RAM devices for the program space. They bought them to store stuff in. And those devices had lousy battery lives as a result.
Flash ROM, on the other hand, burns pretty much the same amount of power regardless of how much you have. A 32M flash part burns about the same amount of power as a 128M flash part does. And a 1G flash part is pretty much the same as well. So, by moving to a system where I store my stuff in flash, not RAM, I can put more storage in without requiring a bigger battery to compensate.
But wait, there's more. Pre-Persistent Storage, Windows Mobile had what we called "the 72 hour rule." If you've ever seen a PocketPC run low on batteries, at some point it pops up a dialog that says something like, "You're running out of power, you should stop now." If you keep using it, it'll come back a little later with a more dire warning saying something to the effect of, "You'd better save your data now, because you're on the verge of losing it." Then, a bit after that it comes on and says, "That's it, I'm shutting you down." At that point, you can't use the device again until you plug it in. How much battery charge do you think you have then? 5% maybe?
Try half.
Yes, when we shut you down because your batteries were "critically low," they were still 1/4 to 1/2 full. Why? Because, if the batteries ever fully died, it would be catastrophic. You'd lose your data, and that's, in our opinion, one of the worst things that can happen. So we made a requirement and held our OEMs to it. The requirement was that, at the point where we decided the batteries were "critically low," they had to still have enough power to keep the RAM charged for 72 hours. The idea there was that you could discover that you were out of power on Friday on the way home and you'd still have your data on Monday when you got back to your charger.
A typical battery holds 1000mAh of charge. 128M of RAM takes about 500mAh to stay resident for 72 hours. 64M takes about 250. This is why you never saw a 256M WM 2003 device. It would have run for a minute then decided its batteries were critically low.
This is why switching to Persistent Storage can radically improve your battery life. With PS, we removed the 72 hour requirement. We'll let you run your batteries completely dry, because we know your data will still be safe. Right off the bat, that buys you a significant chuck of time. It also means that no one ever has to make a 128M RAM device again. They can fall back to 64M devices, which burn less power, and store the user data in tons and tons of flash. You'll definitely see 128M flash devices. And there's no barrier to keeping you from seeing 256M, 1G, etc devices. That couldn't have been done with RAM.
Downsides? Yes, nothing is free. Flash is much slower than RAM. Reading and writing large amounts of data will take longer on a PS device than it did on a RAM device. That initial sync that pulls down 400 contacts and 5000 emails will take longer. Some write operations will seem a bit more sluggish. But I believe you'll find that the upsides significantly outweigh the downsides.
Mike Calligaro

Saturday, September 1, 2007

Front page server extension missing from windows vista

My first post here ... Wrote arnd 10 for my timepass blog but now as my masters has jst started picking its pace... I will keep posting stuff at both the places...

I thot of installing C#... But before I could start my installation the .NET pre-requisite installation gave me an IIS and Frontpage server extension missing warning message..

I installed IIS service pretty easily but wasn't able to find the FPSE anywhere in Windows VISTA...After scanning & surfing every corner of the world wide web I found that Microsoft has not put in a support for it & are considering to do so in future release...

I hope they do it pretty soon...though I have skipped the step for FPSE installation in .NET,

I am safe coz me gotta use C# only...

njoy!!!

Vaibhav