Linux installation session in Computer Center
We (Roshan, Mayank, Rajat, Sandeep, Kumarjit, Amit, Vikash, Abhishek) installed opensuse 11 on 13 PCs in 90 minutes using lan based installation from a http server that i made on my laptop. 10 PCs were defective. Our plan of installing Fedora9 in the other lab did not frutify today, due to time constraints and bad media. Will do it on a later day after the Puja vacations.
laNeela
There are two wishes of mine which i have harbored for long in my heart:
1. Create a lan based game server scanner for use in the college
2. Name an applicatin of my creation “laNeela”
I always knew i would do it, but never knew that would do it in Python. The GUI is built using wxPython. I am using BOA constructor as the RAD tool. Here is a screenshot of the very first working version:
On hitting “Scan” it scans the lan for CounterStrike game servers and displays the IP addresses of the game server.
Only 10% work done yet.
Long Lost… but finally found
It was about 4 years back when i heard this beautiful song by Ustads Mohammad and Ahmed Hussain at IIIT Hyderabad. I could not find the song anywhere back here. Finally, Thanks to YouTube, i found it. The song is named “Mausam Ayenge Jayenge”. Listen to it at http://in.youtube.com/watch?v=Qur9ilP7948 .
Dark Clouds
Life has been particularly hard of late.
But dark clouds bring rain, and I love rain.
Linux/OpenSolaris Install fest @ NIT Durgapur Postponed :(
In an earlier post (http://debayan.wordpress.com/2008/08/23/linuxopensolaris-install-fest-nit-durgapur/) i had announced our plans to organise an Install Fest on the 25th, 26th and 27th September. Due to some unavoidable administrative problems, this event has been postponed to an unspecified date. In all probability, it will now be held some day between 20th – 30th October.
My humble apologies for any inconvenience caused.
NIT, Durgapur Celebrates Software Freedom Day
(Originally taken from http://sharmamitesh.wordpress.com/ )
This year 20th September happens to be the Software Freedom Day, one of the most important day in software calander. For those unaware, let me briefly tell you the importance of this day.
Software Freedom Day(SFD) is an annual worldwide celebration of free/open-source software. SFD is a public education effort, not only to celebrate the virtues of free/open-source software, but also to encourage its use, to the benefit of the public.[1]
Software Freedom Day was established in 2004 and was first observed on August 28, 2004 when over 70 teams participated. Since that time it has grown in popularity as more than 300 teams from over 60 countries celebrated on the second SFD, held on September 10, 2005. The primary sponsor for 2005-2006 was Canonical Ltd., the company behind Ubuntu, a GNU/Linux distribution.[1]
We too celebrated the Software Freedom Day in NIT, Durgapur. It was a celebration marked by the installation of GNU/Linux and bringing awareness among students. It was Computer Science Lab that was going free and open this time.
At 10 AM we gathered at the Computer Science Lab. We began the celebration by showing a happy birthday video from comedian Stephan Fry, as this year happens to be the 25th anniversary of GNU. This is one must watch video. Then followed a short and interesting presentation on FLOSS/OSS which was given by Biswas Parajuli and Raj Agrawal. The basic purpose of the presentation was to bring awareness among novice.
Then came the practical implementation of all these, Installation. We decided to install a lightweight distro Fluxbuntu. The responsibility of installation was shared among all present there, especially Sushil Pandey and Vignesh Prabhu. I would love to share some of the pictures which were captured during the celebrations.
While preparing for the slides i came across some really interesting sites which i would like to share with you.
Richard Stallman Talks about GNU’s 25th Anniversary
Why Open Source Software?
FOSS.IN
I make a promise to myself, that come November, I will be there at FOSS.IN 2008. No matter what the problems i have to face, stuff that i have to sell, and advices i have to ignore, I will be there… and thats a promise.
Linux memory management
Linux uses segmentation + pagination, which simplifies notation.
Segments
Linux uses only 4 segments:
- 2 segments (code and data/stack) for KERNEL SPACE from [0xC000 0000] (3 GB) to [0xFFFF FFFF] (4 GB)
- 2 segments (code and data/stack) for USER SPACE from [0] (0 GB) to [0xBFFF FFFF] (3 GB)
__
4 GB--->| | |
| Kernel | | Kernel Space (Code + Data/Stack)
| | __|
3 GB--->|----------------| __
| | |
| | |
2 GB--->| | |
| Tasks | | User Space (Code + Data/Stack)
| | |
1 GB--->| | |
| | |
|________________| __|
0x00000000
Kernel/User Linear addresses
7.2 Specific i386 implementation
Again, Linux implements Pagination using 3 Levels of Paging, but in i386 architecture only 2 of them are really used:
------------------------------------------------------------------
L I N E A R A D D R E S S
------------------------------------------------------------------
\___/ \___/ \_____/
PD offset PF offset Frame offset
[10 bits] [10 bits] [12 bits]
| | |
| | ----------- |
| | | Value |----------|---------
| | | | |---------| /|\ | |
| | | | | | | | |
| | | | | | | Frame offset |
| | | | | | \|/ |
| | | | |---------|<------ |
| | | | | | | |
| | | | | | | x 4096 |
| | | PF offset|_________|------- |
| | | /|\ | | |
PD offset |_________|----- | | | _________|
/|\ | | | | | | |
| | | | \|/ | | \|/
_____ | | | ------>|_________| PHYSICAL ADDRESS
| | \|/ | | x 4096 | |
| CR3 |-------->| | | |
|_____| | ....... | | ....... |
| | | |
Page Directory Page File
Linux i386 Paging
7.3 Memory Mapping
Linux manages Access Control with Pagination only, so different Tasks will have the same segment addresses, but different CR3 (register used to store Directory Page Address), pointing to different Page Entries.
In User mode a task cannot overcome 3 GB limit (0 x C0 00 00 00), so only the first 768 page directory entries are meaningful (768*4MB = 3GB).
When a Task goes in Kernel Mode (by System call or by IRQ) the other 256 pages directory entries become important, and they point to the same page files as all other Tasks (which are the same as the Kernel).
Note that Kernel (and only kernel) Linear Space is equal to Kernel Physical Space, so:
________________ _____
|Other KernelData|___ | | |
|----------------| | |__| |
| Kernel |\ |____| Real Other |
3 GB --->|----------------| \ | Kernel Data |
| |\ \ | |
| __|_\_\____|__ Real |
| Tasks | \ \ | Tasks |
| __|___\_\__|__ Space |
| | \ \ | |
| | \ \|----------------|
| | \ |Real KernelSpace|
|________________| \|________________|
Logical Addresses Physical Addresses
Linear Kernel Space corresponds to Physical Kernel Space translated 3 GB down (in fact page tables are something like { “00000000″, “00000001″ }, so they operate no virtualization, they only report physical addresses they take from linear ones).
Notice that you’ll not have an “addresses conflict” between Kernel and User spaces because we can manage physical addresses with Page Tables.
Taken from http://tldp.org/HOWTO/KernelAnalysis-HOWTO-7.html
Tesseract revisited
I worked on adding Indic script support to the Tesseract OCR engine in my summer vacations. Mr. Sankarshan from redhat was my mentor. I have not touched the project since then. Accuracy was at 86% when i left it. The released files are at http://code.google.com/p/tesseractindic/ and hacker documentation is at http://debayanin.googlepages.com/hackingtesseract .
It was a pleasant surprise to see Tom of Tesseract/Ocropus to have taken note of my work, and add indic script support to Ocropus. He mentions my name and techniques used in two of his project pages (http://sites.google.com/site/ocropus/languages/devanagari-hindi-sanskrit and http://sites.google.com/site/ocropus/morphological-operations). He uses morphological operations (which is better than my technique obviously) to segment characters instead. Have not tested his work yet, but will do.
In the mean time i am trying out Fedora 9. Shifted to Fedora from openSUSE. Have used openSUSE for the past one year. I need to create a new Fedora repository for the college. Also, i found kernel hacking somewhat diffcult on openSUSE. They suck at maintaining kernel-debuginfo packages.
And guess what, i sat for a Microsoft interview on campus!! Cleared the written round with 11 others. Was a subjective paper for the first time in their history. Coding questions. Then cleared tech interview round with 7 others. Ultimately the HR round was prety interesting. Looking at Linux/OS written all over my CV, he gave me some tough looks. He abruptly said “We do not work on OS at MSIT”. I said, does not matter. And when asked “Why do you want to join Microsoft?”, I have no idea what i said, because i never imagined anyone would ask me that question. Was not selected in the end. Every year they take 7-8 people from here. This year they came after a lot of nagging from our college’s side, and they shortlisted 1 guy and 2 girls (They always take 50% girls, some kind of company policy) for a final telephonic round which has not yet taken place.
Companies to come in the future are IBM, hp, Oracle and some more. Lets see where I go.
Python Rocks man!!
Its been around 30 minutes since i have been using python. I downloaded this pdf ebook written by Swaroop C H from dgplug.org. Its hard to believe how easy it is to learn Python. I have been sweating a lot over C++ lately, and this looks like a piece of cake.
One of the first programs i tried was converting a number to the base of 10 to a number of any base as input by the user. Here it is:
#!/usr/bin/python
#converts number to the base ten to number to any base
def recurse(n,b):
if n>=1:
m=n%b
recurse(n/b,b)
print m
else:
quit
i=int(raw_input("enter a number:"))
b=int(raw_input("enter base:"))
recurse(i,b)
I love this program because it creates small code using recursion logic, and i came up with this solution in my first year of college when a friend asked me casually about it. It rocks even more in Python!


