<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7243602279715171390</id><updated>2012-02-06T03:55:10.518-08:00</updated><category term='Windows Device Drivers'/><category term='Technical Websites - Common'/><category term='C/C++'/><category term='FUN N MISC'/><category term='DLL'/><category term='Photography'/><category term='Good Quotes'/><category term='Linux File System'/><category term='Downloads-Non-Technical-websites'/><category term='C++'/><category term='Windows Memory Management'/><category term='Compiler - Linker - Loader'/><category term='SMART - WORD DOC'/><category term='Non-Technical Websites'/><category term='BIOS - MBR - Booting Sequence'/><category term='Technical Websites - Linux'/><category term='System Protocol'/><category term='Linux Kernel'/><category term='SMART - VISUAL STUDIO'/><category term='SMART - MISC - WINDOWS'/><category term='Common OS Concepts'/><category term='Server Technologies - IPMI'/><category term='Processor specific'/><category term='Linux Commands'/><category term='Linux Packages'/><title type='text'>"Some" about the box - Computer</title><subtitle type='html'>If I have eight hours for cutting wood, I spend six sharpening my axe.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>57</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-4343639712414767918</id><published>2012-02-06T03:34:00.000-08:00</published><updated>2012-02-06T03:55:10.537-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Kernel'/><title type='text'>Kernel Debugging</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;dl class="dl"&gt;&lt;dt class="dt dlterm"&gt;&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;&lt;span class="keyword cmdname"&gt;[Ref: &lt;span style="background-color: blue;"&gt;http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.kdb%2Fdoc%2Fkdb%2Fkdb.htm&lt;/span&gt;]&lt;/span&gt;&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;&lt;span class="keyword cmdname"&gt;&amp;nbsp;&lt;/span&gt;&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;&lt;span class="keyword cmdname"&gt; &lt;/span&gt;&lt;/dt&gt;&lt;dt class="dt dlterm" style="color: #e69138;"&gt;&lt;b&gt;&lt;span class="keyword cmdname"&gt;kdb&lt;/span&gt; command&lt;/b&gt;&lt;/dt&gt;&lt;dd class="dd" style="text-align: left;"&gt;This command is implemented as an ordinary user-space program and is typically used for&lt;/dd&gt;&lt;dd class="dd" style="text-align: left;"&gt;post-mortem analysis of a previously-crashed system by using a system dump file. The &lt;span class="keyword cmdname"&gt;kdb&lt;/span&gt; command includes subcommands specific to the manipulation of system dumps.&lt;span class="keyword cmdname"&gt; &lt;/span&gt;&lt;/dd&gt;&lt;dt class="dt dlterm"&gt;&amp;nbsp;&lt;/dt&gt;&lt;dt class="dt dlterm" style="color: #f6b26b;"&gt;&lt;b&gt;KDB kernel debugger&lt;/b&gt;&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;- The KDB kernel debugger is integrated into the kernel and allows full control of the system while a debugging session is in progress. The KDB kernel debugger allows for traditional debugging tasks such as setting breakpoints and single-stepping through code.&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;- KDB needs to be enabled when the system boots.&lt;/dt&gt;&lt;dt class="dt dlterm"&gt; - To check if the KDB is enabled or not, issue&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;&lt;br /&gt;&lt;span style="color: yellow;"&gt;$&amp;gt; bosdebug -L&lt;/span&gt;&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;&lt;span style="color: yellow;"&gt;Memory debugger&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; off&lt;/span&gt;&lt;br style="color: yellow;" /&gt;&lt;span style="color: yellow;"&gt;Memory sizes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/span&gt;&lt;br style="color: yellow;" /&gt;&lt;span style="color: yellow;"&gt;Network memory sizes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/span&gt;&lt;br style="color: yellow;" /&gt;&lt;span style="color: yellow;"&gt;Kernel debugger&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; off&lt;/span&gt;&lt;br style="color: yellow;" /&gt;&lt;span style="color: yellow;"&gt;Real Time Kernel&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; off&lt;/span&gt;&lt;br style="color: yellow;" /&gt;&lt;span style="color: yellow;"&gt;Backtracking fault log&amp;nbsp;&amp;nbsp;&amp;nbsp; on&lt;/span&gt;&lt;br style="color: yellow;" /&gt;&lt;span style="color: yellow;"&gt;Kernext Memory Tracking&amp;nbsp;&amp;nbsp; off&lt;/span&gt;&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;- To create a kernel image with KDB enabled, issue&lt;/dt&gt;&lt;dt class="dt dlterm" style="color: yellow;"&gt;$&amp;gt; bosdebug -D&amp;nbsp;&lt;/dt&gt;&lt;dt class="dt dlterm" style="color: black;"&gt;This will turn on the kernel debugger. You need to bosboot and reboot in order to take this effect.&lt;/dt&gt;&lt;dt class="dt dlterm" style="color: yellow;"&gt; &lt;/dt&gt;&lt;dt class="dt dlterm" style="color: yellow;"&gt;$&amp;gt; bosboot -a &amp;amp;&amp;amp; reboot&lt;/dt&gt;&lt;dt class="dt dlterm" style="color: yellow;"&gt;[After of about 20-30 mins, you will have a KDB enabled image}&lt;/dt&gt;&lt;dt class="dt dlterm" style="color: yellow;"&gt; bosboot: Boot image is 49180 512 byte blocks.&lt;/dt&gt;&lt;dt class="dt dlterm"&gt; - KDB enabled kernel image is ready. All you gotto do now is, reboot.&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;If you have HMC kinda machine (where you remotely try to reboot the machine), while booting, you can see Kernel Debugging is enabled.&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;$&amp;gt; reboot&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;&lt;span style="color: cyan;"&gt;&amp;nbsp;-------------------------------------------------------------------------------&lt;/span&gt;&lt;br style="color: cyan;" /&gt;&lt;span style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Welcome to AIX.&lt;/span&gt;&lt;br style="color: cyan;" /&gt;&lt;span style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boot image timestamp: 11:02:54 12/26/2011&lt;/span&gt;&lt;br style="color: cyan;" /&gt;&lt;span style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The current time and date: 11:18:52 12/26/2011&lt;/span&gt;&lt;br style="color: cyan;" /&gt;&lt;span style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processor count: 1;&amp;nbsp; memory size: 2048MB;&amp;nbsp; kernel size: 28147575&lt;/span&gt;&lt;br style="color: cyan;" /&gt;&lt;span style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boot device: /vdevice/v-scsi@30000003/disk@8100000000000000:2&lt;/span&gt;&lt;br style="color: cyan;" /&gt;&lt;span style="color: cyan;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; kernel debugger setting: enabled&lt;/span&gt;&lt;br style="color: cyan;" /&gt;&lt;span style="color: cyan;"&gt;-------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;&amp;nbsp;&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dt class="dt dlterm"&gt;&lt;br /&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-4343639712414767918?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/4343639712414767918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2012/02/kernel-debugging.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4343639712414767918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4343639712414767918'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2012/02/kernel-debugging.html' title='Kernel Debugging'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-3891568874963484959</id><published>2012-02-04T03:20:00.001-08:00</published><updated>2012-02-04T03:20:42.070-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Photography'/><title type='text'>One color/partial color photo</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://graphicssoft.about.com/od/gimp/ss/partialcolor_8.htm"&gt;http://graphicssoft.about.com/od/gimp/ss/partialcolor_8.htm&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-3891568874963484959?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/3891568874963484959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2012/02/one-colorpartial-color-photo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3891568874963484959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3891568874963484959'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2012/02/one-colorpartial-color-photo.html' title='One color/partial color photo'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-4873686754914811081</id><published>2011-10-11T05:02:00.000-07:00</published><updated>2011-10-11T05:02:37.569-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Commands'/><title type='text'>Sample vimrc file</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;set nocompatible&lt;br /&gt;&lt;br /&gt;set backspace=indent,eol,start&lt;br /&gt;&lt;br /&gt;set nobackup&lt;br /&gt;set showcmd&lt;br /&gt;&lt;br /&gt;set ts=3 sw=3 smarttab&lt;br /&gt;set expandtab&lt;br /&gt;set incsearch&lt;br /&gt;set hlsearch&lt;br /&gt;set nowrap&lt;br /&gt;&lt;br /&gt;set cb=exclude:.*&lt;br /&gt;syntax enable&lt;br /&gt;&lt;br /&gt;source /opt/freeware/share/vim/vim71/syntax/syntax.vim&lt;br /&gt;source /home/harishse/.vim/plugin/taglist.vim&lt;br /&gt;source /home/harishse/.vim/plugin/comments.vim&lt;br /&gt;source /home/harishse/.vim/plugin/supertab.vim&lt;br /&gt;source /home/harishse/.vim/plugin/surround.vim&lt;br /&gt;source /home/harishse/.vim/plugin/SearchComplete.vim&lt;br /&gt;source /home/harishse/.vim/plugin/NERD_tree.vim&lt;br /&gt;"Below lines are required if you want nerd tree to be opened automatically&lt;br /&gt;"autocmd VimEnter * NERDTree&lt;br /&gt;"autocmd BufEnter * NERDTreeMirror&lt;br /&gt;"autocmd VimEnter * wincmd w&lt;br /&gt;&lt;br /&gt;map &amp;lt;C-E&amp;gt; :NERDTree&amp;lt;cr&amp;gt;&lt;br /&gt;map &amp;lt;C-P&amp;gt; :pwd&amp;lt;cr&amp;gt;&lt;br /&gt;map &amp;lt;C-v&amp;gt;&amp;lt;C-v&amp;gt; : vs&amp;lt;cr&amp;gt;&lt;br /&gt;map &amp;lt;C-q&amp;gt; :q&amp;lt;cr&amp;gt;&lt;br /&gt;&lt;br /&gt;let &amp;amp;t_Co=256&lt;br /&gt;let &amp;amp;t_Sf="\&amp;lt;Esc&amp;gt;[3%dm"&lt;br /&gt;let &amp;amp;t_Sb="\&amp;lt;Esc&amp;gt;[4%dm"&lt;br /&gt;&lt;br /&gt;hi Search&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cterm=bold&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctermfg=black&lt;br /&gt;hi Constant&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cterm=bold&amp;nbsp;&amp;nbsp; ctermfg=red&lt;br /&gt;&lt;br /&gt;set tabstop=4&lt;br /&gt;set shiftwidth=4&lt;br /&gt;set formatoptions+=r&lt;br /&gt;&lt;br /&gt;set nu&lt;br /&gt;set showmatch&lt;br /&gt;set smartindent&lt;br /&gt;filetype plugin on&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-4873686754914811081?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/4873686754914811081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2011/10/sample-vimrc-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4873686754914811081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4873686754914811081'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2011/10/sample-vimrc-file.html' title='Sample vimrc file'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-7300004592394408605</id><published>2011-06-09T00:18:00.001-07:00</published><updated>2011-06-09T00:18:27.094-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FUN N MISC'/><title type='text'>To find out the location of the missed calls you got</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="color: cyan;"&gt;http://site3.way2sms.com/jsp/LocateMobile.jsp&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-7300004592394408605?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/7300004592394408605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2011/06/to-find-out-location-of-missed-calls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7300004592394408605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7300004592394408605'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2011/06/to-find-out-location-of-missed-calls.html' title='To find out the location of the missed calls you got'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-9056926278287408771</id><published>2011-03-24T04:43:00.000-07:00</published><updated>2011-03-24T06:37:18.064-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Common OS Concepts'/><title type='text'>Socket Programming - Part 1</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Reference:&amp;nbsp;&lt;a href="http://www.tenouk.com/cnlinuxsockettutorials.html"&gt;http://www.tenouk.com/cnlinuxsockettutorials.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;u&gt;Port Numbers&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;16 bit integers&lt;/li&gt;&lt;li&gt;So a maximum port numbers are 2^16 = 65536 (0 to 65535)&lt;/li&gt;&lt;li&gt;Unique with a machine/IP address&lt;/li&gt;&lt;li&gt;Each service/application/daemon will have their own port number&amp;nbsp;&lt;/li&gt;&lt;li&gt;Required to make a connection (along with its host IP address)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;u&gt;Server &amp;amp; Client Port Numbers&lt;/u&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Connection is defined by: (Server IP and Port number) + (Client IP and port number)&lt;/li&gt;&lt;li&gt;Server Port numbers are low numbers in the range 1 - 1023 (called as WELL KNOWN PORT NUMBER)&lt;/li&gt;&lt;li&gt;Accessible only by Administrators (roots, in linux)&lt;/li&gt;&lt;li&gt;Used for authentication&lt;/li&gt;&lt;li&gt;A server running on a well-known port lets the OS know what port it wants to listen on&lt;/li&gt;&lt;li&gt;Normally, client port numbers are higher number starting at 1024&lt;/li&gt;&lt;li&gt;Client normally simples lets the OS picks a new port that is not already in use.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-9056926278287408771?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/9056926278287408771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2011/03/socket-programming-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/9056926278287408771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/9056926278287408771'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2011/03/socket-programming-part-1.html' title='Socket Programming - Part 1'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-367116672142365957</id><published>2011-03-07T01:45:00.000-08:00</published><updated>2011-03-07T01:47:29.357-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Commands'/><title type='text'>Background and Foreground Process</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;1. When you run a command (process), you can make it to run as a background process using &lt;span class="Apple-style-span" style="color: cyan;"&gt;$&amp;lt;cmd&amp;gt; &amp;amp;&lt;/span&gt;&lt;br /&gt;2. If you forget to make that command as background, and if you feel you should do it now, then&lt;br /&gt;- Press &lt;span class="Apple-style-span" style="color: cyan;"&gt;CTRL+Z&lt;/span&gt; (Suspend that process)&lt;br /&gt;- &lt;span class="Apple-style-span" style="color: cyan;"&gt;$&amp;gt; bg disown 1&lt;/span&gt; (make that process to be a background&lt;br /&gt;3. Now if you want to check the list of background processes, type &lt;span class="Apple-style-span" style="color: cyan;"&gt;$&amp;gt; jobs&lt;/span&gt;&lt;br /&gt;4. If you want to bring the background process to foreground, then type&lt;br /&gt;$&amp;gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt; fg %1&lt;/span&gt;&lt;br /&gt;Again to make it a background process,&lt;br /&gt;$&amp;gt; &lt;span class="Apple-style-span" style="color: cyan;"&gt;bg %1&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-367116672142365957?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/367116672142365957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2011/03/background-and-foreground-process.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/367116672142365957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/367116672142365957'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2011/03/background-and-foreground-process.html' title='Background and Foreground Process'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-4548795582597743018</id><published>2011-02-07T05:09:00.000-08:00</published><updated>2011-02-07T05:09:35.363-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMART - VISUAL STUDIO'/><title type='text'>When properties screwed up</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pbIJbHttz2I/TU_ur5ZNL1I/AAAAAAAABB4/bjyjdhBcyZs/s1600/property_not_found.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="209" src="http://4.bp.blogspot.com/_pbIJbHttz2I/TU_ur5ZNL1I/AAAAAAAABB4/bjyjdhBcyZs/s320/property_not_found.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;When Properties got screwed up in Visual Studio 2005/2008, in the cmd, type "&lt;span class="Apple-style-span" style="color: yellow;"&gt;&lt;b&gt;devenv /resetskippkgs&lt;/b&gt;&lt;/span&gt;".&lt;br /&gt;It will get you the default properties (color, font etc) for your editor.&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-4548795582597743018?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/4548795582597743018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2011/02/when-properties-screwed-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4548795582597743018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4548795582597743018'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2011/02/when-properties-screwed-up.html' title='When properties screwed up'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pbIJbHttz2I/TU_ur5ZNL1I/AAAAAAAABB4/bjyjdhBcyZs/s72-c/property_not_found.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-972058613877388732</id><published>2010-08-25T12:39:00.000-07:00</published><updated>2010-08-25T13:03:23.436-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C/C++'/><title type='text'>Late/Dynamic Binding in C++</title><content type='html'>&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; white-space: normal;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pbIJbHttz2I/THVzi-Ze64I/AAAAAAAAAfc/ktsflpQ37oc/s1600/C_late_binding.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="395" src="http://1.bp.blogspot.com/_pbIJbHttz2I/THVzi-Ze64I/AAAAAAAAAfc/ktsflpQ37oc/s400/C_late_binding.JPG" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;b&gt;Late Binding using Function Pointers (C)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-972058613877388732?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/972058613877388732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/08/latedynamic-binding-in-cc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/972058613877388732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/972058613877388732'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/08/latedynamic-binding-in-cc.html' title='Late/Dynamic Binding in C++'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pbIJbHttz2I/THVzi-Ze64I/AAAAAAAAAfc/ktsflpQ37oc/s72-c/C_late_binding.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-5397090857518840386</id><published>2010-08-24T21:59:00.000-07:00</published><updated>2010-08-24T21:59:43.104-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Common OS Concepts'/><title type='text'>Locks in Multi-processing/multi-thread programming</title><content type='html'>DeadLock:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;A&amp;nbsp;&lt;b&gt;deadlock&lt;/b&gt;&amp;nbsp;is a situation wherein two or more competing actions are each waiting for the other to finish, and thus neither ever does.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;LiveLock:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;A&amp;nbsp;&lt;b&gt;livelock&lt;/b&gt;&amp;nbsp;is similar to a deadlock, except that the states of the processes involved in the livelock constantly change with regard to one another, none progressing.&amp;nbsp;Livelock is a special case of&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Resource_starvation" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0b0080; text-decoration: none;" title="Resource starvation"&gt;resource starvation&lt;/a&gt;; the general definition only states that a specific process is not progressing.&lt;/div&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;A real-world example of livelock occurs when two people meet in a narrow corridor, and each tries to be polite by moving aside to let the other pass, but they end up swaying from side to side without making any progress because they both repeatedly move the same way at the same time.&lt;/div&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;Livelock is a risk with some algorithms that detect and recover from deadlock. If more than one process takes action, the deadlock detection algorithm can repeatedly trigger. This can be avoided by ensuring that only one process (chosen randomly or by priority) takes action.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-5397090857518840386?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/5397090857518840386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/08/locks-in-multi-processingmulti-thread.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5397090857518840386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5397090857518840386'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/08/locks-in-multi-processingmulti-thread.html' title='Locks in Multi-processing/multi-thread programming'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-4256144598807829989</id><published>2010-08-24T11:42:00.003-07:00</published><updated>2010-08-24T11:42:49.475-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='System Protocol'/><title type='text'>I2C protocol</title><content type='html'>&lt;a href="http://www.i2cbus.com/theprotocol.html"&gt;http://www.i2cbus.com/theprotocol.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-4256144598807829989?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/4256144598807829989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/08/i2c-protocol.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4256144598807829989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4256144598807829989'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/08/i2c-protocol.html' title='I2C protocol'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-5831973259186156704</id><published>2010-08-24T11:11:00.000-07:00</published><updated>2010-08-24T11:11:34.517-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>new/delete operator</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Return type of delete operator is void (not void*)&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;2. Exception and valid cases&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;char *p;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_pbIJbHttz2I/THQFV4qUKkI/AAAAAAAAAfM/_GrRGiR3eTk/s1600/exception.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="147" src="http://2.bp.blogspot.com/_pbIJbHttz2I/THQFV4qUKkI/AAAAAAAAAfM/_GrRGiR3eTk/s320/exception.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;delete p; ==&amp;gt; exception (shown in picture)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;Where as&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;char *p = 0;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;delete p; .==&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;You can, however, use&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;strong&gt;delete&lt;/strong&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;on a pointer with the value 0. This provision means that, when&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;strong&gt;new&lt;/strong&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;returns 0 on failure, deleting the result of a failed&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;strong&gt;new&lt;/strong&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;operation is harmless.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;2. Mixing both new/malloc and delete/free&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;class A {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;public:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; A() { cout &amp;lt;&amp;lt; "Constructor" &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; ~A() { cout &amp;lt;&amp;lt; "Destructor" &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;};&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;int main() {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;A *a = new A;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;free(a); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ==&amp;gt; Calls only constructor; not destructor&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&amp;nbsp;A *b = (A*)malloc(sizeof(A));&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&amp;nbsp;delete b; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ==&amp;gt; Calls only destructor; not constructor&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&amp;nbsp;A *c = new A;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&amp;nbsp;delete c; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;==&amp;gt; Calls both constructor and destructor&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-5831973259186156704?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/5831973259186156704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/08/newdelete-operator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5831973259186156704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5831973259186156704'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/08/newdelete-operator.html' title='new/delete operator'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pbIJbHttz2I/THQFV4qUKkI/AAAAAAAAAfM/_GrRGiR3eTk/s72-c/exception.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-5526178312498048722</id><published>2010-06-21T04:32:00.000-07:00</published><updated>2010-06-23T07:40:43.760-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Commands'/><title type='text'>GDB unknown commands</title><content type='html'>All in gdb&amp;gt; prompt&lt;br /&gt;&lt;br /&gt;1. Ctrl + p =&amp;gt; To get the previous command&lt;br /&gt;2. p array@sizeof(array) =&amp;gt; To print all the array elements&lt;br /&gt;3. set print pretty on =&amp;gt; To print the structure elements' values in a neat way&lt;br /&gt;4. p /x &lt;variable&gt; =&amp;gt; prints the value in hexa decimal format&lt;/variable&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-5526178312498048722?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/5526178312498048722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/06/gdb-unknown-commands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5526178312498048722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5526178312498048722'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/06/gdb-unknown-commands.html' title='GDB unknown commands'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-3543271162717380798</id><published>2010-06-01T02:46:00.001-07:00</published><updated>2010-06-01T02:46:13.368-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Commands'/><title type='text'>How the linux commands are processed</title><content type='html'>&lt;a href="http://fog.ccsf.cc.ca.us/~gboyd/cs260a/online/terminals/characters.html"&gt;http://fog.ccsf.cc.ca.us/~gboyd/cs260a/online/terminals/characters.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-3543271162717380798?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/3543271162717380798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/06/how-linux-commands-are-processed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3543271162717380798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3543271162717380798'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/06/how-linux-commands-are-processed.html' title='How the linux commands are processed'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-7444579349959103292</id><published>2010-04-01T01:44:00.001-07:00</published><updated>2010-04-01T01:44:10.707-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technical Websites - Linux'/><title type='text'>Perl Tutorial</title><content type='html'>&lt;a href="http://www.comp.leeds.ac.uk/Perl/basic.html"&gt;http://www.comp.leeds.ac.uk/Perl/basic.html&lt;/a&gt;&amp;nbsp;- good one&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-7444579349959103292?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/7444579349959103292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/04/perl-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7444579349959103292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7444579349959103292'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/04/perl-tutorial.html' title='Perl Tutorial'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-6112441991053879480</id><published>2010-03-30T06:48:00.001-07:00</published><updated>2012-02-03T02:05:58.108-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Commands'/><title type='text'>VI keyboard Shortcuts</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="color: cyan;"&gt;:set hlsearch (:nohl)  &lt;/div&gt;&lt;div style="color: cyan;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: cyan;"&gt;:set mouse=a  &lt;/div&gt;&lt;div style="color: cyan;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: cyan;"&gt;:set nocompatible  &lt;/div&gt;&lt;div style="color: cyan;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: cyan;"&gt;:set smartindent&lt;/div&gt;&lt;div style="color: cyan;"&gt;:set nowrapscan (to disable the wrap search) &lt;/div&gt;&lt;div style="color: cyan;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: cyan;"&gt;:highlight String ctermfg=red  &lt;/div&gt;&lt;div style="color: cyan;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: cyan;"&gt;:highlight search ctermfg=black&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;To indent a block of code, keep the cursor in any of the {} braces, and do&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: cyan; font-family: verdana;"&gt;=%&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;To comment a block of line, keep the cursor in the first line (from where you want to comment),&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- press CTRL + v (to enter visual mode)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- use UP DOWN arrows (or j/k keys) to select the lines&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- press I (shift + i) (this enters into visual mode)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- type "//"&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Once you press ESC, the // will be applied to all the lines you selected.&lt;/span&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;To uncomment a block of code, keep the cursor in the first line (from where you want to uncomment)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- press CTRL + v (to enter visual mode)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- select RIGHT LEFT arrows to select only the "//" characters&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- press "d" (to delete all the // characters)&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;ul style="font-family: 'Times New Roman'; text-align: left;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;To search and replace a text ("src" to "dest"), use&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman';"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:%s/src/dest/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;==&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Replaces first occurence of "src" in each line&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="font-family: 'Times New Roman'; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:%s/src/dest/g&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;==&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Replaces all the occurences of "src" with "dest" in all the lines&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;div style="font-family: 'Times New Roman';"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:%s/src/dest/gc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;==&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Asks for confirmation to replace or not for each occurence&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman';"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="font-family: verdana;"&gt;Vimdiff commands:&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: verdana;"&gt;]c - to go to the next change&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana;"&gt;[c - to go to the previous change&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana;"&gt;do - diff obtain; means get the changes from other file&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana;"&gt;dp - diff put; means put the changes into other file&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-6112441991053879480?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/6112441991053879480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/vi-keyboard-shortcuts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/6112441991053879480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/6112441991053879480'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/vi-keyboard-shortcuts.html' title='VI keyboard Shortcuts'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-9218010394776268667</id><published>2010-03-28T22:58:00.001-07:00</published><updated>2010-03-28T22:58:35.564-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Downloads-Non-Technical-websites'/><title type='text'>Putty with Tabs (Putty Connection Manager)</title><content type='html'>&lt;a href="http://lifehacker.com/351503/add-tabs-to-putty-with-putty-connection-manager"&gt;http://lifehacker.com/351503/add-tabs-to-putty-with-putty-connection-manager&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-9218010394776268667?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/9218010394776268667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/putty-with-tabs-putty-connection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/9218010394776268667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/9218010394776268667'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/putty-with-tabs-putty-connection.html' title='Putty with Tabs (Putty Connection Manager)'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-5524762561303009180</id><published>2010-03-26T02:10:00.000-07:00</published><updated>2010-03-30T06:48:11.659-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Commands'/><title type='text'>Emacs Keyboard shortcuts</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;Movements:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;M - f &amp;nbsp;&amp;lt;==&amp;gt; Move forward by one word&lt;br /&gt;M - b &amp;lt;==&amp;gt; Move backward by one word&lt;br /&gt;&lt;br /&gt;C - f &amp;nbsp; &amp;lt;==&amp;gt; Move forward by one letter&lt;br /&gt;C - b &amp;nbsp;&amp;lt;==&amp;gt; Move backward by one letter&lt;br /&gt;C - p &amp;nbsp;&amp;lt;==&amp;gt; Move up by one line&lt;br /&gt;C - n &amp;nbsp;&amp;lt;==&amp;gt; Move down by one line&lt;br /&gt;&lt;br /&gt;M - v &amp;nbsp;&amp;lt;==&amp;gt; PAGE UP&lt;br /&gt;C - v &amp;nbsp;&amp;lt;==&amp;gt; PAGE DOWN&lt;br /&gt;&lt;br /&gt;M - &amp;gt; &amp;nbsp;&amp;lt;==&amp;gt; Goto end of the file (U have to press "SHIFT" here to enter "&amp;lt;" )&lt;br /&gt;M - &amp;lt; &amp;nbsp;&amp;lt;==&amp;gt; Goto the beginning of the file (same as above)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;File operations:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;b&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;C - x C- f &amp;nbsp;&amp;lt;==&amp;gt; To open a file&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;C - x k &amp;nbsp;&amp;lt;==&amp;gt; Close the current buffer (kill buffer)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;M - d &amp;nbsp;&amp;lt;==&amp;gt; Delete next word&lt;br /&gt;C - k &amp;nbsp; &amp;lt;==&amp;gt; Delete current line&lt;br /&gt;C - y &amp;nbsp; &amp;lt;==&amp;gt; Paste (watever copied)&lt;br /&gt;&lt;br /&gt;C - [space]&amp;nbsp;&lt;space&gt;&amp;lt;==&amp;gt; Start marking the portion&lt;/space&gt;&lt;br /&gt;C - w &amp;nbsp;&amp;lt;==&amp;gt; Cut the portion till the cursor is in currently&lt;br /&gt;M - w &amp;nbsp;&amp;lt;==&amp;gt; Copy the portion till the cursor is in currently&lt;br /&gt;&lt;br /&gt;C - x u &amp;nbsp;&amp;lt;==&amp;gt; Undo last operation&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;M - g g &amp;nbsp;&amp;lt;==&amp;gt; Goto the line&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;M - x replace-string &lt;search-str&gt; &lt;replace-str&gt; &amp;nbsp;&amp;lt;==&amp;gt; Search and replace&lt;/replace-str&gt;&lt;/search-str&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;C - s [string] &amp;nbsp;&amp;lt;==&amp;gt; To search a string forward&lt;br /&gt;C - r [string] &amp;nbsp;&amp;lt;==&amp;gt; To search a string backward&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;Windows:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;C - x 0 &amp;nbsp; &amp;lt;==&amp;gt; Close the current window&lt;br /&gt;C - x 1 &amp;nbsp; &amp;lt;==&amp;gt; Close all the windows except current window&lt;br /&gt;C - x 2 &amp;nbsp; &amp;lt;==&amp;gt; Split the current window vertically (means top and bottom)&lt;br /&gt;C - x 3 &amp;nbsp; &amp;lt;==&amp;gt; Split the current window horizontally (means left and right)&lt;br /&gt;C - x o ('o' for 'others') &amp;nbsp; &amp;lt;==&amp;gt; Switch between windows&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;Shell:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;M -x shell &amp;nbsp;&amp;lt;==&amp;gt; Open shell (terminal)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;Setting Tab Size:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;M - x set-variable [ENTER]&amp;nbsp;&lt;enter&gt;c-basic-offset [ENTER]&amp;nbsp;&lt;enter&gt; 8 &lt;enter&gt; &amp;lt;==&amp;gt; Setting tab size to 8&lt;/enter&gt;&lt;/enter&gt;&lt;/enter&gt;&lt;br /&gt;&lt;enter&gt;&lt;enter&gt;&lt;enter&gt;&lt;br /&gt;&lt;/enter&gt;&lt;/enter&gt;&lt;/enter&gt;&lt;br /&gt;&lt;enter&gt;&lt;enter&gt;&lt;enter&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;Auto-Indentation:&lt;/span&gt;&lt;/b&gt;&lt;/enter&gt;&lt;/enter&gt;&lt;/enter&gt;&lt;br /&gt;&lt;br /&gt;M -x indented-text-mode &amp;nbsp; &amp;lt;==&amp;gt; set auto indent (does not work through putty)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;To search for a string in all the files in a directory:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;M - x grep-find [Enter] &amp;nbsp;&amp;lt;==&amp;gt; This will generate a command; at the end of the command, give the string you want to search; and also set the directory in which you wana search&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-5524762561303009180?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/5524762561303009180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/emacs-keyboard-shortcuts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5524762561303009180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5524762561303009180'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/emacs-keyboard-shortcuts.html' title='Emacs Keyboard shortcuts'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-5014365443873131398</id><published>2010-03-25T03:49:00.001-07:00</published><updated>2010-03-26T02:32:12.057-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technical Websites - Common'/><title type='text'>EMACS &amp; SQL links</title><content type='html'>Emacs:&lt;br /&gt;-&amp;nbsp;&lt;a href="http://www.math.uh.edu/~bgb/emacs_keys.html"&gt;http://www.math.uh.edu/~bgb/emacs_keys.html&lt;/a&gt;&lt;br /&gt;-&amp;nbsp;&lt;a href="http://xahlee.org/emacs/emacs_unix.html"&gt;http://xahlee.org/emacs/emacs_unix.html&lt;/a&gt;&amp;nbsp;(good one)&lt;br /&gt;&lt;br /&gt;SQL:&lt;br /&gt;-&amp;nbsp;&lt;a href="http://www.w3schools.com/sql/default.asp"&gt;http://www.w3schools.com/sql/default.asp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-5014365443873131398?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/5014365443873131398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/emacs-sql-links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5014365443873131398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5014365443873131398'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/emacs-sql-links.html' title='EMACS &amp; SQL links'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-9180845981861593954</id><published>2010-03-19T03:57:00.001-07:00</published><updated>2010-03-19T05:10:50.663-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Non-Technical Websites'/><title type='text'>Theme for Visual Studio 2008</title><content type='html'>&lt;a href="http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx"&gt;http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-9180845981861593954?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/9180845981861593954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/theme-for-visual-studio-2005.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/9180845981861593954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/9180845981861593954'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/theme-for-visual-studio-2005.html' title='Theme for Visual Studio 2008'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-1991656555695440688</id><published>2010-03-18T05:06:00.001-07:00</published><updated>2010-03-18T05:06:45.492-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Device Drivers'/><title type='text'>Links</title><content type='html'>&lt;a href="http://www.catch22.net/tuts/kernel101"&gt;http://www.catch22.net/tuts/kernel101&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-1991656555695440688?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/1991656555695440688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/1991656555695440688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/1991656555695440688'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/links.html' title='Links'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-8356434309450870068</id><published>2010-03-18T04:24:00.000-07:00</published><updated>2010-03-18T04:27:05.873-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Device Drivers'/><title type='text'>Basics</title><content type='html'>Courtesy:&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Device_driver"&gt;http://en.wikipedia.org/wiki/Device_driver&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: yellow;"&gt;Device Driver&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;- an extension of OS&lt;br /&gt;- a "bridge" between hardware and applications (and Operating Systems)&lt;br /&gt;- abstracted into logical and physical layers (and hence can be categorized as Logical Device Drivers (LDD) and Physical Device Drivers (PDD))&lt;br /&gt;- LDD written by OS vendors where as PDD written by device vendors&lt;br /&gt;&lt;br /&gt;An attempt by Microsoft to reduce system instability due to poorly written device drivers by creating a new framework for driver development called "WINDOWS DRIVER FOUNDATION (WDF)".&lt;br /&gt;&lt;br /&gt;WDF - includes &lt;b&gt;UMDF &lt;/b&gt;(User Mode Driver Framework) and &lt;b&gt;KMDF &lt;/b&gt;(Kernel Mode driver Framework)&lt;br /&gt;&lt;br /&gt;1. &lt;b&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;UMDF &lt;/span&gt;&lt;/b&gt;- implements a message-based protocol for communicating with their devices - as user mode drivers.&lt;br /&gt;- any malfunction on these drivers does not cause any system instability&lt;br /&gt;&lt;br /&gt;2. &lt;b&gt;&lt;span class="Apple-style-span" style="color: cyan;"&gt;KMDF &lt;/span&gt;&lt;/b&gt;- allows development of kernel-mode device drivers, but attempts 2 provide std implementations functions that are well known to cause probs, including cancellation of IO operations, power management, and PnP device support&lt;br /&gt;&lt;br /&gt;Device Drivers on Windows, can run on *&lt;b&gt;&lt;span class="Apple-style-span" style="color: magenta;"&gt;both Ring 0 and Ring 3&lt;/span&gt;&lt;/b&gt;*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-8356434309450870068?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/8356434309450870068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8356434309450870068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8356434309450870068'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/basics.html' title='Basics'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-1650758073805342300</id><published>2010-03-15T01:53:00.000-07:00</published><updated>2010-03-15T01:53:41.916-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMART - MISC - WINDOWS'/><title type='text'>How to enable the chat logging feature in MOC (microsoft ofc communicator)</title><content type='html'>Courtesy: &lt;a href="http://hosting.intermedia.net/support/kb/default.asp?id=1406"&gt;http://hosting.intermedia.net/support/kb/default.asp?id=1406&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_pbIJbHttz2I/S531HqiifkI/AAAAAAAAAZI/PXL6aKoIkjc/s1600-h/1.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/_pbIJbHttz2I/S531HqiifkI/AAAAAAAAAZI/PXL6aKoIkjc/s400/1.JPG" vt="true" width="278" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_pbIJbHttz2I/S531XksfB-I/AAAAAAAAAZQ/-JtgwzIG3y0/s1600-h/2.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_pbIJbHttz2I/S531XksfB-I/AAAAAAAAAZQ/-JtgwzIG3y0/s400/2.JPG" vt="true" width="392" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-1650758073805342300?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/1650758073805342300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/how-to-enable-chat-logging-feature-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/1650758073805342300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/1650758073805342300'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/03/how-to-enable-chat-logging-feature-in.html' title='How to enable the chat logging feature in MOC (microsoft ofc communicator)'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pbIJbHttz2I/S531HqiifkI/AAAAAAAAAZI/PXL6aKoIkjc/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-8418917220898249101</id><published>2010-01-05T23:05:00.000-08:00</published><updated>2010-01-05T23:08:54.139-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Processor specific'/><title type='text'>C-States</title><content type='html'>&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;b&gt;&lt;span style="color: #3d85c6;"&gt;C1&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Internal CPU Clock signal is stopped&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;BIU and APIC are still fed with internal Clock Generator to allow the CPU to temporarily exits the HLT state&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Since CPU temporarily “leaves” the HALT state, this state is called as “Stop Clock Snoop State” or “HALT/Grant Snoop State” or “Snoop State”&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 13px; font-weight: bold;"&gt;&lt;span style="color: #3d85c6;"&gt;Intel C1E&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Exactly similar to C1; but reduces the internal CPU voltage as well&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;If this is enabled in BIOS, the CPU will enter this mode instead of “traditional” C1 state on executing HLT instruction&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Also called as Extended Halt/Stop Grant Snoop State”&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 13px; font-weight: bold;"&gt;&lt;span style="color: #3d85c6;"&gt;AMD C1E&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Works just like C3 (shutting down all CPU clocks – both internal and external)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Processor enters C1E state when this option is enabled in BIOS AND all CPU cores enter the regular C1 (HLT) state.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;The diff between C1E and C3 is basically how the CPU enters the &lt;/span&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;Sleep&lt;/span&gt;&lt;/b&gt;&lt;span style="color: yellow;"&gt; state:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;While on traditional C3 state, CPU must be put in that state usually by a command from the OS&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Where as on C1E, the CPU enters the &lt;/span&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;Sleep&lt;/span&gt;&lt;/b&gt;&lt;span style="color: yellow;"&gt; state automatically when all cores are at HLT (C1) state&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 13px; font-weight: bold;"&gt;&lt;span style="color: #3d85c6;"&gt;C2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Intel - Introduced by adding one extra pin to CPU called “&lt;/span&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;STPCLK&lt;/span&gt;&lt;/b&gt;&lt;span style="color: yellow;"&gt;” (Stop Clock)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;AMD - C2 state is entered by simply reading a register from the ACPI, circuit that is physically located on the chipset;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;When this pin is asserted, the CPU core clock is cut&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;As you can notice, both C1 and C2 cuts the CPU core clock; the diff is in how the CPU achieves this&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;C1 is activated by software (HLT instruction) while C2 is activated by hardware (by sending a signal to CPU pin “STPCLK)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Two modes&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in; mso-list: l1 level2 lfo3; text-indent: -.25in;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;o&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Stop Grant&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.5in; mso-list: l1 level3 lfo3; text-indent: -.25in;"&gt;&lt;span style="font-family: Wingdings; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;§&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;As explained above; CPU core clock is stopped but the clock generator chip (also know as PLL) is still active and generating the external bus reference clock i.e., CPU external clock&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in; mso-list: l1 level2 lfo3; text-indent: -.25in;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;o&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Stop Clock&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.5in; mso-list: l1 level3 lfo3; text-indent: -.25in;"&gt;&lt;span style="font-family: Wingdings; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;§&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Here the Clock Generator itself is turned off and thus the external clock generator chip would be turned off, thus saving more energy&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.5in; mso-list: l1 level3 lfo3; text-indent: -.25in;"&gt;&lt;span style="font-family: Wingdings; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;§&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Current CPUs don’t have this Stop Clock mode inside C2 state but on the C3 Deep Sleep State&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in;"&gt;&lt;span style="color: yellow;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;b&gt;&lt;span style="color: #3d85c6;"&gt;C2E&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Similar to C2; but reduces the CPU voltage besides stopping the CPU internal clock&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 13px; font-weight: bold;"&gt;&lt;span style="color: #3d85c6;"&gt;C3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Also known as “&lt;/span&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;Sleep&lt;/span&gt;&lt;/b&gt;&lt;span style="color: yellow;"&gt;” state&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Both BIU and APIC clocks will be cut off (which means it cant answer to important requests coming from CPU external bus or interruptions)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;C3 implementation on Intel&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in; mso-list: l3 level2 lfo4; text-indent: -.25in;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;o&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Given an extra pin called SLP (or DPSLP depending on CPU model) which must be activated when the CPU is in C2 state in order to switch the CPU into C3 state&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in; mso-list: l3 level2 lfo4; text-indent: -.25in;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;o&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;So first &lt;/span&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;STPCLK&lt;/span&gt;&lt;/b&gt;&lt;span style="color: yellow;"&gt; pin must be activated and then one should activate the &lt;/span&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;SLP&lt;/span&gt;&lt;/b&gt;&lt;span style="color: yellow;"&gt; pin&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in; mso-list: l3 level2 lfo4; text-indent: -.25in;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;o&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Achieving the Deep Sleep state is achieved by simply cutting the “external clock signal”&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in;"&gt;&lt;span style="color: yellow;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;C3 implementation on AMD&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in; mso-list: l3 level2 lfo4; text-indent: -.25in;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;o&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Achieved by simply reading a register from ACPI, circuit that is physically located on the chipset (P_LVL3) in the Processor control Block (P_BLK)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Two modes&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in; mso-list: l3 level2 lfo4; text-indent: -.25in;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;o&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Sleep – as explained above&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in; mso-list: l3 level2 lfo4; text-indent: -.25in;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;o&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Deep Sleep (pin is DPSLP instead SLP) – achieved by simply cutting the “external clock signal”&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in; mso-list: l3 level2 lfo4; text-indent: -.25in;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;o&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;AltVid – allows reduction on CPU voltage while they are in C3 mode&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin-left: 1.0in;"&gt;&lt;span style="color: yellow;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="mso-list: l3 level1 lfo4; text-indent: -.25in;"&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Note: AMD &lt;/span&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;C1E and C3 (Sleep State; not the Deep Sleep state)&lt;/span&gt;&lt;/b&gt;&lt;span style="color: yellow;"&gt; are similar&lt;/span&gt;&lt;span style="color: yellow;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: yellow;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;b&gt;&lt;span style="color: #3d85c6;"&gt;C4&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Also known as &lt;/span&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;Deeper Sleep State&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Since on C3, all clock signals inside the CPU are stopped, there is no other way to save power by playing with CPU clock signals. The next step on reducing the CPU idle power is to reduce the CPU voltage (Power = VI)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Intel – C4 is achieved from C3 i.e., CPU must first enter C3 and then, from there, it can reduce its internal voltage&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 13px; font-weight: bold;"&gt;&lt;span style="color: #3d85c6;"&gt;C4E&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;C4 + CPU voltage is reduced even more after the L2 memory cache has been disabled (some calls this C5 which is not the real name of this mode)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 13px; font-weight: bold;"&gt;&lt;span style="color: #6fa8dc;"&gt;C6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;Also known as &lt;/span&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;Deep Power Down&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;When CPU enters this state, it saves its entire architectural state inside a special static (intel) or DRAM (which is fed from an independent power source)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;This allows the CPU internal voltage to be lowered to any value, *&lt;/span&gt;&lt;b&gt;&lt;span style="color: yellow;"&gt;including 0V&lt;/span&gt;&lt;/b&gt;&lt;span style="color: yellow;"&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;-&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 10pt;"&gt;&lt;span style="color: yellow;"&gt;When the CPU is waked up, it loads the previous state of all internal units&lt;/span&gt;&lt;span style="color: yellow;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: yellow;"&gt;from its special static RAM (waking up CPU from this state takes a lot longer)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Lucida Sans Unicode', sans-serif; font-size: 13px;"&gt;&lt;span style="color: yellow;"&gt;Notice that there is only one voltage line for the entire CPU( the only component with a different voltage source is the above mentioned static or DRAM where the entire architectural state is stored) and lowering or turning off the CPU voltage is an all-or-nothing kind of deal; if you turn off the CPU, you have to turn off it entirely when it goes into C6 mode&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-8418917220898249101?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/8418917220898249101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/01/c-states.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8418917220898249101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8418917220898249101'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/01/c-states.html' title='C-States'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-7120935498490835181</id><published>2010-01-03T21:29:00.001-08:00</published><updated>2010-01-03T21:29:11.747-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technical Websites - Linux'/><title type='text'>System Call - Good Man page</title><content type='html'>&lt;a href="http://www.stwikipedia.org/teaching/2105CIT/cgi-bin/man.cgi?system"&gt;http://www.stwikipedia.org/teaching/2105CIT/cgi-bin/man.cgi?system&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-7120935498490835181?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/7120935498490835181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2010/01/system-call-good-man-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7120935498490835181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7120935498490835181'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2010/01/system-call-good-man-page.html' title='System Call - Good Man page'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-8583998475889890991</id><published>2009-12-14T22:09:00.001-08:00</published><updated>2009-12-14T22:09:43.110-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Downloads-Non-Technical-websites'/><title type='text'>Unlocker</title><content type='html'>&lt;a href="http://download.cnet.com/Unlocker/3000-2248_4-10493998.html"&gt;http://download.cnet.com/Unlocker/3000-2248_4-10493998.html&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #353535; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px;"&gt;The application removes file-access restrictions that prevent a user from moving, deleting, or renaming a file. The user right-clicks on a file and selects Unlocker, which displays information regarding the selected file, such as Path Locked, PID, Handle, and Process Path&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-8583998475889890991?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/8583998475889890991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/12/unlocker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8583998475889890991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8583998475889890991'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/12/unlocker.html' title='Unlocker'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-8740231833717263480</id><published>2009-09-10T07:20:00.001-07:00</published><updated>2009-09-10T07:20:47.850-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Non-Technical Websites'/><title type='text'>Free SMS</title><content type='html'>http://www.160by2.com&lt;br /&gt;http://www.way2sms.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-8740231833717263480?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/8740231833717263480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/free-sms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8740231833717263480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8740231833717263480'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/free-sms.html' title='Free SMS'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-972930778015559060</id><published>2009-09-09T03:07:00.000-07:00</published><updated>2009-09-09T11:57:02.076-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technical Websites - Linux'/><title type='text'>Stack Operation</title><content type='html'>&lt;a href="http://www.tenouk.com/Bufferoverflowc/Bufferoverflow3.html"&gt;&lt;span style="color: #33ff33;"&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://www.tenouk.com/Bufferoverflowc/Bufferoverflow3.html&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #33ff33;"&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #ff6600;"&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;(good)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #ff6600;"&gt;&lt;a href="http://abrickshort.wordpress.com/2005/04/10/how-function-calls-work/"&gt;&lt;span style="color: lime;"&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://abrickshort.wordpress.com/2005/04/10/how-function-calls-work&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;(OK)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-972930778015559060?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/972930778015559060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/stack-operation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/972930778015559060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/972930778015559060'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/stack-operation.html' title='Stack Operation'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-3077784556716183680</id><published>2009-09-04T02:15:00.000-07:00</published><updated>2009-09-04T02:30:54.827-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMART - MISC - WINDOWS'/><title type='text'>Setting Default OS to boot in Vista and Windows 7</title><content type='html'>&lt;span style="font-size:85%;"&gt;To set the default OS (in case of dual boot Windows OS) to be either Vista or Windows 7, do the following&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;1. Click "&lt;strong&gt;My Computer" - &gt; Properties&lt;/strong&gt; (You can also go here from "Control Panel"-&gt;"System")&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:georgia;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5377541343018447074" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 261px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_pbIJbHttz2I/SqDdXCuXcOI/AAAAAAAAAMg/hHXxm-O8eB8/s400/1.jpg" border="0" /&gt;&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;&lt;span style="font-size:85%;"&gt;2. Click on "&lt;strong&gt;Advanced System Settings&lt;/strong&gt;" on the left side panel (This will open "Advanced" tab in "System Properties" dialog)&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://4.bp.blogspot.com/_pbIJbHttz2I/SqDdSzviU-I/AAAAAAAAAMY/RVAq_Xxs79o/s1600-h/2.jpg"&gt;&lt;span style="font-family:georgia;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5377541270277346274" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 384px; CURSOR: hand; HEIGHT: 354px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_pbIJbHttz2I/SqDdSzviU-I/AAAAAAAAAMY/RVAq_Xxs79o/s400/2.jpg" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;span style="font-size:85%;"&gt;3. Click on "&lt;strong&gt;Settings" of "Startup and Recovery&lt;/strong&gt;" group&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_pbIJbHttz2I/SqDdPfrQq1I/AAAAAAAAAMQ/aSt8yoof6xI/s1600-h/3.jpg"&gt;&lt;span style="font-family:georgia;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5377541213351095122" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 384px; CURSOR: hand; HEIGHT: 351px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_pbIJbHttz2I/SqDdPfrQq1I/AAAAAAAAAMQ/aSt8yoof6xI/s400/3.jpg" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;&lt;span style="font-size:85%;"&gt; 4. Select the "&lt;strong&gt;Default Operating System&lt;/strong&gt;" in "&lt;strong&gt;System Startup&lt;/strong&gt;" group&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-3077784556716183680?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/3077784556716183680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/setting-default-os-to-boot-in-vista-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3077784556716183680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3077784556716183680'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/setting-default-os-to-boot-in-vista-and.html' title='Setting Default OS to boot in Vista and Windows 7'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pbIJbHttz2I/SqDdXCuXcOI/AAAAAAAAAMg/hHXxm-O8eB8/s72-c/1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-7830377921017635861</id><published>2009-09-04T02:10:00.000-07:00</published><updated>2009-09-04T02:14:44.568-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMART - MISC - WINDOWS'/><title type='text'>Cannot open Control Panel or My Computer Properties</title><content type='html'>If you are using Vista or Windows 7, and if when you try to open &lt;strong&gt;&lt;span style="color:#33ffff;"&gt;Control Panel&lt;/span&gt;&lt;/strong&gt; or "&lt;strong&gt;&lt;span style="color:#66ffff;"&gt;My Computer"-&gt;Properties&lt;/span&gt;&lt;/strong&gt;, sometimes it wont open it. It appears to be loading for few seconds and after that it wont load.&lt;br /&gt;This is due to the &lt;strong&gt;&lt;span style="color:#33ff33;"&gt;corrupted .cpl&lt;/span&gt;&lt;/strong&gt; files.&lt;br /&gt;&lt;br /&gt;To resolve this issue, do the following&lt;br /&gt;&lt;br /&gt;1. Type "&lt;strong&gt;&lt;span style="color:#ffff00;"&gt;services.msc&lt;/span&gt;&lt;/strong&gt;" in the run command&lt;br /&gt;2. Restart "&lt;strong&gt;&lt;span style="color:#ffff00;"&gt;Software Licensing&lt;/span&gt;&lt;/strong&gt;" service&lt;br /&gt;&lt;br /&gt;Now you should be able to open the Control Panel and My Computer Properties.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-7830377921017635861?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/7830377921017635861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/cannot-open-control-panel-or-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7830377921017635861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7830377921017635861'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/cannot-open-control-panel-or-my.html' title='Cannot open Control Panel or My Computer Properties'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-8802988250896789350</id><published>2009-09-03T12:01:00.000-07:00</published><updated>2009-09-03T12:27:41.956-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Common OS Concepts'/><title type='text'>Socket Programming - ASYNCHRONOUS</title><content type='html'>&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;What is Asynchronous Socket Programming?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;"&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FFFF;"&gt;Event-driven&lt;/span&gt;&lt;/b&gt;" programming or "&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FFFF;"&gt;select()&lt;/span&gt;&lt;/b&gt;" based multiplexing&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;A concept of "handling" multiple connections in "single thread/process"&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;When do we need this?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Assume you have to write a server that will be "hit" by "n" number of clients with some requests&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;You would prefer any of the follow&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;synchronous&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: you handle one request at a time, each in turn.&lt;br /&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="color:#FFCC33;"&gt;pros&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: simple&lt;br /&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="color:#FFCC33;"&gt;cons&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: any one request can hold up all the other requests&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;fork&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: you start a new process to handle each request.&lt;br /&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="color:#FFCC33;"&gt;pros&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: easy&lt;br /&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="color:#FFCC33;"&gt;cons&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: does not scale well, hundreds of connections means hundreds of processes.&lt;br /&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;fork()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; is the Unix programmer's hammer. Because it's available, every problem looks like a nail. &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;It's usually overkill&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;threads&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: start a new thread to handle each request.&lt;br /&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="color:#FFCC33;"&gt;pros&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: easy, and kinder to the kernel than using fork, since threads usually have much less overhead&lt;br /&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="color:#FFCC33;"&gt;cons&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: your machine may not have threads, and threaded programming can get very complicated very fast, with worries about controlling access to shared resources.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The best solution would be "select" system call.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;How "select" works?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The normal heirarchy of socket programming calls in the server side would be "&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFCCFF;"&gt;socket()-&gt;bind()-&gt;listen()-&gt;accept()&lt;/span&gt;&lt;/b&gt;".&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;If you notice, here "accept" is the blocking call. In order to avoid this blocking stuff, we use "select" which will "run" through all the connected sockets to check if there are any requests pending for "reading, writing or error conditions". &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;If any requests pending, "select" will return the number of requests pending to be processed.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Hence the heirarchy would be "&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#FFCCFF;"&gt;socket()-&gt; bind()-&gt;listen()-&gt;select()-&gt;accept(&lt;/span&gt;)&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;"&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;But here the disadvantage is that, we need to iterate through all the "&lt;b&gt;connections&lt;/b&gt;" (descriptors) connected to check "&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FFFF;"&gt;Are you the one with pending requests?&lt;/span&gt;&lt;/b&gt;" questions.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-8802988250896789350?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/8802988250896789350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/socket-programming-asynchronous.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8802988250896789350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8802988250896789350'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/socket-programming-asynchronous.html' title='Socket Programming - ASYNCHRONOUS'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-3672484739259843222</id><published>2009-09-03T11:16:00.000-07:00</published><updated>2009-09-03T12:29:59.652-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMART - MISC - WINDOWS'/><title type='text'>To diable Firewall</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: small;"&gt;1. Run "&lt;b&gt;services.msc&lt;/b&gt;" in command prompt&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;2. Go to "&lt;b&gt;Windows Firewall&lt;/b&gt;"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;3. Right click - &gt; Properties. Then you &lt;b&gt;stop &lt;/b&gt;it.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;4. Then you "&lt;b&gt;disable&lt;/b&gt;" it in the startup type and then exit.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-3672484739259843222?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/3672484739259843222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/to-diable-firewall.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3672484739259843222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3672484739259843222'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/to-diable-firewall.html' title='To diable Firewall'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-6408402398422487398</id><published>2009-09-02T10:16:00.000-07:00</published><updated>2009-12-14T22:44:26.631-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technical Websites - Common'/><title type='text'>Socket Programming</title><content type='html'>&lt;b&gt;&lt;span style="color: yellow;"&gt;&lt;span style="font-size: small;"&gt;SOCKET:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="border-collapse: collapse; font-family: arial;"&gt;&lt;a href="http://www.security-freak.net/sockets/socket-programming.html" target="_blank"&gt;&lt;span style="color: #33ffff;"&gt;&lt;span style="font-size: small;"&gt;http://www.security-freak.net/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #33ffff;"&gt;&lt;span style="font-size: small;"&gt;&lt;wbr&gt;&lt;/wbr&gt;sockets/socket-programming.&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #33ffff;"&gt;&lt;span style="font-size: small;"&gt;&lt;wbr&gt;&lt;/wbr&gt;html&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #33ffff;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;(best- video)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="border-collapse: collapse;"&gt;&lt;a href="http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html"&gt;&lt;span style="color: #33ffff;"&gt;&lt;span style="font-size: small;"&gt;http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #33ffff;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;(best - tutorial)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="border-collapse: collapse;"&gt;&lt;a href="http://squirl.nightmare.com/medusa/async_sockets.html"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: #33ffff;"&gt;http://squirl.nightmare.com/medusa/async_sockets.html&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small;"&gt; (good - tutorial)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;CPU Architecture:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;a href="http://74.125.153.132/search?q=cache:s9SPwQo-mc0J:afis.ucc.ie/tbutler/IS3313%2520Lecture%2520Notes/Lecture%25202%2520Basic%2520CPU%2520Architectures.doc+internal+logic+in+the+CPU&amp;amp;cd=8&amp;amp;hl=en&amp;amp;ct=clnk&amp;amp;gl=in"&gt;http://74.125.153.132/search?q=cache:s9SPwQo-mc0J:afis.ucc.ie/tbutler/IS3313%2520Lecture%2520Notes/Lecture%25202%2520Basic%2520CPU%2520Architectures.doc+internal+logic+in+the+CPU&amp;amp;cd=8&amp;amp;hl=en&amp;amp;ct=clnk&amp;amp;gl=in&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;a href="http://homepage.cs.uri.edu/faculty/wolfe/book/Readings/Reading04.htm"&gt;http://homepage.cs.uri.edu/faculty/wolfe/book/Readings/Reading04.htm&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;Computer Memory&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;a href="http://computer.howstuffworks.com/computer-memory3.htm"&gt;http://computer.howstuffworks.com/computer-memory3.htm&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-6408402398422487398?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/6408402398422487398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/technical-websites-common.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/6408402398422487398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/6408402398422487398'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/technical-websites-common.html' title='Socket Programming'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-498666754755855887</id><published>2009-09-02T06:59:00.001-07:00</published><updated>2009-09-03T12:32:22.730-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Packages'/><title type='text'>Glibc, SVN and Qt</title><content type='html'>&lt;span class="Apple-style-span"   style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'Times New Roman';font-size:130%;"&gt;&lt;span class="Apple-style-span"  style="text-align: left;font-family:Georgia;"&gt;&lt;span style="font-family:'Times New Roman',serif;"&gt;&lt;div style="color: rgb(51, 255, 51);"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SUSE:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-style: italic; color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;QT4:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.linuxfromscratch.org/blfs/view/svn/x/qt4.html" style="text-decoration: none; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#FFCCFF;"&gt;http://www.linuxfromscratch.org/blfs/view/svn/x/qt4.html&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-style: italic; color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Installation Guidelines:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;a href="http://doc.trolltech.com/4.4/install-x11.html"&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#FFCCFF;"&gt;&lt;span class="Apple-style-span" style="text-decoration: none;"&gt;http://doc.trolltech.com/4.4/install-x11.html&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;div style="font-style: italic; color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SVN:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic; color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;libapr-1:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;a href="http://www.rpmfind.net/linux/rpm2html/search.php?query=libapr-1.so.0"&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#FFCCFF;"&gt;&lt;span class="Apple-style-span" style="text-decoration: none;"&gt;http://www.rpmfind.net/linux/rpm2html/search.php?query=libapr-1.so.0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic; color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;libaprutil:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;a href="http://software.opensuse.org/search?baseproject=ALL&amp;amp;p=1&amp;amp;q=subversion"&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="text-decoration: none;"&gt;&lt;span class="Apple-style-span"  style="color:#FFCCFF;"&gt;http://software.opensuse.org/search?baseproject=ALL&amp;amp;p=1&amp;amp;q=subversion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic; color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;SVN&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;a href="http://software.opensuse.org/search?baseproject=ALL&amp;amp;p=1&amp;amp;q=subversion"&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="text-decoration: none;"&gt;&lt;span class="Apple-style-span"  style="color:#FFCCFF;"&gt;http://software.opensuse.org/search?baseproject=ALL&amp;amp;p=1&amp;amp;q=subversion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="color: rgb(51, 255, 51);"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;REDHAT and FEDORA&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-style: italic; color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;GLIBC-3.4.9 (64-bit)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;: &lt;/span&gt;&lt;/span&gt;&lt;a target="_blank" href="http://rpm.pbone.net/index.php3/stat/4/idpl/12189689/com/libstdc++-4.4.0-0.20.x86_64.rpm.html"&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span" style="text-decoration: none;"&gt;&lt;span class="Apple-style-span"  style="color:#FFCCFF;"&gt;http://rpm.pbone.net/index.php3/stat/4/idpl/12189689/com/libstdc++-4.4.0-0.20.x86_64.rpm.html&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-style: italic; color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;GLIBC-3.4.9(32 bit)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;: &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-size: small; "&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="color:#FFCCFF;"&gt;http://rpm.pbone.net/index.php3?stat=26&amp;amp;dist=32&amp;amp;size=321482&amp;amp;name=libstdc%2B%2B-4.4.0-0.20.i586.rpm&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-498666754755855887?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/498666754755855887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/glibc-svn-and-qt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/498666754755855887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/498666754755855887'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/glibc-svn-and-qt.html' title='Glibc, SVN and Qt'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-2087031488359663201</id><published>2009-09-02T02:47:00.000-07:00</published><updated>2009-09-02T07:04:45.444-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMART - VISUAL STUDIO'/><title type='text'>unresolved external symbol</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_pbIJbHttz2I/Sp5TEnf52SI/AAAAAAAAALo/ZWk9l4To8OM/s1600-h/2.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 400px; height: 278px;" src="http://4.bp.blogspot.com/_pbIJbHttz2I/Sp5TEnf52SI/AAAAAAAAALo/ZWk9l4To8OM/s400/2.JPG" alt="" id="BLOGGER_PHOTO_ID_5376826343914330402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_pbIJbHttz2I/Sp5SqD6ubZI/AAAAAAAAALg/SillwOzHQaI/s1600-h/1.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 278px;" src="http://3.bp.blogspot.com/_pbIJbHttz2I/Sp5SqD6ubZI/AAAAAAAAALg/SillwOzHQaI/s400/1.JPG" alt="" id="BLOGGER_PHOTO_ID_5376825887686552978" border="0" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="white-space: pre;font-family:Arial;" &gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;font-family:Arial;" &gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 0);"&gt;unresolved external symbol &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 0);"&gt;__imp___CrtDbgReportW&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 0);"&gt;:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;font-family:Arial;" &gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;1. When u get this error, go to visual studio project settings -&gt; C/C++ -&gt;&lt;br /&gt;Code Generation -&gt; RunTime Library has the "debug" enabled (ex: Multi Threaded Debug DLL).&lt;br /&gt;If not enabled, enable it and rebuild again.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;font-family:Arial;" &gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2. Also check if Linker-&gt;Debugging-&gt;Generate Debug Info is on or not&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-2087031488359663201?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/2087031488359663201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/unresolved-external-symbol.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/2087031488359663201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/2087031488359663201'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/09/unresolved-external-symbol.html' title='unresolved external symbol'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pbIJbHttz2I/Sp5TEnf52SI/AAAAAAAAALo/ZWk9l4To8OM/s72-c/2.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-5594619047337036607</id><published>2009-08-16T07:24:00.000-07:00</published><updated>2009-09-09T10:56:32.602-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Good Quotes'/><title type='text'>Good Quotes</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;“It’s supposed to be hard; if it wasn’t  hard everyone would do it. The hard is what makes it great.”   --  Tom Hanks&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;"Being in the right place at the right time won’t  make you a success – unless you’re ready. The important question is: Are you ready?”  --  Johnny Carson&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;If at first you dont' succeed, cal it version 1.0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;If you are willing to admit faults, you have one less fault to admit&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-5594619047337036607?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/5594619047337036607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/08/good-quotes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5594619047337036607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5594619047337036607'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/08/good-quotes.html' title='Good Quotes'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-1780993428964256592</id><published>2009-08-13T22:27:00.000-07:00</published><updated>2009-08-13T22:30:40.814-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMART - VISUAL STUDIO'/><title type='text'>Mentioning Library path for .lib (s)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_pbIJbHttz2I/SoT2OD6g_kI/AAAAAAAAALY/AKrxYVh6MLU/s1600-h/1.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 88px;" src="http://3.bp.blogspot.com/_pbIJbHttz2I/SoT2OD6g_kI/AAAAAAAAALY/AKrxYVh6MLU/s400/1.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5369687377161813570" /&gt;&lt;/a&gt;If you have dependency on some .libs, you &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;cannot&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt; specify this path of .libs in "Include"&lt;/span&gt; path of your project. In order to specify the path, you need to specify the path of .libs in "&lt;span class="Apple-style-span"  style="color:#FFFF33;"&gt;Linker&lt;/span&gt;" as shown, in "&lt;span class="Apple-style-span"  style="color:#33FFFF;"&gt;Additional Library Directories&lt;/span&gt;" of General Category.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-1780993428964256592?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/1780993428964256592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/08/mentioning-library-path-for-lib-s.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/1780993428964256592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/1780993428964256592'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/08/mentioning-library-path-for-lib-s.html' title='Mentioning Library path for .lib (s)'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pbIJbHttz2I/SoT2OD6g_kI/AAAAAAAAALY/AKrxYVh6MLU/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-5171842077171082948</id><published>2009-08-13T01:37:00.000-07:00</published><updated>2009-08-13T01:41:59.898-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMART - WORD DOC'/><title type='text'>Changing the user name while inserting comment</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_pbIJbHttz2I/SoPRuJq7ZDI/AAAAAAAAALQ/mnHKrIi1KSI/s1600-h/1.JPG"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_pbIJbHttz2I/SoPRJTbhw7I/AAAAAAAAALI/vZgmMprvZx8/s1600-h/1.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 154px;" src="http://4.bp.blogspot.com/_pbIJbHttz2I/SoPRJTbhw7I/AAAAAAAAALI/vZgmMprvZx8/s400/1.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5369365138520523698" /&gt;&lt;/a&gt;1. Go to Review Tab.&lt;div&gt;2. Select the "Track Changes" combo&lt;/div&gt;&lt;div&gt;3. Select "Change User Name"&lt;/div&gt;&lt;div&gt;4. In the "Popular" page, at the bottom you wud find "Initials". Enter your initials there.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_pbIJbHttz2I/SoPRuJq7ZDI/AAAAAAAAALQ/mnHKrIi1KSI/s1600-h/1.JPG"&gt;&lt;img src="http://1.bp.blogspot.com/_pbIJbHttz2I/SoPRuJq7ZDI/AAAAAAAAALQ/mnHKrIi1KSI/s400/1.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5369365771555922994" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 400px; height: 88px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-5171842077171082948?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/5171842077171082948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/08/changing-user-name-while-inserting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5171842077171082948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/5171842077171082948'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/08/changing-user-name-while-inserting.html' title='Changing the user name while inserting comment'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pbIJbHttz2I/SoPRJTbhw7I/AAAAAAAAALI/vZgmMprvZx8/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-3762267160780112968</id><published>2009-07-19T12:36:00.000-07:00</published><updated>2009-07-19T13:01:50.460-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Memory Management'/><title type='text'>Data Execution Prevention (DEP)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_pbIJbHttz2I/SmN14--kL0I/AAAAAAAAAKo/Y1pbkwEiUxE/s1600-h/Data_Execution_Prevention_blocked_program.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 233px;" src="http://1.bp.blogspot.com/_pbIJbHttz2I/SmN14--kL0I/AAAAAAAAAKo/Y1pbkwEiUxE/s400/Data_Execution_Prevention_blocked_program.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5360257603339562818" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;DEP is a security feature included in modern Microsoft Windows OS that is intended to &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;prevent an application or service from executing code from a non-executable memory region&lt;/span&gt;&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;It is a system-level memory protection feature that is built into OS starting with Windows XP and Windows Server 2003. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;DEP enables the system to mark &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FFFF;"&gt;one or more pages of memory as non-executable&lt;/span&gt;&lt;/b&gt;. Marking memory regions as non-executable means that &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FF99FF;"&gt;code cannot be run&lt;/span&gt;&lt;/b&gt; from that region of memory, which makes it harder for the exploitation of buffer overruns (&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;buffer overflow&lt;/span&gt;&lt;/b&gt;). It is&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 15px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;a set of hardware and software technologies that perform &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#9999FF;"&gt;additional checks on memory to help protect against malicious code&lt;/span&gt;&lt;/b&gt; exploits.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;This level of pagin has been introduced with AMD64 (the ability to indicate that code should not be executed from a page or a set of pages by setting &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FF6600;"&gt;&lt;i&gt;NX bit = 1&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;; this is &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;63rd bit in 64-bit entry in the page table&lt;/span&gt;&lt;/b&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;This feature is enabled if NO execute bit in &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FFFF;"&gt;Enable Feature Extended Register (EFER.NXE)&lt;/span&gt;&lt;/b&gt; and the &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FFFF;"&gt;PAE in CR4&lt;/span&gt;&lt;/b&gt; are set, regardless of operating mode (this is because x86's original &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;32-bit page table format obviously has no bit 63&lt;/span&gt;&lt;/b&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Modes of Enforcement&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#FFCC33;"&gt;Hardware Enforcemen&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;t: Achieving this DEP using &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33CCFF;"&gt;NX bit (bit number 63) of a 64-bit Page Translation Entry. &lt;span class="Apple-style-span" style="font-size: small;"&gt;It &lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); font-weight: normal; line-height: 15px; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;marks all memory locations in a process as non-executable unless the location explicitly contains executable code. There is a class of attacks that &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;attempt to insert and execute code&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;from non-executable memory locations&lt;/span&gt;&lt;/b&gt;. DEP helps prevent these attacks by intercepting them and raising an exception.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFCC33;"&gt;&lt;i&gt;Software Enforcement&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;: System software (kernel) can &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#66FFFF;"&gt;mark pages&lt;/span&gt;&lt;/b&gt; used for program stacks and data sections as non-executable.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Processor-corresponding features&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;AMD: Enhanced Virus Protection (&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FF99FF;"&gt;EVP in AMD64&lt;/span&gt;&lt;/b&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Intel: Execute Disable (&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FF99FF;"&gt;XD in EM64T&lt;/span&gt;&lt;/b&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-3762267160780112968?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/3762267160780112968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/data-execution-prevention-dep.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3762267160780112968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3762267160780112968'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/data-execution-prevention-dep.html' title='Data Execution Prevention (DEP)'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pbIJbHttz2I/SmN14--kL0I/AAAAAAAAAKo/Y1pbkwEiUxE/s72-c/Data_Execution_Prevention_blocked_program.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-8689062833354687935</id><published>2009-07-19T06:43:00.000-07:00</published><updated>2009-07-19T08:11:34.564-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Memory Management'/><title type='text'>Page State</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Any page in VAS (PAS) of a process can be in one of the three states.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#33FFFF;"&gt;Committed&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: A page state of a page which is &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;mapped to a page frame in physical memory&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; (or to a page-sized entry in a file on disk)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#33FFFF;"&gt;Reserved&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: A page state of a page which been &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;set aside for future use&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; so that it cannot be re-used for any other purpose within the process, but has &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;no associated physical page storage&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#33FFFF;"&gt;Free&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: A page state of a page which is &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FF99FF;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;available to be reserved&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-8689062833354687935?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/8689062833354687935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/page-state.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8689062833354687935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8689062833354687935'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/page-state.html' title='Page State'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-8608188193020310325</id><published>2009-07-18T10:54:00.000-07:00</published><updated>2009-09-03T12:00:01.856-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Common OS Concepts'/><title type='text'>Copy-On-Write</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;b&gt;Copy-On-Write (COW) &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;optimization strategy used in computer systems&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Idea is that if multiple callers ask for resources, they can all be given pointers to the same resource. Now, all "callers" (processes) will be in assumption that &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;"I m holding this X resource; and I can do whatever I want"&lt;/span&gt;&lt;/b&gt;. But, when this "caller" tries to modify its so - called "My resource X", &lt;span class="Apple-style-span"  style="color:#FF99FF;"&gt;&lt;b&gt;a true private copy is created&lt;/b&gt;&lt;/span&gt; actually, to prevent the changes becoming visible to other "callers". &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Hence, the primary advandage is that if a caller never makes any modifications, *NO PRIVATE COPY IS CREATED*.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;In Virtual Memory:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;COW finds its main-use in virtual memory OS; when a process creates a copy of itself (fork), the pages in memory that might be modified by either the process or its copy, are marked "Copy-On-Write".&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;When one process modifies the memory, the OS kernel intercepts the operation and copies the memory so that changes in one process's memory are not visible to other&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;COW and MMU&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;COW can be implemented by telling MMU that certain pages in the process's address space are &lt;span class="Apple-style-span"  style="color:#FF99FF;"&gt;read only&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;When data is written to these pages, MMU raises an exception which is handled by kernel, which allocates new space in physical memory and makes the page being written to correspond to that new location in physical memory&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-8608188193020310325?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/8608188193020310325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/copy-on-write.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8608188193020310325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8608188193020310325'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/copy-on-write.html' title='Copy-On-Write'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-1009351081205229363</id><published>2009-07-18T10:32:00.000-07:00</published><updated>2009-07-19T08:12:50.753-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Memory Management'/><title type='text'>Basics of Memory Management</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Memory Manager:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Implements virtual memory, provides a core set of services such as memory mapped files, copy-on-write memory, large memory support and underlying support for the cache manager.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;(For details on Copy-on-Write &lt;/span&gt;&lt;/span&gt;&lt;a href="http://spot-myblog.blogspot.com/2009/07/copy-on-write.html"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://spot-myblog.blogspot.com/2009/07/copy-on-write.html&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Each process on a 32-bit Windows OS has a virtual address space (&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;PAS&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;) of 4GB (&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;It is 8TB for a process in 64-bit Windows&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;). Threads cannot access memory that belongs to another process, which protects a process from being corrupted by another process.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;VAS (PAS):&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;VAS for a process is the set of virtual memory addresses that it can use. The address space of a process P1, cannot be accessed by other process(es) P2, *&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;unless it is shared&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;*. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;This PAS does not represent the actual physical location in memory; instead the system maintains a &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Page Table &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;for each process (an internal data structure used to translate VA to PA). Each time a thread references an address, the system translates the VA to PA.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;VAS for 32-bit (Windows) process  is divided into two partitions; one for process itself and the other for kernel. Default partition will be&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2GB:2GB (0x00000000 - 0x7FFFFFFF: 0x80000000 - 0xFFFFFFFF)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;If &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;4GT (4GB Tuning)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; is enabled, then it will be &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;3GB:1GB (0x00000000 - 0xBFFFFFFF: 0xC0000000 - 0xFFFFFFFF)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;After 4GT, the process that has &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#FF99FF;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;IMAGE_FILE_LARGE_ADDRESS_AWARE &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;flag set in its image header will have access to the additional 1GB of memory above the low 2GB.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;IMPORTANT NOTE:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;We can adjust the VAS of 32-bit process, using the following command, which sets a boot entry option that configures the size of the partition that is available for use by the process to a value between &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2048 MB (2GB) and 3072 MB(3GB)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;                          &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FF99FF;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;BCDEdit /set increaseuserva &lt;&lt;/span&gt;&lt;/span&gt;&lt;t&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;XYZ Megabytes&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;xyz&gt;&lt;/xyz&gt;&lt;/span&gt;&lt;/span&gt;&lt;/t&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;after which, partition would be like (&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#66FF99;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;0x00000000 - XYZ: XYZ+1 - 0xFFFFFFFF&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Working Set:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The subset of VAS of a process that resides in physical memory is known as "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Working Set&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;If the thread of a process attemt to use more physical memory than is currently available, the kernel, "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#FFCCCC;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;pages" (swaps)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; some of the memory contents to disk (the total amount of VAS available to a process is limited by physical memory and the free space on disk available for the paging file)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Physical storage and the VAS of each process are organized into "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;pages&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;", units of memory, whose size depends on the host computer (usually 4 KB for x86 computers - Use &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;GetSystemInfo &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;API to get the page size)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;When a thread needs space in RAM, the kernel moves the "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#66FFFF;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;l&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#66FFFF;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;east recently used&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;" pages in RAM to paging file in disk.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;When a thread references a page that is not a part of Working Set (means not present in main memory, a &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#FF99FF;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;"page fault"(called Page Exception)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; occurs, on which Kernel's Page Fault Handler attempts to resolve the page fault (by "&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Demand Paging&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;") and if it succeeds, the page is added to the working set.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Hard Page Fault&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: Occurs when the &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#66FFFF;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;demanded page is not on Main Memor&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="color:#66FFFF;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;y&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Soft Page Fault&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: Occurs when the &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#66FFFF;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;demanded page is on Main memory but in the working set of some other process &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;or if it is demanded for the first time (called "Demand-Zero" fault)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Process can reduce or empty its working set by calling "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;SetProcessWorkingSetSize&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;" or "&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;EmptyWorkingSet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;" functions&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;PS: The details on the page state at &lt;span class="Apple-style-span" style="font-family: Georgia; "&gt;&lt;a href="http://spot-myblog.blogspot.com/2009/07/page-state.html"&gt;http://spot-myblog.blogspot.com/2009/07/page-state.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-1009351081205229363?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/1009351081205229363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/basics-of-memory-management.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/1009351081205229363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/1009351081205229363'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/basics-of-memory-management.html' title='Basics of Memory Management'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-139776387410809534</id><published>2009-07-14T11:44:00.000-07:00</published><updated>2009-07-18T12:41:30.308-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DLL'/><title type='text'>DLL - Programming basics</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Points to be noted:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;__declspec(&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;storage_class_specifier&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; : Declares the following class or function to be exported/imported (mainly). For example, &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#33FF33;"&gt;&lt;b&gt;__declspec(dllexport) void func() {}&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; implies, func() is exported for applications use&lt;/span&gt;&lt;/span&gt;&lt;/storage_class_specifier&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Wondering, when my app could not able to get the handle of exported APIs when the .h file of DLL had the definitions. &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;When i &lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FF99FF;"&gt;moved the definitions to .cpp file of DLL project, my app could get the handle successfully&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;If using visual studio, you can use "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#66FFFF;"&gt;Pre-Build Event&lt;/span&gt;&lt;/b&gt;" (under Build Events) to copy the DLL to the app folder&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;When using LoadLibrary call, due to UNICODE probs, the dll may not get loaded. Hence use &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;_T&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; casting like &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;b&gt;hHandle = LoadLibrary( _T ( "mydll.dll" ) );&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;To check the "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;sections&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;" contained in the DLL, open the &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Visual Studio command prompt&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; (not the normal windows prompt) and go to the directory which has the dll file, and type &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;dumpbin /exports mydll.dll&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#330033;"&gt;&lt;b&gt;===============================&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#330033;"&gt;&lt;b&gt;       &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#330033;"&gt;&lt;b&gt;DLL CODE&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#330033;"&gt;&lt;b&gt;===============================&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/* &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;* This is .h file of a DLL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;#include &lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;t&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;t&gt;&lt;/t&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/t&gt;&lt;t&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;windows.h&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/t&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/* If we try to export all the APIs to the app by preceding each API with __declspec(dllexport)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;*   then the corresponding API will always be exported even when app does not require it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;*   For this very reason, DLL developer tries to export it from his project, where as the &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;*   app developer, will try to import it in his code. */&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;#if defined EXPORT_DIR&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;#define DECLAPI  __declspec( dllexport )&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;#else&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;#define DECLAPI  __declspec( dllimport )&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;#endif&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/* Tell the compiler that its OK to use these APIs in either C or C++ */&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;extern "C"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;DECLAPI int addition( int a, int b );&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;DECLAPI int multiply( int a, int b );&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/* &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;* This is .cpp file of DLL project&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;#include "mydll.h"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/* [Important]: Define this macro to try to export the APIs (even though not catched by apps) */&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;#define EXPORT_DIR&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;extern "C"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;DECLAPI int addition ( int a, int b ) { return a + b; }&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;DECLAPI int multiply ( int a, int b ) { return a * b; }&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#330033;"&gt;&lt;b&gt;================================&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#330033;"&gt;&lt;b&gt;       &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#330033;"&gt;&lt;b&gt;APP Code&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#330033;"&gt;&lt;b&gt;================================&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/*&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;* This is the application which uses the DLLs&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;#include &lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;t&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;iostream&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/t&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;#include &lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;t&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;windows.h&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/t&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;typedef int ( *Addition ) ( int, int );&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;typedef int ( *Multiply ) ( int, int );&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;int main()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;HINSTANCE hInstance;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Addition additionPtr;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Multiply multiplyPtr;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;hInstance = LoadLibrary( _T ( "mydll.dll" ) );&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;if( hInstance )&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;additionPtr = ( Addition ) GetProcAddress ( hInstance, "addition" );&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;multiplyPtr = ( Multiply ) GetProcAddress ( hInstance, "multiply" );&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;if( additionPtr ) &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;printf( "DLL addition called and sum: %d.\n", additionPtr( 10, 5 ) );&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;if( multiplyPtr )&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;printf( "DLL multiply called and sum: %d.\n", multiplyPtr( 10, 5 ) );&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;FreeLibrary( hInstance );&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;else&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;printf( "Failed to load mydll.dll!!!!..\n" );&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;return 0;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-139776387410809534?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/139776387410809534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/dll-programming-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/139776387410809534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/139776387410809534'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/dll-programming-basics.html' title='DLL - Programming basics'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-639634240522630782</id><published>2009-07-13T12:44:00.000-07:00</published><updated>2009-07-18T08:13:31.877-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIOS - MBR - Booting Sequence'/><title type='text'>BIOS Boot Sequence - A Closer Look</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_pbIJbHttz2I/SluQY0bxk_I/AAAAAAAAAI8/R-SNuoAIccI/s1600-h/3.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 306px;" src="http://2.bp.blogspot.com/_pbIJbHttz2I/SluQY0bxk_I/AAAAAAAAAI8/R-SNuoAIccI/s400/3.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5358034937753736178" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Internal power supply turns on, initializes and then takes few moments to generate reliable power for rest of the system. If power received is not within expectd parameters (by chipset and subsequently processor), then the &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;chipset will generate a reset signal to the processor&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; in the same fashion as you were to touch the reset button. This will continue until motherboard receives "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Power Goo&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;d&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;" signal from power supply&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Since processor has no idea on what to do next as there is nothing to execute in memory, it has been designed to look at the same place in the system, the &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BIOS ROM&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, for the small bit of startup code to begin the boot process (&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;CS = 0xFFFF and EIP = zero =&gt; 0xFFFF0&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;). Since there are &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;16 bytes (total is FFFFF)&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, this location contains &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;just a "jump"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; instruction telling the processor where to go to find the real BIOS startup program (see the diagram).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BIOS then performs &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;POST &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;(Power-On Self Test). If there are any fatal errors, the boot process stops. If the POST is successful, the BIOS calls&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; INT 19&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; (Interrupt 19) and then proceeds to look for devices attached to the motherboard&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BIOS enables the video&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: The BIOS code begins searching by looking for a video card, and video card's built in BIOS program (normally at 0xC000 in memory) and if found, it runs it.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Once video is enabled, the BIOS begins searching for other &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;devices that may have their own ROM and whether ROM has its own BIOS code&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. Normally, the &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;floppy driver is located at 0000:7c00 and the IDE/ATA HDD BIOS will be found at C8000h&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. If any of these is found, their codes are executed. If during this INT 19 process, any other device BIOS's are found, they are executed as well&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BIOS displays its startup screen, which provides some key information about the BIOS as well as other system information&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BIOS then performs some kind of inventory of the hardware installed in the system and then communicates or interrogates it to ensure that the hardware is functioning (at this stage, &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BIOS will populate BIOS table, can be ACPI table&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, if the system is ACPI compliant. This table can be used by several purposes including power management, by the OS applications)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;During the final phase of POST and BIOS boot process, the BIOS will display a &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;summary screen with your systems' configuration&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;NOW, BIOS finishes what it needs to do, it begins searching for a drive to boot an OS. If its searching a hard disk, &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;it looks for a MBR at cylinder 0, head 0 and sector 1&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, the first sector on the disk. If its searching for Floppy disk, it looks at the same address on the floppy disk for a volume boot sector&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Once the boot sector is found, BIOS starts the process of booting OS by using the info in &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;boot sector&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. If its floppy, t&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;he boot sector is also read into memory at 0000:7C00 and then MBR program itself jumps to memory location 0000:7c00&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; (NOTE: Each OS has its own boot sector format. The next step involves the small program in the boot sector locating the first part of OS's kernel loader proram or in some cases the kernel itself or perhaps a boot manager program, and read then that into memory. In windows, this kernel loader referred to as &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;NTLDR&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;If no boot device of any type can be found, the system will display an error message and stop.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;NOTE: This entire process is called as "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;cold boot&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;" (since the machine was off, or cold, when it started). A "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;warm boot&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;" also known as "soft boot" is the same thing except it occurs when the machine is rebooted using&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; Ctrl+Alt+Del keys&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. In this case, &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;POST is skipped&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; and boot process continues at roughly step 8 above. As a side note, INT19 is also called when the CTRL+ALT+DEL keys are used.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-639634240522630782?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/639634240522630782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/system-boot-sequence-closer-look.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/639634240522630782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/639634240522630782'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/system-boot-sequence-closer-look.html' title='BIOS Boot Sequence - A Closer Look'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pbIJbHttz2I/SluQY0bxk_I/AAAAAAAAAI8/R-SNuoAIccI/s72-c/3.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-7340337698718405534</id><published>2009-07-13T11:37:00.000-07:00</published><updated>2009-07-18T08:14:58.186-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIOS - MBR - Booting Sequence'/><title type='text'>MBR and its necessary</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1. When you turn on your PC, the processor does not really have &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;anything&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; to execute or even know where to look for it. To ensure that the PC will always boot regardless of BIOS, bot chip and BIOS manufractures developed their code so that the processor, once turned on, always starts executing at the same place, &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;FFFF0h&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. This magical address is called "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;reset vector&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;(NOTE: Similarly, every hard disk must have a consistent "starting point" where the key information is stored about the disk, such as &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;number of partitions and their type&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;s. There also must be someplace where the BIOS can load the &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;initial boot program&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; that starts the &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;process of loading the OS&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; and this place is called &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Master Boot Record - MBR&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, also referred to as Master Boot Sector - MBS or even just Boot Sector - BS)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_pbIJbHttz2I/SluBBtW81PI/AAAAAAAAAIs/sa_T_8BgvSI/s1600-h/1.JPG"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 221px;" src="http://4.bp.blogspot.com/_pbIJbHttz2I/SluBBtW81PI/AAAAAAAAAIs/sa_T_8BgvSI/s400/1.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5358018048043046130" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;2. MBR is always located at &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;cylinder 0, head 0 and sector &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, the first sector on the disk (&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;512 bytes&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;). When a computer starts and the BIOS boots the machine, it will always look at this &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;first sector for instructions and information on how to proceed with the boot process and load the OS.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_pbIJbHttz2I/SluGuvYFSlI/AAAAAAAAAI0/IM_SsgdT_S8/s1600-h/2.JPG"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img src="http://1.bp.blogspot.com/_pbIJbHttz2I/SluGuvYFSlI/AAAAAAAAAI0/IM_SsgdT_S8/s400/2.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5358024319236917842" style="cursor: pointer; width: 400px; height: 169px; " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;3. MBR contains following structures&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Master Partition Table (MPT): Small bit of code that is referred to as a table contains a complete &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;description of the partitions that are contained on the HDD&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. (Alas!!.. when the developers designed the size of this MPT, they left juz enuf room for description of 4 partitions, and hence the four partition [four physical partitions] limit. Any additional partions must be logical partitions that are linked to (or are part of) one of the primary partitions.) One of these partitions is marked as &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;active&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, indicating that it is the one that the computer should used to continue the boot process&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Master Boot Code (MBC): MBC is a small bit of computer code that the &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BIOS loads and executes to start the boot process&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. This code, when fully executed transfers control to boot program stored in &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;boot (active) partition to load the operating system&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; (NOTE: &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;MBC is the first program executed when you turn on your PC, and is often the target of a virus&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;4. BIOS however, does not care about any of this: it simply loads the contents of the MBR into memory location &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;0x7c00 &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;and jumps to that location to start executing whatever code is in the MBR.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Traditionally, Microsoft MBR code takes a look at the partition table, finds the (only) partition marked as active, loads the boot sector for &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;that&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;partition, and runs that code. &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;This boot sector is the first sector of a partition&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, as opposed to the first sector for the whole disk. If something is wrong with the partition table, you would get messages like "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Invalid Partition Table" or "Missing Operating System&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;". This message does not come from BIOS but rather from MBR code loaded from disk.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Linux boot loaders LiLo and GRUB (GRand Uniform Boot) loader can handle a wide variety of OSs, file systems and boot configurations. Their MBR code does not necessarily follow the "&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;boot the active partition&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;" approach described above. But functionally the process goes like this:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1. MBR itself contains the first stage of boot loader. &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;GRUB calls this stage 1.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;2. Due to its tiny size, the code in MBR does just enuf to &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;load another sector from disk that contains additional bootstrap code&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. This sector might be the boot sector for a partition, but could also be a sector that was hard-coded into the MBR code when the MBR was installed.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;3. MBR code plus code loaded in step 2, then read a file containing the second stage of the boot loader. In GRUB, this is &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;GRUB Stage 2&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, and in Windows Server, this is &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;C:\NTLDR&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. If step 2 fails in windows, you 'd get message like "NTLDR is missing". This stage 2 code then reads a &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;boot configuration file (eg., grub.conf in GRUB, boot.ini in windows&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;). It then presents boot choices to the user or simply goes ahead in a single-boot system.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;4. At this point, the boot loader code needs to fire up a kernel. It must know enuf about file systems to read the kernel from the boot partition. In Linux, this means &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;reading a file like "vmlinuz-2.6.22-14-server" containing the kernel,&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; loading the file into memory and jumping to the kernel bootstrap code. In Windows Server 2003, some of the &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;kernel start-up code is separte from the kernel image itself &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;and is actually embedded into NTLDR. After performing several initializations, &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;NTLDR loads the kernel image from file C:\Windows\System32\ntoskrnl.exe, just as GRUB does&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, jumps to kernel entry point.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-7340337698718405534?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/7340337698718405534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/mbr-and-its-necessary.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7340337698718405534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7340337698718405534'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/mbr-and-its-necessary.html' title='MBR and its necessary'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pbIJbHttz2I/SluBBtW81PI/AAAAAAAAAIs/sa_T_8BgvSI/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-4885678964141528368</id><published>2009-07-06T11:44:00.000-07:00</published><updated>2009-07-06T12:32:22.522-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Server Technologies - IPMI'/><title type='text'>What is IPMI basic working "algorithm"?</title><content type='html'>&lt;div&gt;Block Diagram of IPMI&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_pbIJbHttz2I/SlJG4zliEyI/AAAAAAAAAIc/lfrkAl9D2ck/s1600-h/Block_big.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 245px;" src="http://2.bp.blogspot.com/_pbIJbHttz2I/SlJG4zliEyI/AAAAAAAAAIc/lfrkAl9D2ck/s400/Block_big.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5355420848631190306" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-4885678964141528368?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/4885678964141528368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/what-is-ipmi-basic-working-algorithm.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4885678964141528368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4885678964141528368'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/what-is-ipmi-basic-working-algorithm.html' title='What is IPMI basic working &quot;algorithm&quot;?'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pbIJbHttz2I/SlJG4zliEyI/AAAAAAAAAIc/lfrkAl9D2ck/s72-c/Block_big.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-1459714464347040534</id><published>2009-07-06T11:19:00.000-07:00</published><updated>2009-07-18T11:16:43.242-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Server Technologies - IPMI'/><title type='text'>What is IPMI?</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1. What is "Platform Management"?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Monitoring and control functions that are built in to the platform hardware and primarily used for the purpose of monitoring the health of the system hardware (includes monitoring elements such as System Temperatures, voltages, fans, power supplies, bus errors, system physical security etc)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Inventory, monitoring, logging and recovery functions&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;2. What is "Intelligent Platform Management (IPM)"?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The above functions available independent of the main processors, BIOS and OS.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Also available when the system is in powered down state.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;3. What is "Intelligent Platform Management Interface (IPMI)"?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Hardware level interface specification providing "above" functions, that can be exposed thro' standard management software interfaces such as DMI, WMI, CIM, SNMP etc (see fig below)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_pbIJbHttz2I/SlJDhueCMWI/AAAAAAAAAIM/WieAW9g9lyQ/s1600-h/Block_mini.JPG" style="text-decoration: none;"&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img src="http://1.bp.blogspot.com/_pbIJbHttz2I/SlJDhueCMWI/AAAAAAAAAIM/WieAW9g9lyQ/s320/Block_mini.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5355417153585688930" style="cursor: pointer; width: 320px; height: 106px; " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-1459714464347040534?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/1459714464347040534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/what-is-ipmi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/1459714464347040534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/1459714464347040534'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/07/what-is-ipmi.html' title='What is IPMI?'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pbIJbHttz2I/SlJDhueCMWI/AAAAAAAAAIM/WieAW9g9lyQ/s72-c/Block_mini.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-3777748974181518916</id><published>2009-06-09T05:57:00.001-07:00</published><updated>2009-07-18T08:17:32.204-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technical Websites - Linux'/><title type='text'>More on RPM Files and Spec Files</title><content type='html'>&lt;span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="color:#3333FF;"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;white&gt;&lt;a href="http://linuxshellaccount.blogspot.com/2008/03/beginning-your-spec-file-for-building.html"&gt;http://linuxshellaccount.blogspot.com/2008/03/beginning-your-spec-file-for-building.html&lt;/a&gt;&lt;/white&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-3777748974181518916?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/3777748974181518916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/more-on-rpm-files-and-spec-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3777748974181518916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3777748974181518916'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/more-on-rpm-files-and-spec-files.html' title='More on RPM Files and Spec Files'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-8595972956396038405</id><published>2009-06-04T03:40:00.001-07:00</published><updated>2009-07-18T08:18:26.348-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compiler - Linker - Loader'/><title type='text'>How the EXE is loaded into main memory for execution - The system Program Loader</title><content type='html'>&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;Once &lt;bold&gt;&lt;red&gt;BIOS&lt;/red&gt;&lt;/bold&gt; hands control over to the OS, you may then request execution of a program.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;NOTE: The program can be either .COM or .EXE. A .COM program is useful as a small utility program or as a resident program (one that is installed in memory and is available while other programs run). In real mode, an .EXE program consists of separate code, data and stack segments and is the method used for more serious programs.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;When you double click on an .EXE program (when you request the system to load an .EXE program from disk into memory for execution), the System Program Loader performs following steps&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;Accesses the .EXE program from disk&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;Constructs a 256-byte (100H) Program Segment Prefix (PSP) on a paragraph boundary in available internal memory (NOTE: PSP is a data structure used in DOS systems to store the state of a program)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;Stores the program in memory immediately following PSP&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;Loads the address of PSP in DS and ES registers&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;Loads the address of code segment in CS register and sets the IP register to the offset of the first instruction (usually zero) in the code segment&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;Loads the address of the stack in SS register and sets the SP register to the size of the stack&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;Transfers control to the program for execution, beginning usually with the first instruction in the code segment&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-8595972956396038405?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/8595972956396038405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/how-exe-is-loaded-into-main-memory-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8595972956396038405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8595972956396038405'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/how-exe-is-loaded-into-main-memory-for.html' title='How the EXE is loaded into main memory for execution - The system Program Loader'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-4366157906730642692</id><published>2009-06-04T03:29:00.000-07:00</published><updated>2009-07-18T08:12:12.845-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIOS - MBR - Booting Sequence'/><title type='text'>The BIOS Boot Process</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1. Turning on Computers' power causes the processor to enter a reset state, clears all memory locations to zero, perform a parity check of memory and set the &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;CS register to segment address FFFFh and IP register to zero.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;2. Hence the first instruction to execute, therefore is at address formed by &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;CS:IP pair, which is FFFF0H, &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;the entry point to BIOS in ROM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;3. BIOS routine at FFFF0H checks the various ports to identify and initialize devices taht are attached to the computer and provides services that are used for reading to and for writing from the devices.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;4. BIOS then establishes two data areas - &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;IVT (Interrupt Vector Table): Begins in low memory at location 0 and contains 256 4-bytes address in the form of segment:offset (Both &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BIOS and OS uses these IVT&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; for interrupts that occur)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BIOS data Areas: Beginning at location &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;400H&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, largely concerned with the status of attached devices&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;5. BIOS next determines whether a disk containing the system files is present and, if so, it accesses the bootstrap loader from the disk&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;6. This &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BSP (Boot strap program)&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; loads system files from the disk into memory and transfers control to them (System files contains device drivers and other hardware-specific code which initializes internal system tables and the systems' portion of IVT)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;NOTE: When a user program requests an IO services of OS, it transfers request to BIOS, which in turn accesses requested device. Sometimes, program makes requests directly to BIOS, such as keyboard and screen services. At other times, a program can bypass both OS and BIOS to access a device directly&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-4366157906730642692?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/4366157906730642692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/bios-boot-process.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4366157906730642692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4366157906730642692'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/bios-boot-process.html' title='The BIOS Boot Process'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-4692216969007433501</id><published>2009-06-04T02:40:00.001-07:00</published><updated>2009-07-18T08:14:19.475-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Processor specific'/><title type='text'>CPU Registers</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;CPU registers are classified into five categories as follows&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Segment registers&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Pointer registers&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;General Purpose registers&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Index registers&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Flags register&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1. Segment registers&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Segments (20-bit wide) are special areas defined in a program for containing the code, the data and stack.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;segment begins on a paragraph boundary; that is at a location evenly divisible by 16&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;segment registers are 16-bit size and contains starting address of the segment (Reason: &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;since segments are starting on a paragraph boundary, the designers decided that it would be unnecessary to store the zero digit in the segment register&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Offset is 16 bits wide&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; (and is specified in Pointer registers described later)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Further classified into Code, data, stack and extra - corresponds to CS, DS, SS, ES, FS and GS registers&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;2. Pointer registers&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Pointer registers are 32-bit EIP, ESP and EBP; the rightmost are IP, SP and BP respectively (16-bit wider as mentioned above)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;IP register is associated with CS register (as CS:IP =&gt; Segment:Offset)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Example - Segment address in CS                             39B40h&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;      Offset address in IP                                   +0514h&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;             &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;------------&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;      Address of next instruction                  3A054h&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;             &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;------------&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SP register is associated with SS register (as SS:SP =&gt; Segment:Offset)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Example - Segment address in SS                             39B40h&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;      Offset address in SP                                   +0514h&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;             &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;------------&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;      Address in stack&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;                         3A054h&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;             &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;------------&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BP facilitates referencing parameters, which are data and addresses that a program passes via the stack. &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Processor combines the address in SS with the offset in BP&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. BP can also be combined with &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;DI and with SI&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; as a base register for special addressing.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;3. General Purpose registers&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32-bit general purpose registers&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;AX - primary accumulator - used for operations involving input/output and most arithmetic - more efficient compared to other registers&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BX - base register - only register used as an index to extend addressing - can also be combined with DI or SI as a base register for special addressing&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;CX - count register - may contain a value to control the number of times a loop is repeated or a value to shift bits left or right&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;DX - data regsiter - works with AX sometimes, to compute operations that involve large values&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;4. Index registers&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SI (soure index) - may be required for some string (character) handling operations - in this context, SI is associated with DS register (as DS:SI)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;DI (destination index) - is required for some string operations - in this context, DI is associated with ES register&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;5. Flags register&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;32 bit wder&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;OF (overflow), IF (interrupt), TF (trap), SF (sign), ZF (zero), AF (auxiliary carry), PF (parity) and CF (carry)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_pbIJbHttz2I/SiedWWrXqZI/AAAAAAAAAGs/gr2_pL3GHfo/s1600-h/untitled.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 23px;" src="http://2.bp.blogspot.com/_pbIJbHttz2I/SiedWWrXqZI/AAAAAAAAAGs/gr2_pL3GHfo/s320/untitled.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5343412490268551570" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-4692216969007433501?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/4692216969007433501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/cpu-regsiters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4692216969007433501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/4692216969007433501'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/cpu-regsiters.html' title='CPU Registers'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pbIJbHttz2I/SiedWWrXqZI/AAAAAAAAAGs/gr2_pL3GHfo/s72-c/untitled.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-8017365651532602507</id><published>2009-06-04T01:43:00.000-07:00</published><updated>2009-06-04T02:30:16.461-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Processor specific'/><title type='text'>Execution unit and Bus Interface Unit</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_pbIJbHttz2I/SieTyGJTfFI/AAAAAAAAAGk/PXYhH1ffBVI/s1600-h/untitled.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 281px;" src="http://1.bp.blogspot.com/_pbIJbHttz2I/SieTyGJTfFI/AAAAAAAAAGk/PXYhH1ffBVI/s320/untitled.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5343401971750763602" /&gt;&lt;/a&gt;Processor is partitioned into two logical units&lt;div&gt;1. Execution unit (EU) - to execute instructions&lt;/div&gt;&lt;div&gt;2. Bus Interface Unit (BIU) - to deliver instructions and data to EU&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Execution unit:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Maintains CPU status and control flags&lt;/li&gt;&lt;li&gt;manipulates general registers and instruction operands. (Registers and data paths are 16 bits wider)&lt;/li&gt;&lt;li&gt;has no connection to "outside world". &lt;/li&gt;&lt;li&gt;obtains instructions from Instruction Q maintained by BIU.&lt;/li&gt;&lt;li&gt;when an instruction requires access to memory or to a peripheral device, EU requests the BIU to obtain or store the data&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_pbIJbHttz2I/SieSrWcgw3I/AAAAAAAAAGc/1lQ-c7V_Jhs/s1600-h/untitled.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 207px;" src="http://3.bp.blogspot.com/_pbIJbHttz2I/SieSrWcgw3I/AAAAAAAAAGc/1lQ-c7V_Jhs/s320/untitled.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5343400756355580786" /&gt;&lt;/a&gt;&lt;div&gt;Bus Interface unit:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;performs all bus operations for EU&lt;/li&gt;&lt;li&gt;data transferred between CPU and momory/IO devices upon demand from EU&lt;/li&gt;&lt;li&gt;during periods, when EU is busy executing instructions, the BIU "looks ahead" and fetches more instructions from memory.&lt;/li&gt;&lt;li&gt;these instructions are stores in an internal RAM array called "Instruction Stream Q" - from which EU takes instructions to execute&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-8017365651532602507?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/8017365651532602507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/execution-unit-and-bus-interface-unit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8017365651532602507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8017365651532602507'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/execution-unit-and-bus-interface-unit.html' title='Execution unit and Bus Interface Unit'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pbIJbHttz2I/SieTyGJTfFI/AAAAAAAAAGk/PXYhH1ffBVI/s72-c/untitled.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-2167768295434862304</id><published>2009-06-04T01:25:00.001-07:00</published><updated>2009-06-04T01:30:05.263-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Processor specific'/><title type='text'>Processor history</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_pbIJbHttz2I/SieGAod_YGI/AAAAAAAAAGU/1PK6Mxep2_o/s1600-h/untitled.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 150px;" src="http://3.bp.blogspot.com/_pbIJbHttz2I/SieGAod_YGI/AAAAAAAAAGU/1PK6Mxep2_o/s320/untitled.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5343386828319711330" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-2167768295434862304?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/2167768295434862304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/processor-history.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/2167768295434862304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/2167768295434862304'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/06/processor-history.html' title='Processor history'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pbIJbHttz2I/SieGAod_YGI/AAAAAAAAAGU/1PK6Mxep2_o/s72-c/untitled.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-8095518897743461060</id><published>2009-05-14T10:49:00.000-07:00</published><updated>2009-05-16T11:47:28.566-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Kernel'/><title type='text'>How the Linux Kernel Boots</title><content type='html'>&lt;blockquote&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;1. Computer is powered ON &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;(Now the RAM chips contains random data and no OS is running)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;2. Special Hardware circuit raises the logical value o&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;f&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 102);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;RESET &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;pin of the CPU&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;3. On RESET, some registers of the processor (&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 102);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;including cs and eip&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt; are set to fixed values and the code found at physical address&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;0xffff fff0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;is executed&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Note this address is mapped by the hardware to a certain read-only, persistent memory chip called ROM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 204, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;S&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;et of programs stored in ROM is traditionally called Basic Input/Output System (BIOS). This includes several interrupt-driven low-level procedures that make up the computer&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 255);"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;(Some OSs, such as MSDOS rely on BIOS to implement most system calls)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;4. Linux is forced to use BIOS in &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;bootstrapping &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;phase to retrieve the kernel image from the disk or from some other external device. The BIOS bootstrap program does &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt; Executes&lt;/span&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;POST (Power-On Self-Test)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to make note of the devices present and its working condition (Recent computers make use of ACPI)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Initializes the hardware devices to make sure all hardware devices operates without conflicts on the IRQ lines and I/O pots&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Searches for OS to boot. Depending on BIOS setting,&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 255, 255);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;the BSP may try to access first sector (boot sector) of floppy disk, hard disk and CD-ROM in the system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;(order can be changed)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Once valid OS image found in the first sector, it&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;copies the contents of its first sector into RAM starting from physical address 0x0000 7c00&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;and then jumps into that address and executes the code just loaded (see below description without fail!!)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;NOTE: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Boot loader is the program invoked by BIOS to load the image of an operating system kernel into RAM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;. &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Here, booting from floppy disk is as simple as loading the instructions in its first sector into the RAM. (These instructions copy all the remaining sectors containing the kernel image into RAM).  But&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 255, 255);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;booting from !hard-disk! is done differently&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;. &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt; First sector of hard disk is&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;MBR (partition table + a small pgm which loads the first sector of the partition containing the OS to be started&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;5. A two-stage boot loader is required to boot a linux kernel from disk&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;LILO (LInux LOader)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;GRand Unified Bootloader (GRUB)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;[More advanced than LILO as it recognizes several disk-based filesystems and is thus capable of reading portions of the boot program from files]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;LILO may be installed either on MBR (replacing the small program that loades the boot sector of the active partition) or in the boot sector of every disk partition. In both cases, LILO is executed at boot time, and the user may choose which OS to load.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Now what does the LILO boot loader actually does...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Invokes a BIOS proceduce to display a "loading" message&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Invokes BIOS procedure to load an initial portion of kernel image from disk: the&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;first 512 bytes of the kernel image are put in RAM at address &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0x0009 0000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;, while the&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;code of the *setup()* function (discussed below) is put in RAM starting from address &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0x0009 0200&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Invokes a BIOS procedure to load the rest of the kernel image from disk and puts the image in RAM starting from either low address&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0x0001 0000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;(for small kernel images compiled with "make zImage" =&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;"loaded low" kernel image&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;) or high address&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0x0010 0000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;(for big kernel images compiled with "make bzImage" =&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;"loaded high" kernel image&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Jumps to the&lt;/span&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(153, 153, 255);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;setup()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;code (this assembly language function is placed by the linker at offset 0x200 of the kernel image file. Hence, LILO can easily locate this and copy it into RAM, starting from physical address&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0x0009 020&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0 &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;as mentioned above)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;6. This&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(153, 153, 255);"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;setup()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;code &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;initializes the hardware devices in the computer and setup the environment for the execution of kernel program&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;. &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;(Here a question arises... then wat *$($(#$ devices are been initialized by BIOS then?... Ofcourse.. but Linux does not rely on it. Hence reinitialized the devices on its own manner &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 255, 153);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;to enhance portability and robustness&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;). This&lt;/span&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(153, 153, 255);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;setup()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt; does the following..&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;in ACPI compliant systems, invokes BIOS routine that builds a table in RAM describing the layout of the systems' physical memory&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;sets the keyboard repeat delay and rate (when user keeps a key pressed past a certain amount of time, the keyboard device sends the coreesponding keycode over and over to CPU)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;initializes video adapter card&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;reinitialized the disk controller and determines the hard disk parameters&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;checks for an IBM micro channel bus (MCA) and PS/2 pointing device (bus mouse)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;checks for &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;APM BIOS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;support (Advanced Power Management BIOS)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;If "loaded low" kernel (at 0x0001 0000), the function moves it to physical address 0x0000 1000. No changes for "loaded high" kernel. (This step is necessary because to be able to store the kernel image on a floppy disk and to reduce the booting time, the kernel image stored on disk is compressed and the decompression routing needs some free space to use as a temporary buffer following the kernel image in RAM) !!! Me too not clear with this step !!!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Sets the A20 pin located on the 8042 keyboard controller. A20 pin is a hack introduced n 80286 based systems to make physical addresses compatible with those of the ancient 8088 microprocessors. Unfortunately, the A20 pin must be properly set before switching to Protected mode, otherwise the 21st bit of every physical address will always be regarded as zero by CPU. To set this pin is a messy operation&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Sets up a provisional&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 255, 153);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;I&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 255, 153);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;DT (Interrupt Descriptor Table)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;and a provisional&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 255, 153);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;GDT (Global Descriptor Table)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Resets the&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;floating-point unit (FPU)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Reprograms the PIC (Programable Interrupt Controllers) to mask all interrupts except IRQ2 which is the cascading interrupt between the two PICs&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Switches the CPU from Real Mode to Protected mode by setting PE bit in CR0 status register. (&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;NOTE: The PG bit in CR0 register is cleared, so paging is still disabled. Linear address is considered as Physical address)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Jumps to &lt;/span&gt;"&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(153, 153, 255);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;startup_32()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;" &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;assembly language function (Yeah.. coming coming.. i know there are two startup_32 functions.. the one which we are referring is at &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 204, 51);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;arch/i386/boot/compressed/head.S&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;file)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;7. After&lt;/span&gt; "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 255, 255);"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;setup()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;" &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;function terminates, the function has been moved to either to &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0x0010 0000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; to &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0x0000 1000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;depending on whether the kernel image was loaded high or low in RAM. Letz see whats this&lt;/span&gt; "&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 255, 255);"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;startup_32()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;" &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;gotto do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;initializes segmentation registers and a provisional stack&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;clears all bits in eflags register&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;fills the area of uninitialized data of kernel identified by&lt;/span&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;_edata &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;and &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;_end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;symbols with zeros&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;invokes&lt;/span&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 255, 255);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;decompress_kernel()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;function to decompress the kernel image. (Messages like "Uncrompressing Linux..." and once decompressed, "OK, booting the kernel.." are shown) (Again, if kernel image was loaded low, the decompressed kernel is placed at physical address &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0x0010 0000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;. &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Else placed in a temporary buffer located after the compressed image. The decompressed image is then moved into its final position, which starts at physical address &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0x0010 0000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Jumps to physical address&lt;/span&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;0x0010 0000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;8. The decompressed kernel image begins with anotehr startup_32 (this time at &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 204, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;arch/i386/kernel.head.S&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Same name for both functions does not create any probs besides confusin us). This second "startup_32()" sets up the execution environment for the first linux process (process id = 0). Here we go wat else it does..&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;initializes segmentation registers with their final values&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;fills the&lt;/span&gt; '&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;bss&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;' &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;segment of the kernel with zeros&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;initializes the provisional kernel Page Tables contained in &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;swapper_pg_dir &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;and &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;pg0 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to identically map the linear addresses to same physicall addresses (more explanation required.. will do sooner)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;stores the address Page Global Directory in cr3 register and enables paging by settng PG bit in cr0 register&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Sets up the Kernel Mode stack for process 0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;again clears all bits in eflags register&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;invokes &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 255);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;setup_idt()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to fill IDT with null interrupt handlers&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;puts the system parameters obtained from BIOS and parameters passed to operating system into the first page frame (again sooner will explain this too)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;identifies the model of the processor&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;loads the gdtr and idtr registers with addresses of GDT and IDT tables&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;jumps to our one and only&lt;/span&gt; "&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(102, 255, 255);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;start_kernel()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;" &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;function which completes the initialization of Linux Kernel&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;9. Nearly every kernel component is initialized by this function. Mentioned below are juz a few of them&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;sched_init()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; - &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to initialize scheduler&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;build_all_zonelists()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; - &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to initialize memory zones&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;page_alloc_init() &amp;amp; mem_init()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; - &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to initialize Buddy system allocators&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;trap_init()  &amp;amp; init_IRQ(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; - &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to initialize IDT for final time&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;softirq_init()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; - &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to initialize TASKLET_SOFTIRQ and HI_SOFTIRQ&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;time_init()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; - &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to initialize system date and time&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;kmem_cache_init()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; - &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to initialize slab allocator&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;calibrate_delay()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; - &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to determine the speed of the CPU clock&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 255, 51);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;kernel_thread()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; - &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;to create the kernel thread for process 1; in turn, this kernel thread creates other kernel threads and executes &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 255);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;/sbin/init&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;program&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 0, 0);"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;10. After this init program and many kernel threads, at the end, the familiar&lt;/span&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="color: rgb(51, 255, 51);"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;login prompt appears&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;on the console (or in the graphical screen, if the X Window System is launched at startup), telling the user that the Linux kernel is up and running&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=""&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 153, 0);"&gt;Once in protected mode, Linux does not use BIOS any longer, but it provides its own device driver for every hardware device on the computer (Moreover, BIOS procedures must be executed in real mode, so they cannot share functions even if that would be beneficial)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-8095518897743461060?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/8095518897743461060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/05/how-linux-kernel-boots.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8095518897743461060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/8095518897743461060'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/05/how-linux-kernel-boots.html' title='How the Linux Kernel Boots'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-9202825209569454517</id><published>2009-05-13T02:40:00.001-07:00</published><updated>2009-07-18T08:15:56.145-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Kernel'/><title type='text'>Compiling Linux Kernel</title><content type='html'>&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;If you want to remove/add some kernel symbols to be exported, then go to&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/usr/src/linux/fs/proc/proc_misc.c&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;and do the changes you want. If you want to remove, comment EXPORT_SYMBOL of that symbol&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Now to compile the kernel, do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1. make&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;2. make modules_install&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;3. make install&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;in&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;/usr/src/linux&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;directory.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-9202825209569454517?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/9202825209569454517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/05/compiling-linux-kernel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/9202825209569454517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/9202825209569454517'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/05/compiling-linux-kernel.html' title='Compiling Linux Kernel'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-3411830586276713163</id><published>2009-05-13T01:45:00.000-07:00</published><updated>2011-05-20T00:03:42.389-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Commands'/><title type='text'>Frequently used commands</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;1. To find a file in current directory&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;find . -name "something.h"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;2. To find a file (in current directory) with some text in it&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;grep "sometext" . -wrn&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-r is for recursive; -n is to print the line numbers; -w for "whole" words only&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;3.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; To find the dependencies of an exe on .so files&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;ldd exe-name&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;exe&gt;&lt;/exe&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;4. To remove the debug symbols from an exe&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;strip --strip-debug &lt;/span&gt;&lt;/span&gt;&lt;exe&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/exe&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;or&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;strip -g &lt;/span&gt;&lt;/span&gt;&lt;exe&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/exe&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;or&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;strip - d &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;exe&gt;&lt;/exe&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;6. To list down exported symbols from kernel&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; cat /proc/kallsyms | grep "__ksymtab_proc_root"&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;NOTE: "__ksymtab" prefixed symbols are the symbols exported from the kernel.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;7. To install from the spec file&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;rpm -ba  "spec"&lt;/span&gt;&lt;/span&gt;&lt;spec&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/spec&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;8. To find the distribution of the Linux (11.1 or 10.2 or 10.3), use&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;lsb_release -a&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;NOTE: &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;lsb stands&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; for Linux Standard Base&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;9. To find the size of the files (in friendly format) in a directory, go inside that directory&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;du -ch *&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-3411830586276713163?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/3411830586276713163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/05/frequently-used-commands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3411830586276713163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/3411830586276713163'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/05/frequently-used-commands.html' title='Frequently used commands'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-7331071507870014573</id><published>2009-05-13T01:31:00.000-07:00</published><updated>2009-07-18T08:21:28.305-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux File System'/><title type='text'>Symbols exported by Linux Kernel</title><content type='html'>&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;To see the list of kernel exported symbols, use &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;vim /boot/System.map or&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;cat /proc/kallsyms | more&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;NOTE: Only the symbols that are preceded with "__ksymtab" can be used in application. Eg. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;__ksymtab_proc_root_kcore&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-7331071507870014573?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/7331071507870014573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/05/symbols-exported-by-linux-kernel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7331071507870014573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/7331071507870014573'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/05/symbols-exported-by-linux-kernel.html' title='Symbols exported by Linux Kernel'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7243602279715171390.post-6778900452732169344</id><published>2009-05-13T01:28:00.000-07:00</published><updated>2009-09-03T11:58:59.773-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Common OS Concepts'/><title type='text'>Memory mapped and IO mapped devices</title><content type='html'>&lt;span class="Apple-style-span" style="line-height: 19px; "&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;red&gt;&lt;color:&gt;Memory Mapped Devices&lt;/color:&gt;&lt;/red&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: Device registers are mapped to physical memory.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;IO Mapped Devices&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;: Device registers are within the device itself. Requires special instructions (like inport, outport) to access those registers.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7243602279715171390-6778900452732169344?l=spot-myblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spot-myblog.blogspot.com/feeds/6778900452732169344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://spot-myblog.blogspot.com/2009/05/memory-mapped-and-io-mapped-devices.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/6778900452732169344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7243602279715171390/posts/default/6778900452732169344'/><link rel='alternate' type='text/html' href='http://spot-myblog.blogspot.com/2009/05/memory-mapped-and-io-mapped-devices.html' title='Memory mapped and IO mapped devices'/><author><name>ÿØЎф</name><uri>http://www.blogger.com/profile/09737836125574667527</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_pbIJbHttz2I/SgsL6jXbacI/AAAAAAAAAFw/iwK6bRV5EvM/S220/DSC00432.JPG'/></author><thr:total>0</thr:total></entry></feed>
