dis'z mY own kiNda bloG!!!!!

on this blog,you'll find everything and every piece of thing in a different view,any comments are accepted@ my e-mail!

Wednesday, October 27, 2010

The UNIX Derivative

Long before when not only an OS, but a computer was like a dream to common man and computers were just mighty piece of machines, and people who used these machines were known as geeks. The story of OS starts from there, many OS were just piece of interpreted command line interfaces, most of which were build only in Assembly Level Programming. But as it is said, progress never stops man so man never stops progress, a wave came from time and technology in year 1960 when need was felt to develop a new OS base techniques. In year 1968, a consortium of researchers from General Electric, AT&Bell Labs and the Massachusetts Institute of Technology put forward a new OS project MULTICS (Multiplexed Information and Computing Services). Main job of this project was to develop an OS that will be able to handle files, multitasking and multiple user(This project was real base that was put forward for creating a true multi-user OS). Since technology does not advances only in one direction, technology related to graphics processing also came forward and before arrival of 1970, market marked arrival of console based gaming and very first console based game got released in year 1972. So before that could happen Dennis Ritchie thought now creating an OS with Assembly Level Programming will be penalty for programmers and things must switch to OS built with a programming language, so that it can even withstand gaming consoles with a sturdy platform. He tested several programming languages for the reason but all failed to test put forward by him, so he himself decided to create a new programming language which became heart and sole of most programmers all over the world and that programming language is known as ‘C’. The original UNIX platform came to existence in year 1969 whereas it got modified by Ken Thompson and Denise Ritchie by re-writing it in C in year 1973. Thus UNIX became first OS to fulfill all demands put forward by MULTICS and act as platform for other programs including games and console based services.
Linux

In year 1987, US born Computer Science Lecturer, Sir Andrew Tanenbaum wrote a clone to UNIX OS known as MINIX (MINI-uNIX) to help students understand working of an OS. Source code was free and soon there was music among students to create a more efficient MINIX variant. Soon a Finnish student named Linux Trovalds started adding features to MINIX as his needs were concerned and put it forward as his project work. On 5th of October 1991 he announced his own POSIX kernel called Linux which originally used MINIX file system but not based on MINIX kernel, the only difference among others and him was that he licensed it under GNU General Public License which claims, everyone in the world is free to use, modify or redistribute or sell a piece of code until you gave changes back to the creator. So if you are the one who thinks Linux is entire desktop then think twice because Linux is just a kernel which is part of system, which looks after hardware, runs programs but generally stays away from the OS. In other words Linux is system that runs your Desktop system without letting you bother it is present or not. Later, various other modifications were done to kernel on which many Linux Distributions were based, for example, easy to use kernel forms base of Ubuntu, power user base for fedora, speed of operation for Gentoo and there are so many to list for.
When I recall about graphics processing I can remember the first PC based game “Space Travel” was designed for UNIX which further marked end of BGI graphics and advent 3D graphics forward in early 1990′s in form of OpenGL. C which was developed for making UNIX more reliable became base for todays most advanced programming languages like CPP, Java, Perl, CGI, Python, Ruby, Auto-Script etc. Hardwares once designed for using on mainframe computers has to pass UNIX tests to got put forward in markets. So as per my view is concerned nearly each big thing in computing history has to do something with origin or development of UNIX system, and if you think Windows is left apart then beware Windows GRLDR is nothing but a GRUB variant developed for Windows and when we hear GRUB we know anyhow it is just related to booting UNIX and LINUX systems. So many times when I turn back pages to history about any major computing technology, I found it anyhow goes somewhere near UNIX. In other words nearly all major computing technologies were built directly or indirectly or in some manner with respect to UNIX, so I think we can say nearly each major computing technology we are using today is nothing but somehow just a UNIX DERIVATIVE.

Saturday, September 25, 2010

Some tips and shortcuts regarding common system usage.

Getting system properties faster : [shortcut key]-                                                                                   Hold 'Windows' key and press 'Pause/Break',simultaneously.                                                                                                                                                         This would open system properties directly without right clicking My Computer and opening it.


For Task-Manager:Press "Ctrl+shift+Esc",simultaneously or we all know the common way of pressing"Ctrl+Alt+Delete".


Locking Folders without any third party software :

Consider you want to lock a folder named in your E:\, whose path is E:\.
Now open the Notepad and type the following

ren .{21EC2020-3AEA-1069-A2DD-08002B30309D}

Where is your folder name. Save the text file as loc.bat in the same drive.
Open another new notepad text file and type the following

ren .{21EC2020-3AEA-1069-A2DD-08002B30309D}

Save the text file as key.bat in the same drive.
Steps to lock the folder:

To lock the folder, simply click the loc.bat and it will transform into control panel icon which is inaccessible.
To unlock the folder click the key.bat file. Thus the folder will be unlocked and the contents are accessible

PS: This has not worked fine in my system. But My Friend still arguing with me that this trick is working fine for him. So I thought Posting it here will be useful for others. 

Shutting down the computer: 
       
Press "Alt+F4" and "U",or you can use,
Press "Win+U",2 times.


To fasten your system:
 Press "Windows key+click on my computer"


To Rename the Recycle bin - This is only for fun

Type regedit in Run Command...
Then go to :HKEY_CLASSES_ROOT/CLSID/{645FF040-5081-101B-9F08-00AA002F954E} and Change the Name.

Change the Default Location for Installing Programs
XP uses the C:/Program Files directory as the default base directory into which new programs are installed. However, you can change the default installation drive and/or directory by using a Registry hack. Run the
Registry Editor and go to
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion
Look for the value named ProgramFilesDir. By default, the value will be C:/Program Files. Edit the value to any valid drive or folder; XP will use that new location as the default installation directory for new programs. 

Short cut for opening "Add or Remove Programs" window is

1. Open Run
2. Type appwiz.cpl 

Alt+tab
This is for easy way of select next minimize window 

Ctrl+t
This is to open a new tab in tabbed browsers.
Alt+F4
This is used to close the current viewing window or a running application.
Ctrl+W
This will close the current viewing window.


                                                                       -kj.,

 

Client-Server interactions in MMORPGs.

Client-server Interaction in multi player gaming

Here's a basic look at what happens when a group of characters attacks a monster in a typical MMORPG(MASSIVE MULTI-PLAYER ONLINE ROLE PLAYING GAMES):

  1. The group approaches the mob. The groups' clients inform the server of where they are, and the server tells the clients which monster is nearby. The client accesses files relating to the monster's appearance and movement, which are stored on the computer's hard drive.
  2. A tank, or a character designed to be able to absorb a lot of damage, attacks the mob. The tank's client sends a message to the server, informing it of the attack. The server relays that information to the rest of the group's clients.
  3. The party's damage dealers, known as damage per second (DPS) or nukes, attack the mob. Their clients inform the server of what actions they take. The server calculates damage dealt and received and informs each client.
  4. The party's healer casts healing spells on the members of the party. The healer's client informs the server of what spells are being cast and on whom. The server calculates how much healing is done and relays the information to the rest of the party.
  5. The mob's artificial intelligence (AI) protocols determine how the mob behaves during the fight, and the server relays that information to the clients. If the party successfully kills the monster, the server informs each client to display the monster's death animation, which is stored on the computer's hard drive.
  6. A member of the party loots the monster to see what treasure it carried. The server selects items from a loot table at random and tells the clients which items dropped. If some of the players in the group have a quest that requires a certain item from the mob, the server instructs the client to display the icon for that item.
  7. The players, using text or voice chat, decide who will get an item according to the rules of their group or guild. They may use a built-in random number generator to determine who gets what item. If so, the server which distributes the results to all the other clients.
  8. The player who wins the loot clicks on it to pick it up. The client informs the server that the player has done so. The server informs the client to add the item to the player's visible inventory. It also stores the change in the player's inventory in that player's database entry.
  These same steps can apply to just about any encounter in the world, whether it's with a player and an NPC, or a player and another player in a player-versus-player (PVP) environment. All of the information travels back and forth between the client and the server as packets of data. While many players rely on broadband Internet connections to handle the data, the transactions don't necessarily require a lot of bandwidth. Usually, the packets are small, but they come in bursts.

   More important than the speed of the player's Internet connection is how long it takes for information from your computer to travel all the way to the game server, and vice-versa. If there are bottlenecks along the way, the player might experience latency. Latency is another name for a traffic delay. Sometimes, it's noticeable -- a player might attack a monster and have to wait a few seconds before the monster responds. In some cases, latency can significantly disrupt game play.Latency is the signal gap between the server and the client.The signal to the server is called as "ping" and the response signal from the server is called as "pong".A ping and pong constitutes the completion of the interaction.The much is the difference between the ping and pong,the more will be the latency. Developing an MMORPG requires more than just figuring out how to send these packets of data from one place to another.


                                                                                                                 -kj.,

Client - Server interaction.

  Characteristics of Clients and Servers

In general, client software has the following characteristics.
  • It is an application program that becomes a client temporarily when remote acces is needed, but performs other computation locally.
  • It is invoked by a user and executes for one session.
  • It runs locally on the user's computer.
  • It actively initiates contact with a server (CONNECT primitive).
  • It can access multiple services as needed.(Here we can consider the multiprogramming as discussed in my earlier post).
In general, server software has the following characteristics.
  • It is a special-purpose program dedicated to providing one service.
  • It is invoked automatically when a system boots, and continues to execute through many sessions.
  • It runs on a shared computer.
  • It waits passively for contact from arbitrary remote clients (LISTEN primitive).
  • It accepts contact from arbitrary clients, but offers a single service.But,these days server are offering multiple services.(Consider multithreading here).
  Note that the word server is (strictly) referring to a piece of software. However, a computer running one or more servers is often (incorrectly) called a server.
  Like most application programs, a client and a server use a transport protocol to communicate.                        Figure 1 illustrates a client and a server using the TCP/IP protocol stack.
A client and a server
Figure 1: A client and a server
   The client and server each interact with a protocol in the transport layer of the stack. A sufficiently powerful computer can run multiple servers and clients at the same time. Such a computer must have the necessary hardware resources (e.g. a fast CPU and sufficient memory) and have an operating system capable of running multiple applications concurrently (e.g. UNIX or Windows). Figure 2 illustrates such a setup.
Two servers
Figure 2: Two servers
   The computer in the middle might be running an FTP server and a WWW server. Modern computers are often capable of running many servers at the same time.

Examples of a Client and a Server

  Figure 3 illustrates the sequence of socket procedure calls required for correct client-server programming.
Socket procedure calls
Figure 3: Socket procedure calls
  Client and server applications can use either connection-oriented or connectionless transport protocols to communicate. High-level languages, such as Perl [Wall 2000] , can hide this low-level code to make network programming less error-prone.

Example Server

Figure 4 illustrates a TCP server application written in Perl. The single function call.(Ignore this if you are not familiar with programming,atleast basic knowledge of UNIX is required to understand this concept). 


IO::Socket::INET->new(...) executes the first four procedure calls shown in Figure 3.
use IO::Socket::INET;
use strict;

my $port = shift
    or die"Missing port number\n";

my $socket = IO::Socket::INET->new('LocalPort' => $port,
       'Proto' => 'tcp',
       'Listen' => SOMAXCONN)
    or die "Can't create socket ($!)\n";
print "Server listening\n";
while (my $client = $socket->accept) {
    my $name = gethostbyaddr($client->peeraddr, AF_INET);
    my $port = $client->peerport;
    while (<$client>) {
 print "[$name $port] $_";
 print $client "$.: $_";
    }
    close $client
 or die "Can't close ($!)\n";
}
die "Can't accept socket ($!)\n";

Figure 4: Simple TCP server
  The first two lines specify packages to be used. The next two lines extract a port number from the command line. The next four lines perform a passive open with the server listening for incoming connections. The outer while loop accepts a connection and computes the host name and port number of the client. The inner while loop reads from the client (<$client>), echoes the data on standard output (print "[$name $port] $_"), and then sends the client a copy of its own data, prepended with the current line number (print $client "$.: $_"). When the client sends end-of-file, the server closes the current connection and continues the outer loop, waiting for another incoming connection.But these days servers are capable of receiving multiple incomes and generate multiple outcomes(sending requested data to the clients).

Client Example

Figure 5 illustrated a TCP (connection-oriented) client application written in Perl. The single function call

IO::Socket::INET->new(...)  /* executes the first four procedure calls shown in Figure 3.*/
use IO::Socket::INET;
use strict;

my $name = shift
    or die "Missing server name\n";
my $port = shift
    or die "Missing port number\n";

my $socket = IO::Socket::INET->new('PeerAddr' => $name,
       'PeerPort' => $port,
       'Proto' => 'tcp')
    or die "Can't create socket ($!)\n";
print "Client sending\n";
while (<STDIN>) {
    print $socket $_;
    print scalar <$socket>;
}
close $socket
    or die "Can't close socket ($!)\n";

Figure 5: Simple TCP client
  The first two lines specify packages to be used. The next four lines extract a server name and port number from the command line. The next four lines perform an active open on the socket between our client and the server. The while loop reads standard input (<STDIN>), sends the data to the server (print $socket $_), and then reads the server's reply (print scalar <$socket>). At end-of-file, the connection is closed.But these days,the connection is not terminated until the client or the server intentionally or erroritically  disconnects the connection.

Running the Server

Figure 6 illustrates the TCP server application running on penguin and listening on port 1234.(Penguin is an example of WWW server taken here).

penguin(100)% perl tcp-server.pl 1234
Server listening
[localhost 35577] Here we go...
[localhost 35577] Wow, a response!
[localhost 35577] Goodbye

penguin(101)%

Figure 6: Running server
It echoes the segments from a client running on localhost (i.e. the local machine) using port number 35577. It was then terminated.

Running the Client

Figure 7 illustrates the TCP client application contacting a server running on penguin and listening on port 1234.

penguin(107)% perl tcp-client.pl localhost 1234
Client sending
Here we go...
1: Here we go...
Wow, a response!
2: Wow, a response!
Goodbye
3: Goodbye
penguin(108)%

Figure 7: Running client
The text typed by the user is echoed back by the server. The application is terminated by typing end-of-file on standard input.

 This is the way actually a server responds to a negotiation of a client.

Any questions regarding this are entertained.



                                                                                                                                     -kj.,

Difference between MultiProgramming and MultiThreading.

  Multi programming is the technique to run several programs at a time using "time sharing". The main concept behind the multiple programming is that an operating system stores many programs in the main memory simultaneously and then the processor takes one job from that job pool and it executed them. When that job have to wait for some input output then it takes another job from that pool and executes it.like wise it seems that it handles many programs at the same time.This is called 'Multi programming".

  Whereas multi threading means the different threads in the process to perform similar type of the functions. Let's take one example that in the internet world server accepts the requests from the client side for the videos,audios,images. Now we consider the situation according to the single threaded system,in the busy network where many of the clients request for the same things the server would have provided its facilities to only one of the client.But this is not the case with multithreading .This problem is solved bu the multi threading.All the clients get the requested thing,eventhough it is same.But,we must consider the hardware and capacity of the server.Excessive load on the server for the same thing or different things might make the server crash.

OOpzzz.......the google has corrected the glitch of "l33t"

   I have posted in my last posts about the google loco and the "l33t" glitch,but the google has corrected the glitch.If you are even interested in using google loco,just type google loco in search bar and click on I am feeling lucky.

Saturday, August 14, 2010

How to make your google page look cool???

  Google is one of the most famous search engine .Everyone uses it for searching links for websites ,but friends have you ever thought of using this for getting fun?

Some of you will answer yes and some will answer no.

for those who answer no,
1:-Open www.google.com
2:-Type Google l33t and click "i am feeling lucky"

You will see a page with another language
Now type Google loco and click "EyE Am ph33|1n6|u(ky" button

You will see something

Looking nice right??

2:-Now Go back

and type google easter egg and again click on "EyE Am ph33|1n6|u(ky" button

Enjoy playing it!

                                       And,now,you can also change the background of your google page just by clicking on the "Change Background Image",seen at the left bottom of the google search page.You can insert your own pic as the background ,enjoy the new view!!!!!!!!!

Tips for averting the threat of key-loggers on a system.

                    Key-loggers are the software applications that are undetected normally in a system,used to find the password of the users logging on that computer.Most of the people don't know about these key-loggers as they are not seen running on a system,but they steal the passwords unknowingly.Mostly,when using a public system,users fall prey to these.In order to avoid any problems,you can simply follow these techniques and they they don't involve the download of any soft-wares.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    First,simply run task manager and check the running  applications.You might find the key-logger program running if any on the system.But,many of the public computer users are not allowed to access to task manager or some key-loggers can't be detected even here.    In such cases,we go for preventive measures directly.Key-loggers can only detect the key-board key strokes.So,you better use the "On screen Key-board".You can open an on screen keyboard by either typing  "osk" in the run or by choosing it from the control panel.It helps you type the passwords without using a key board with the help of a mouse.
                                                                  
                                                                 But,many key-loggers these days can't be even manipulated by this onscreen key board.In such case,just start typing your password in parts.Type a part of your password and then click somewhere else on the screen,just blank,type some other words and again type a part of your password and type something in the blank.Complete your password this way.As the key loggers start acting after you have clicked in the password box and stop after you press log-in,it takes the whole thing you typed between entering the password and logging in.But if your password is like a name or a common word,it'll be easy for the user of key-logger to crack it.So,you have to choose a good password.

                                                              For example,if your password is "alpha0numeric"(itz a good password but not mine!).First type 'al',then click on the blank somewhere and type some letters like ppqa or anything,then again click on the password box and type 'pha0',click on the blank and type some more letters or numbers and rest of your password in parts so on,until you complete your password.Your actual password will be "alpha0numeric",but the key logger registers it as "alppqapha0ddenuhhme98r123ic",so it'll be difficult for the key-logger user to access your account.But if the password is simple,like your name or your favorite movie's name,it'll be easier for the key-logger user to guess your password.So,we must carefully select the passwords.

                           ----------MORE SECURITY TIPS IN MY NEXT POST----------

                                                                                                                    -kj.,