<?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-6673962022818192802</id><updated>2012-02-10T18:03:36.327+01:00</updated><category term='Computer systems architectures'/><category term='Computing environments'/><category term='ENSI II2I Network module'/><category term='Favourite Words'/><category term='Useful web sites'/><title type='text'>K++ Lab Insight</title><subtitle type='html'>Koutheir Attouchi's blog</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-2620195106508092815</id><published>2012-02-10T18:03:00.000+01:00</published><updated>2012-02-10T18:03:36.334+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computing environments'/><category scheme='http://www.blogger.com/atom/ns#' term='Computer systems architectures'/><title type='text'></title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: x-large;"&gt;KJSONPlusPlus&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A clean, elegant and portable JavaScript Object Notation library for C++. This is a C++ library enabling programmers to generate and consume JSON data.&lt;/div&gt;&lt;div style="text-align: left;"&gt;It's full source code is &lt;a href="https://github.com/koutheir/KJSONPlusPlus" target="_blank"&gt;available here on github&lt;/a&gt;.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Features&lt;/span&gt;&lt;/div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;The library is fully compliant with the JSON standard.&lt;br /&gt;See &lt;a href="http://www.json.org/"&gt;http://www.json.org/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;The library enables extended data types in addition to the standard ones:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;DateTime in ISO-8601 format.&lt;/li&gt;&lt;li&gt;Arbitrary binary data encoded in Base85 format.&lt;br /&gt;These extended data types are encoded inside the string standard data type. They are automatically recognized as extended types by the library. This makes the data generated by this library always standard-compliant. If the generated data is consumed by another JSON parser the data will still be readable and well-formatted.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;The library is standalone. It only depends on C++ STL and C runtime.&lt;/li&gt;&lt;li&gt;The library's JSON scanner is automatically generated via RE2C.&lt;br /&gt;See &lt;a href="http://re2c.org/"&gt;http://re2c.org/&lt;/a&gt;&lt;br /&gt;This delivers a very fast and flexible JSON scanner.&lt;/li&gt;&lt;li&gt;The library's JSON parser is automatically generated via Bison. This enables a very clean JSON parser.&lt;br /&gt;See &lt;a href="http://www.gnu.org/s/bison/"&gt;http://www.gnu.org/s/bison/&lt;/a&gt;&lt;br /&gt;See &lt;a href="http://gnuwin32.sourceforge.net/"&gt;http://gnuwin32.sourceforge.net/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;The library is hierarchically divided into modules of classes that further localize responsibilities.&lt;/li&gt;&lt;li&gt;JSON data source can be a file or a memory block or virtually any character-based data source.&lt;/li&gt;&lt;li&gt;In case of JSON format errors in the source data, the library parser reports the nature and location of errors: line/column of the error and a description of what was wrong.&lt;/li&gt;&lt;li&gt;JSON data can be encoded in UTF-8 or in Unicode.&lt;br /&gt; Internally all string data is encoded in Unicode. Conversions happen only when needed, and happen automatically.&lt;/li&gt;&lt;li&gt;JSON data is loaded from the source into a hierarchy of objects in memory.&lt;br /&gt; The representation is based on native C++ objects and primitive variables.&lt;br /&gt; Representation persistence (saving back to a file) is fully supported and happens via a single method call.&lt;/li&gt;&lt;li&gt;Dynamic exploration and navigation in JSON data is possible.&lt;br /&gt; No preliminary knowledge on data structure is required in order to use the data. However, preliminary knowledge of data structure can speed up data consumption and lower its complexity.&lt;/li&gt;&lt;li&gt;A JSON value can be treated generically as a value, or specifically given its data type.&lt;br /&gt; i.e. An object can be treated merely as a value when it is to be deleted, and can be treated an an object value when one wants to explore its child values.&lt;/li&gt;&lt;li&gt;Many data conversions are automatically supported by the native objects in memory.&lt;br /&gt; e.g. String value to integer, DataTime value to String,...&lt;/li&gt;&lt;li&gt;Generated JSON data is well-formatted and spaced and indented as required.&lt;br /&gt; This allows for much better human-readability, but it reduces the parsing performance a little bit.&lt;/li&gt;&lt;li&gt;The library does not use C++ exceptions.&lt;br /&gt; It reports errors via errno and returns values that indicate errno values.&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: large;"&gt;Limitations&lt;/span&gt;&lt;/div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Progressive loading of JSON data is not supported.&lt;/li&gt;&lt;li&gt;ISO-8601 date &amp;amp; time format is not fully supported.&lt;br /&gt; Only the most common form is supported. This should be enough for most usage cases.&lt;/li&gt;&lt;li&gt;No support for XPath-like access protocol.&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: large;"&gt;Licence&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Copyright 2011-2011 Koutheir Attouchi. All rights reserved.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KOUTHEIR ATTOUCHI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Koutheir Attouchi.&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/6673962022818192802-2620195106508092815?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/2620195106508092815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2012/02/kjsonplusplus-clean-elegant-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/2620195106508092815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/2620195106508092815'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2012/02/kjsonplusplus-clean-elegant-and.html' title=''/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-4908326185700324984</id><published>2011-12-31T04:04:00.000+01:00</published><updated>2011-12-31T04:04:35.770+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computing environments'/><title type='text'>Installing and configuring Apache Axis C++ on Windows</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Briefly, I am sharing an experience with anyone interested in Apache Axis C++ installation and configuration.&lt;br /&gt;&lt;br /&gt;I illustrate how to install Apache Axis C++ and configure the system for it, then how to get a working example of Calculator.&lt;br /&gt;&lt;br /&gt;First, Four programs are to be installed:&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://sourceforge.net/projects/getgnuwin32/files/getgnuwin32/" target="_blank"&gt;&lt;span style="font-family: verdana,sans-serif;"&gt;GNUWin32 0.6.3&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://httpd.apache.org/download.cgi#apache20" target="_blank"&gt;Apache HTTPD 2.0.64&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_2_0/xerces-c2_2_0-win32.zip" target="_blank"&gt;Xerces c2.2.0&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.apache.org/dist/ws/axis-c/binaries/win32/" target="_blank"&gt;Apache Axis C++ 1.6 beta&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&amp;nbsp;Some files are to be downloaded from &lt;b&gt;&lt;a href="http://www.multiupload.com/WPMPYAKYVS" target="_blank"&gt;here&lt;/a&gt;&lt;/b&gt;. Once everything installed, we proceed to configuration.&lt;br /&gt;&lt;h2&gt;GNUWin32&lt;/h2&gt;There is nothing special to do for this, but let's say it was installed in the folder &lt;b&gt;T&lt;/b&gt;.&lt;br /&gt;&lt;h2&gt;Apache HTTPD&lt;/h2&gt;Let's say it was installed in the folder &lt;b&gt;Z&lt;/b&gt;. Open the text file "Z\conf\httpd.conf" and append the following text to end of it:&lt;br /&gt;&lt;code&gt;LoadModule axis_module modules/mod_axis2.so&lt;br /&gt;&amp;lt;Location /axis&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SetHandler axis&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;h2&gt;Xerces&lt;/h2&gt;&lt;ol&gt;&lt;li&gt;Extract the compressed file in a folder, let's say &lt;b&gt;X&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Copy the file "X\bin\xerces-c_2_2_0.dll" on the desktop, we will use it later. You can delete the remaining extracted files.&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;Apache Axis C++&lt;/h2&gt;Axis will be installed in two folders on the machine; one for development (with the /include and /lib and others) and one for deployment of binaries of the Web services on the server side.&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Extract the compressed file of Axis in a folder, let's say &lt;b&gt;Y&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Rename the file "Y\bin\AxisXMLParserXerces.dll" to "Y\bin\AxisXMLParser.dll".&lt;/li&gt;&lt;li&gt;Move the file "xerces-c_2_2_0.dll" from the desktop to "Y\bin\xerces-c_2_2_0.dll".&lt;/li&gt;&lt;li&gt;Copy the files "MSVCP70.DLL" and "msvcr70.dll" from the desktop to "Y\bin\MSVCP70.DLL" and "Y\bin\msvcr70.dll" respectively. Il would also recommend copying those files to the system folder "Windows\System32".&lt;/li&gt;&lt;li&gt;Move the file "axiscpp.conf" to "Y\deploy\axiscpp.conf".&lt;/li&gt;&lt;li&gt;Create an empty folder "Y\deploy\repository".&lt;/li&gt;&lt;li&gt;Copy all the contents of the folder "Y\bin" to the folder "Y\deploy\lib".&lt;/li&gt;&lt;li&gt;Copy the folder "Y\deploy" in the folder "Z".&lt;/li&gt;&lt;li&gt;Rename the folder "Z\deploy" to "Z\Axis".&lt;/li&gt;&lt;li&gt;Copy the file "Z\Axis\lib\mod_axis2.dll" to the folder "Z\modules".&lt;/li&gt;&lt;li&gt;Rename the file "Z\modules\mod_axis2.dll" to "Z\modules\mod_axis2.so".&lt;/li&gt;&lt;li&gt;Open the file "Z\Axis\axiscpp.conf" and adapt it depending on the exact installation configuration.&lt;/li&gt;&lt;/ol&gt;Now we need to set some environment variables. Adapt those to your own installation configuration.&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;New variable: &lt;code&gt;AXISCPP_DEPLOY=Z\Axis&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Append to variable: &lt;code&gt;PATH=...;T\bin;Z\bin;Z\Axis\lib&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;Now, the platform is ready. Let's experiment with an example.&lt;br /&gt;&lt;h2&gt;Calculator example&lt;/h2&gt;The Calculator example is made up of multiple files for source code, and configuration, and description.&lt;br /&gt;Some description files already exist in Axis for this trivial example. We will add the configuration file "server.wsdd" and some source files.&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Copy the file "server.wsdd" to the folder "Z\Axis\conf".&lt;/li&gt;&lt;li&gt;Open the file "Z\Axis\axiscpp.conf" and adapt it to match the installation configuration. Particularly, the line: "WSDDFilePath:".&lt;/li&gt;&lt;li&gt;Copy the folder "Calculator" in your development folder/workspace.&lt;/li&gt;&lt;li&gt;Compile the Calculator server-side project to generate the binary "Calculator_Server.dll".&lt;/li&gt;&lt;li&gt;Adapt the file "Z\Axis\conf\server.wsdd" to the location of the file "Calculator_Server.dll".&lt;/li&gt;&lt;li&gt;Compile the Calculator client-side project to generate "Calculator.exe".&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: left;"&gt;Until here, the example is compiled and deployed. Let's run it!&lt;/div&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Start Apache HTTPD.&lt;/li&gt;&lt;li&gt;Using the Windows shell (DOS) or the IDE, run "Calculator.exe" with some parameters, and observe the results. For exemple:&lt;br /&gt;"Calculator.exe mul 4 3 http://localhost:8080/axis/Calculator"&lt;br /&gt;This prints "12" on the console: the result of running the web service on the server.&lt;/li&gt;&lt;li&gt;An abservation of "Z\logs\access.log" shows a treated request by HTTPD:&lt;br /&gt;"POST /axis/Calculator HTTP/1.1" 200 400&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/6673962022818192802-4908326185700324984?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/4908326185700324984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2011/12/installing-and-configuring-apache-axis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/4908326185700324984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/4908326185700324984'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2011/12/installing-and-configuring-apache-axis.html' title='Installing and configuring Apache Axis C++ on Windows'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total><georss:featurename>Grenoble, France</georss:featurename><georss:point>45.188529 5.724524</georss:point><georss:box>45.1437655 5.64556 45.233292500000005 5.803488</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-3900928730202735456</id><published>2011-02-13T16:37:00.000+01:00</published><updated>2011-02-13T16:37:21.065+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer systems architectures'/><title type='text'>Home-made Linux Backup Tool</title><content type='html'>I know I know... Linux has many fully-featured backup tools able to backup your system, configuration, user files,... from different levels and to different mediums. But, in my situation, I had some quite special requirements for the backup tool I want to use:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It should backup the whole system as is, at the &lt;b&gt;raw level&lt;/b&gt;. Backup partitions, not files. As I needed to get away from the file system support and different problems arising when backing up individual files.&lt;/li&gt;&lt;li&gt;It should enable &lt;b&gt;compression &lt;/b&gt;of the data. I went a bit far to ask for &lt;b&gt;7zip&lt;/b&gt; compression levels ;-)&lt;/li&gt;&lt;li&gt;It should be smart enough to &lt;b&gt;avoid backing up the free space &lt;/b&gt;on the partition. And here began some problems I will talk about later.&lt;/li&gt;&lt;li&gt;It should have a balance between optimal &lt;b&gt;performance &lt;/b&gt;and backup &lt;b&gt;safety&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;It should give me the maximum configuration options. And the default configuration should be optimal for most cases.&lt;/li&gt;&lt;li&gt;It should depend on the least number of tools, so I can backup my Linux OS from a Live CD for example, without requiring installation of rare or fat utilities.&lt;/li&gt;&lt;li&gt;It should give some feedback on the &lt;b&gt;progression &lt;/b&gt;of the lengthy operations.&lt;/li&gt;&lt;li&gt;It should not be too hard to &lt;b&gt;code &lt;/b&gt;too!&lt;/li&gt;&lt;/ul&gt;So here is my point clear now. Let's move to the heart of it!&lt;br /&gt;I created a shell script called &lt;code&gt;full-backup-1.0.sh&lt;/code&gt; that did just what I wanted. I will present it here so the community takes advantage of it and help me to make it better or fix some bugs, if any.&lt;br /&gt;&lt;h1&gt;Usage&lt;/h1&gt;&lt;code&gt;&lt;b&gt;full-backup-1.0.sh&lt;/b&gt; input_device [--no-fs-check] [--no-zero-free-space] [--no-compress] [--read-only] [--safe-rbs] [--rbs=RBS]&lt;/code&gt;&lt;br /&gt;This will perform a full raw backup of the partition data and create a single file holding the data of the partition in the current directory.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;input_device&lt;/code&gt;: Source partition device node.&lt;/li&gt;&lt;li&gt;&lt;code&gt;--no-fs-check&lt;/code&gt;: Disable file system check before starting the backup. This is not recommended for safety reasons. By default, file system check is enabled.&lt;/li&gt;&lt;li&gt;&lt;code&gt;--no-zero-free-space&lt;/code&gt;: Disable filling the empty space in the partition with zeros. This could be useful to be able to recover deleted files from the partition later, but can reduce the compression ratio of the backup. By default, filling the empty space in the partition with zeros is enabled.&lt;/li&gt;&lt;li&gt;&lt;code&gt;--no-compress&lt;/code&gt;: Disable compression. This implies the option &lt;code&gt;--no-zero-free-space&lt;/code&gt;. This will result in a file that has the same size as the partition. This is useful when backup time must be the least possible while backup size is not an issue.&lt;/li&gt;&lt;li&gt;&lt;code&gt;--read-only&lt;/code&gt;: Disable any operations that can modify the partition. This implies the options &lt;code&gt;--no-fs-check&lt;/code&gt; and &lt;code&gt;--no-zero-free-space&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;code&gt;--safe-rbs&lt;/code&gt;: Use a safe read buffer size. The read buffer size will be set to 512 bytes. Read buffer size is the number of bytes that are read at once from the source partition. Safe here means that if the partition medium has some damaged sectors, then the bad sectors will not hide the readable ones. Use this if you are unsure about the health of the source partition medium or when performance is not an issue.&lt;/li&gt;&lt;li&gt;&lt;code&gt;--rbs=RBS&lt;/code&gt;: Set the read buffer size to the specified RBS size. By default RBS is 64KB (65536 bytes) and this should be a good deal for most cases where partition medium health is good.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;&lt;i&gt;Example&lt;/i&gt;&lt;/b&gt;:&lt;br /&gt;&lt;code&gt;full-backup-1.0.sh /dev/sda2&lt;/code&gt;&lt;br /&gt;&lt;h1&gt;Personal experience&lt;/h1&gt;Using this command, I backed up my Debian Linux partition (&lt;b&gt;Total size: 32 GB&lt;/b&gt;, &lt;b&gt;Used size: 8 GB&lt;/b&gt;) in a &lt;b&gt;compressed file of 2 GB&lt;/b&gt; size in &lt;b&gt;2h25min&lt;/b&gt;. The backup was done from a &lt;b&gt;shell running on a Knoppix Linux Live DVD&lt;/b&gt;. For me, this is exactly what I needed.&lt;br /&gt;&lt;h1&gt;Download&lt;/h1&gt;You can download the script with 7zip binaries for Intel i386 architecture &lt;a href="http://sites.google.com/site/koutheir/full-backup-1.0.tar.gz" target="_self" title="full-backup-1.0"&gt;here&lt;/a&gt;. The file is "tar.gz"-compressed.&lt;br /&gt;&lt;h1&gt;Implementation details&lt;/h1&gt;Here I present the shell script I wrote with details on each section of it.&lt;br /&gt;&lt;h2&gt;Simple BSD License&lt;/h2&gt;As usual, I license this code under the terms of the Simple BSD License. Here is the contents of the license:&lt;br /&gt;&lt;code&gt; Copyright (c) 2011 Koutheir Attouchi.&lt;br /&gt;All rights reserved.&lt;br /&gt;&lt;br /&gt;Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:&lt;br /&gt;1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;br /&gt;2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;br /&gt;3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.&lt;br /&gt;&lt;br /&gt;THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. &lt;/code&gt;&lt;br /&gt;&lt;h2&gt;Internal state initialization&lt;/h2&gt;Here I initialize the contents of the global variables used in the script. Here is the meaning of them:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;readonly: this will be a read-only operation.&lt;/li&gt;&lt;li&gt;checkfs: check the file system for errors before the backup.&lt;/li&gt;&lt;li&gt;zerofs: fill the empty space of the partition with zeros.&lt;/li&gt;&lt;li&gt;imp: input mount point for the source partition.&lt;/li&gt;&lt;li&gt;zf: the file full with zeros that will be created on the source partition.&lt;/li&gt;&lt;li&gt;of: output file name.&lt;/li&gt;&lt;li&gt;nocompress: do not compress the output file.&lt;/li&gt;&lt;li&gt;compressor: file name of the executable file which will compress the data.&lt;/li&gt;&lt;li&gt;pidfile: a file that will hold a process identifier to allow for inter-process communication between child processes launched by this script.&lt;/li&gt;&lt;li&gt;statusfile: a FIFO pipe file that will enable progression display.&lt;/li&gt;&lt;li&gt;tempfile: a FIFO pipe file that will enable input data size control.&lt;/li&gt;&lt;li&gt;uiupdatedelay: delay between progress display updates.&lt;/li&gt;&lt;li&gt;rbs: reading buffer size.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Command line parsing&lt;/h2&gt;Here is a regular command line parsing, nothing special to tell.&lt;br /&gt;&lt;h2&gt;Preliminary checks&lt;/h2&gt;For the moment, a simple check whether the source partition device node exists.&lt;br /&gt;&lt;h2&gt;Internal state adjustements&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;The extension of the backup output file is adjusted to reflect the nature of the file (compressed or not).&lt;/li&gt;&lt;li&gt;Read-only mode disables the file system check and filling the free space with zeros.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Reading source partition information&lt;/h2&gt;As a normal assumption, I am always backing up Linux partitions holding ext2 file system or later. This allows me the use of the &lt;code&gt;dumpe2fs&lt;/code&gt; utility to gather some file system information.&lt;br /&gt;&lt;h2&gt;Listing current backup configuration&lt;/h2&gt;This is done to tell what will be done next so the user knows in advance if he configured the tool as desired or not.&lt;br /&gt;&lt;h2&gt;Unmounting partition&lt;/h2&gt;This is done because it's unreliable to backup a partition that is mounted, unless some more advanced technologies are used, which we avoid here.&lt;br /&gt;&lt;h2&gt;Checking partition file system for errors&lt;/h2&gt;This is a security measure, and it is very recommended.&lt;br /&gt;&lt;h2&gt;Filling partition free space with zeros&lt;/h2&gt;This is a technique used to allow for the best possible compression ratio of the partition, avoiding backing up the free space, while still being a simple technique.&lt;br /&gt;It tries to fill the empty space on the source partition with a huge file filled with zeros. Once the partition is full, remove the file. This leaves the space previously allocated for the file with zeros (most of it).&lt;br /&gt;Once done, this will higher the frequency of zero blocks and will allow the compressor to allocate very small space to represent the free space on the partition.&lt;br /&gt;Operation progress will be shown during the filling operation which may take a long time to get done. Once the operation is done, the partition is unmounted again.&lt;br /&gt;Once drawback for this method, it overwrites all the free space on the partition. Thus it renders impossible the recovery of previously deleted files on the partition. But if that is not an issue, one should be fine using this technique.&lt;br /&gt;&lt;h2&gt;Backing up partition data&lt;/h2&gt;&lt;h3&gt;In uncompressed form&lt;/h3&gt;This uses the &lt;code&gt;dd&lt;/code&gt; utility to backup the partition and removes any padding at the end of operation. The padding may be done due to the block size specified to &lt;code&gt;dd&lt;/code&gt;.&lt;br /&gt;&lt;h3&gt;In 7zip-compressed form&lt;/h3&gt;This uses two instances of &lt;code&gt;dd&lt;/code&gt;: one to read the partition data and another to limit the output to the really read data, thus avoiding the compression of the padding bits.&lt;br /&gt;The compression used here is the "Ultra" profile of 7zip compressor, which should produce the best possible compression ratio, but will consume much memory and much CPU power.&lt;br /&gt;As 7zip is not a standard program, I put it beside the shell script so that I can use it from a live medium like Knoppix.&lt;br /&gt;&lt;h2&gt;Finalization&lt;/h2&gt;This cleans up the temporary files and reports the status of the backup operation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-3900928730202735456?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/3900928730202735456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2011/02/home-made-linux-backup-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/3900928730202735456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/3900928730202735456'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2011/02/home-made-linux-backup-tool.html' title='Home-made Linux Backup Tool'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-1973846739477146125</id><published>2010-12-09T01:21:00.003+01:00</published><updated>2010-12-10T17:35:49.389+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer systems architectures'/><title type='text'>Minimize Firefox RAM Memory usage</title><content type='html'>&lt;span style="font-size: large;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Today, many of you are using the Firefox browser to surf on the Internet and develop web applications, etc... Once you begin using Firefox you may realize that it consumes too much RAM which goes up to 200MB in normal usage and can reach 700MB after several hours of continuous browsing. Yet, many of us still have a 1GB laptop or even a 512MB good old desktop computer. This means that if you use Firefox to browse on such computers, your multi-tasking ability is severely reduced.&lt;br /&gt;&lt;br /&gt;This made me decide to put in action a program that reduces RAM usage of Firefox by forcing the OS to move the memory pages of Firefox to the swap space, thus leaving much more RAM available. And I quickly made it using the C++ language.&lt;br /&gt;&lt;br /&gt;From the end, it cuts down Firefox RAM usage to about 15MB! Cool! No?&lt;br /&gt;Well, it is really cool especially when you know that it have no impact on performance because of the paging operations the OS does. This is because Firefox is a network-based program, so the major latency factor is the network speed. And the loss of CPU power put in swapping the memory pages is very thin compared to the network latency. Of course you won't probably use my program to minimize the RAM usage of Oracle Database Server...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Features&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here are some of the features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Actually, the program is able to reduce RAM usage for any program, and any number of programs, not only Firefox instances.&lt;/li&gt;&lt;li&gt;It does this in a safe way (no code injection or dirty hacks).&lt;/li&gt;&lt;li&gt;It's open source under the "Simple BSD Licence".&lt;/li&gt;&lt;li&gt;It is very tiny in disk size (less than 90KB) and in RAM usage (less than 300KB).&lt;/li&gt;&lt;li&gt;It consumes almost zero CPU usage with the default configuration options.&lt;/li&gt;&lt;li&gt;It has no GUI and no Console.&lt;/li&gt;&lt;li&gt;It can be configured using command line options or a simple configuration file. I recommend using configuration file for novice users.&lt;/li&gt;&lt;li&gt;It's behavior can be customized depending on usage situations. The default options should suit most needs.&lt;/li&gt;&lt;li&gt;It is portable and consists of only one executable binary.&lt;/li&gt;&lt;li&gt;Runs on Windows 2000 or later, including XP, Vista, 7, 2003 Server, 2008 Server.&lt;/li&gt;&lt;li&gt;It has a modular design which enables source code reuse.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size: large;"&gt;Download&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The program is called MinimizeRAMUsage. And here I present the binaries and source files for download:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Executable binary file: &lt;a href="https://sites.google.com/site/koutheir/MinimizeRAMUsageBinary.zip"&gt;MinimizeRAMUsage.exe&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Source files archive: &lt;a href="https://sites.google.com/site/koutheir/MinimizeRAMUsage.zip"&gt;MinimizeRAMUsage.zip&lt;/a&gt;. This includes the Visual C++ 2010 solution and project files.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size: large;"&gt;Usage&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, to use the program, place it anywhere you want, then execute it. You will notice that nothing happens, except that a text file named "MinimizeRAMUsage.config.txt" appears next to the program in the same folder.&lt;br /&gt;This file is the configuration file. Don't worry, open it using Notepad for example. You will find something like this:&lt;br /&gt;&lt;code&gt;timeout=400&lt;br /&gt;rescan=1&lt;br /&gt;#process=firefox.exe&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To enable memory usage minimization for firefox, only remove the &lt;code&gt;#&lt;/code&gt; and save the file. The contents of the file would become:&lt;br /&gt;&lt;code&gt;timeout=400&lt;br /&gt;rescan=1&lt;br /&gt;process=firefox.exe&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now execute the program again, and here it goes! You will find it in the Windows "Task Manager" and you will notice that Firefox RAM usage dropped instantly.&lt;br /&gt;&lt;br /&gt;To make it do that automatically all the time,proceed as follows:&lt;br /&gt;1. Right-Click on the MinimizeRAMUsage.exe program and choose "Create shortcut".&lt;br /&gt;2. Cut the shortcut file created and paste it in the start up folder. This folder is located in: Start Menu &amp;gt; Programs &amp;gt; Startup. If you use the French version of Windows, you will find it in: Menu Démarrer &amp;gt; Programmes &amp;gt; Démarrage.&lt;br /&gt;3. You're done, every time the PC boots, it will start the program and you will never ever again see Firefox consuming all your RAM memory.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Advanced usage&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now if you are an advanced or curious user, let me explain the configuration options:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;"timeout=n" where n in an integer greater than or equal to 1. This is the duration in milliseconds that separates two periodic minimization routines done by the program. The lower it is the more you swap pages and the more free RAM you have and the higher CPU you consume. The higher it is, the lower CPU you consume and the lower free RAM you have.&lt;/li&gt;&lt;li&gt;"rescan=b" where b is one of {0, 1}. When this is 1, the program rescans the running processes every time before minimization routine, to ensure all instances of the given targets are operated on, even those started after the startup of MinimizeRAMUsage.exe. If this is 0, then the program will only operate on the instances that existed when it was started, and it will terminate its execution when all those end their execution.&lt;/li&gt;&lt;li&gt;"process=name.exe" where name.exe is the name of the executable whose RAM usage is to be minimized. This can be given several times and it operates in an incremental way.&lt;/li&gt;&lt;/ul&gt;And example of configuration file might be:&lt;br /&gt;&lt;code&gt;timeout=400&lt;br /&gt;rescan=1&lt;br /&gt;process=firefox.exe&lt;br /&gt;process=chrome.exe&lt;br /&gt;process=iexplore.exe&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There is another way to configure this program: the command line options. The syntax is the following:&lt;br /&gt;&lt;code&gt;MinimizeRAMUsage.exe [-r] [-t timeout] file1.exe [file2.exe, [file3.exe[...]]]&lt;/code&gt;&lt;br /&gt;Where:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;-r&lt;/code&gt; option disables periodic rescan, which is enabled by default.&lt;/li&gt;&lt;li&gt;&lt;code&gt;-t&lt;/code&gt; option indicates timeout in milliseconds, which is 1 by default.&lt;/li&gt;&lt;li&gt;&lt;code&gt;file1.exe, file2.exe, file3.exe, ...&lt;/code&gt; are the executable programs to operate on.&lt;/li&gt;&lt;/ul&gt;The command line arguments overwrite the configuration file options.&lt;br /&gt;&lt;br /&gt;That's all! I wish this come handy to some of you, as it is to me!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-1973846739477146125?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/1973846739477146125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/12/minimize-firefox-ram-memory-usage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1973846739477146125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1973846739477146125'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/12/minimize-firefox-ram-memory-usage.html' title='Minimize Firefox RAM Memory usage'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-9109028483509106751</id><published>2010-12-08T04:18:00.003+01:00</published><updated>2010-12-08T04:25:33.488+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer systems architectures'/><title type='text'>How to use more than 4GB of RAM with 32-bits Windows OS?</title><content type='html'>Actually, I am still running the good old Windows XP 32-bits system on my 4GB RAM laptop. And as some of you may know, Windows 32-bits OS can use a maximum of 4GB of RAM due to the addressing space constraint.&lt;br /&gt;&lt;br /&gt;In practice, my Windows XP only allows me to use a maximum of 3GB of RAM for my programs, while 1GB is restricted to the kernel. This, given that I enabled the PAE (Physical Address Extension) option for the kernel.&lt;br /&gt;&lt;br /&gt;Anyway, I found a solution that enables me to use the whole 4GB for my applications, and that enables in general to use even more than 4GB of RAM with a 32-Bits Windows OS.&lt;br /&gt;&lt;br /&gt;The trick is easy. Among the memories used by the system there is the RAM and the disk swap space (commonly C:\PageFile.sys) and other types also. I will let Windows use the 3GB of RAM as normal. Then I will make it use the last 1GB of RAM as a swap space, as if it was on disk. But to do this I will have to create a RAMDisk. A RAM disk is a virtual volatile disk that exist only in RAM. This enables me to regain the 1GB RAM space and use it for memory pagination operations. So nothing is lost.&lt;br /&gt;&lt;br /&gt;To do so, I use a program called &lt;a href="http://www.romexsoftware.com/en-us/index.html"&gt;VSuite Ramdisk&lt;/a&gt;. This program enables me to create a new virtual disk drive in "My Computer" folder that enables me to access the 1GB RAM space that the OS cannot access natively.&lt;br /&gt;&lt;br /&gt;You can download the program from &lt;a href="http://www.romexsoftware.com/en-us/vsuite-ramdisk/download.html"&gt;here&lt;/a&gt;. The free edition does well. Once installed, you have to configure it to make the new RAM drive. Here is how:&lt;br /&gt;&lt;br /&gt;1. Open the program.&lt;br /&gt;2. Click on "Options" on the left tab bar.&lt;br /&gt;3. Check the option "Enable OS Invisible Physical Memory".&lt;br /&gt;4. Click on "Ramdisk" on the left tab bar.&lt;br /&gt;5. Look at the option "Use OS Invisible Memory", next to it there is the total space of the RAM the 32-bits OS cannot use. Note down that number, I will called it OSIRS.&lt;br /&gt;6. Choose the options for the new RAM drive. Personally I chose:&lt;br /&gt;- Disk Size: 892MB&lt;br /&gt;- Drive Letter: M:&lt;br /&gt;- File System: FAT. You will need to use FAT32 if you have 6GB or more of RAM.&lt;br /&gt;- Volume Label: RAMDISK&lt;br /&gt;The rest of the options I kept for the default.&lt;br /&gt;7. Click on "Add" button.&lt;br /&gt;8. Click on "Exit" button.&lt;br /&gt;&lt;br /&gt;Now you have a new drive in your computer called RAMDISK accessible as M:. Because of its volatile nature, this drive does not retain any files written into it once the computer is rebooted or shutdown.&lt;br /&gt;&lt;br /&gt;Now, we will tell Windows to use our new drive as a container for its swap space. Here is the procedure:&lt;br /&gt;1. Right click on "My Computer" and select "Properties".&lt;br /&gt;2. Click on "Advanced" tab.&lt;br /&gt;3. Click on "Settings" button inside "Performance" frame.&lt;br /&gt;4. Click on "Advanced" tab.&lt;br /&gt;5. Click on "Change" button inside "Virtual Memory" frame.&lt;br /&gt;6. Select "M: RAMDISK" from the list.&lt;br /&gt;7. Choose the option "Custom size" inside "Paging file size for selected drive" frame.&lt;br /&gt;8. In "Initial size (MB)", type the number OSIRS minus 6. For example, in my case I type "886".&lt;br /&gt;9. Type the same number in the text field "Maximum size (MB)".&lt;br /&gt;10. Click the button "Set".&lt;br /&gt;11. Click the button "OK".&lt;br /&gt;12. Click the button "OK".&lt;br /&gt;13. Click the button "OK".&lt;br /&gt;&lt;br /&gt;Now, Windows will use the RAM disk every time it runs out of those 3GB RAM memory. Windows will not tell you that it uses the full 4GB (or maybe more in your case), but it will effectively do it.&lt;br /&gt;&lt;br /&gt;Windows is still configured to use hard disk space to do paging operations, and because of this, some might argue that Windows might use the hard disk to swap pages of memory, instead of the RAM disk, which makes our trick meaningless, but here some ways to get around it:&lt;br /&gt;1. You can remove the swap space from all other drives except the RAM disk. This will make dead sure Windows will use the RAM disk for memory page swapping. But this limits the virtual memory size to exactly 4GB, and in deed disables disk paging. This is not recommended.&lt;br /&gt;2. Reduce the disk space used on other drives. This is my adopted solution. I limit Windows to only 1GB of hard disk space (on C:) in addition to the 886MB space of the RAM drive. This gives me about 5GB of virtual memory. By experience, I have never got in an out of memory situation since I bought my laptop (This means about 5 months of usage without a single out of memory situation). This proves that the 5GB are really sufficient for my jobs. The amount of hard disk space you need depends on your set of applications and how you use them. You can test for yourself to find a suitable configuration, you can always higher that size given that you have free space on the hard disk.&lt;br /&gt;&lt;br /&gt;That's all. Thank you for your attention. I wish I have given something useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-9109028483509106751?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/9109028483509106751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/12/how-to-use-more-than-4-gb-of-ram-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/9109028483509106751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/9109028483509106751'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/12/how-to-use-more-than-4-gb-of-ram-with.html' title='How to use more than 4GB of RAM with 32-bits Windows OS?'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-1519287148223289107</id><published>2010-12-06T00:26:00.002+01:00</published><updated>2010-12-06T00:29:29.603+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer systems architectures'/><title type='text'>Installing ATI Proprietary Linux Driver (fglrx) on Debian Lenny 5.0 Stable 64 bits</title><content type='html'>I am one of those unlucky peoples who happen to own a laptop equipped with an ATI graphic card, while being strongly attached to the open source world...&lt;br /&gt;&lt;br /&gt;Yes, again, and the fight just continues between open source world (Linux, BSD, ...) and the ATI for its graphic chipset driver.&lt;br /&gt;&lt;br /&gt;I am not going to reenter all that history. In brief, I have successfully installed the fglrx driver version 10.10 (the ATI Proprietary graphic chipset driver) on my laptop running the Linux Debian 5.0 Lenny Stable 64 bits.&lt;br /&gt;&lt;br /&gt;Let's put it in perspective: I did that in 16 November 2010. In that day, the 10.10 version of fglrx is experimental, but not yet available in the experimental version of Debian. It may seem weired to install an experimental driver on the stable version of the OS, but I can say I had no choice. My graphic card was only supported starting from that version of fglrx. Yet I still stick to the reliable stable version of the Debian OS.&lt;br /&gt;&lt;br /&gt;I am presenting this experience to the world because I find it useful for some of you, a bit like me. And I think it can help some others to install fglrx on their machines, if they have to. I made some bash scripts that automate the installation to some extent. But I want to show what they do first.&lt;br /&gt;&lt;br /&gt;Hereafter are the general steps needed to install the fglrx driver. These are only meant to be understood, not to perfectly follow, because I will give some scripts that automate these actions just later.&lt;br /&gt;&lt;br /&gt;1. Download the ATI Proprietary Linux Driver package. This got me the &lt;code&gt;ati-driver-installer-10-10-x86.x86_64.run&lt;/code&gt; file.&lt;br /&gt;&lt;a href="http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx"&gt;http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. Remove all traces of ATI drivers using the package manager.&lt;br /&gt;&lt;code&gt;apt-get purge fglrx-driver fglrx-driver-dev fglrx-atieventsd fglrx-modules fglrx-kernel-src fglrx-control fglrx-glx fglrx-amdcccle fglrx-kernel fglrx-glx-ia32 fglrx-source&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;3. Extract &lt;code&gt;ati-driver-installer-10-10-x86.x86_64.run&lt;/code&gt; into a directory &lt;code&gt;fglrx-10-10&lt;/code&gt;.&lt;br /&gt;&lt;code&gt;"./ati-driver-installer-10-10-x86.x86_64.run" --extract "./fglrx-10-10" &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;4. Correct the internal structure of the fglrx installer package:&lt;br /&gt;These steps are the fruit of hours of debugging efforts I did to figure out how to make the fglrx installer generate correct debian packages for me.&lt;br /&gt;&lt;br /&gt;4.1. Create some directories.&lt;br /&gt;The structure of the extracted installer files is not complete for a 64 bits system. So I corrected that.&lt;br /&gt;&lt;br /&gt;4.2. Copy some files.&lt;br /&gt;Some files needed to be copied to different locations inside the installer directory, in order to be installed in the right places when the packages are built.&lt;br /&gt;&lt;br /&gt;4.3. Alter some files.&lt;br /&gt;Some configuration files and scripts needed some changes to install the needed files and to make the correct links to the shared libraries when installed on the system.&lt;br /&gt;&lt;br /&gt;5. Create the debian packages (&lt;code&gt;.deb&lt;/code&gt;) from the extracted patched files.&lt;br /&gt;&lt;code&gt;./ati-installer.sh 10.10 --buildpkg Debian/lenny&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;6. Install the generated packages.&lt;br /&gt;&lt;code&gt;dpkg -i fglrx-driver*.deb&lt;br /&gt;dpkg -i fglrx*.deb&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;7. Remove the open source ATI drivers available with Xorg.&lt;br /&gt;&lt;code&gt;apt-get purge xserver-xorg-video-ati&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;8. Patch some Linux source files.&lt;br /&gt;This is required to solve a compatibility issue with fglrx and linux kernel API.&lt;br /&gt;The issue is a change in the name of a function in the linux kernel, which is not taken into account by the developers of fglrx. The change I do does not really hurt the linux kernel itself, as all I am doing is adding a new function that is the exact copy of another one.&lt;br /&gt;&lt;br /&gt;9. Build and install the fglrx kernel driver.&lt;br /&gt;This will build the fglrx kernel module which enables the 3D acceleration of the graphic card.&lt;br /&gt;&lt;br /&gt;10. Ensure that the fglrx kernel driver is loaded as a kernel module.&lt;br /&gt;This is a final check to ensure the fglrx module has been installed and loaded into the kernel: &lt;br /&gt;&lt;code&gt;modprobe -l | grep fglrx&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;11. Configure the Xorg server to use fglrx driver.&lt;br /&gt;First we have to stop gdm (GNOME Desktop Manager):&lt;br /&gt;&lt;code&gt;invoke-rc.d gdm stop&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then we generate the Xorg configuration that uses fglrx for X:&lt;br /&gt;&lt;code&gt;aticonfig --initial=dual-head&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Finally we start gdm:&lt;br /&gt;&lt;code&gt;invoke-rc.d gdm start&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;12. Pin fglrx driver in the package manager to disallow any further automatic upgrades.&lt;br /&gt;I don't actually provide the script needed to do this, as I easily do it using Synaptic Package Manager.&lt;br /&gt;&lt;br /&gt;Here are the files needed. Just download &lt;b&gt;&lt;a href="https://sites.google.com/site/koutheir/fglrx_debian_stable.tar.bz2"&gt;this archive&lt;/a&gt;&lt;/b&gt;, extract it and put it in the same directory as the &lt;code&gt;ati-driver-installer-10-10-x86.x86_64.run&lt;/code&gt; file. It will contain:&lt;br /&gt;&lt;code&gt;make_packages&lt;br /&gt;install_driver&lt;br /&gt;install_kernel_module&lt;br /&gt;config_x&lt;br /&gt;fglrx-driver.preinst&lt;br /&gt;fglrx-driver.postrm&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The scripts should be run as root from a real TTY (Alt-Ctrl-F2) as they don't expect X to be running all their lifetime. The run order is the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;./make_packages 10 10&lt;br /&gt;./install_driver&lt;br /&gt;./install_kernel_module&lt;br /&gt;./config_x&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I am here for your comments or questions, don't hesitate.&lt;br /&gt;I wish I added something to the community. Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-1519287148223289107?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/1519287148223289107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/12/installing-ati-proprietary-linux-driver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1519287148223289107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1519287148223289107'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/12/installing-ati-proprietary-linux-driver.html' title='Installing ATI Proprietary Linux Driver (fglrx) on Debian Lenny 5.0 Stable 64 bits'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-4079106881877538549</id><published>2010-09-04T08:49:00.000+01:00</published><updated>2010-09-04T08:51:49.451+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Useful web sites'/><title type='text'>Murphy Laws</title><content type='html'>Murphy Laws Site - The origin and laws of Murphy in one place.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.murphys-laws.com/"&gt;http://www.murphys-laws.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-4079106881877538549?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/4079106881877538549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/09/murphy-laws.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/4079106881877538549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/4079106881877538549'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/09/murphy-laws.html' title='Murphy Laws'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-1550948404856795906</id><published>2010-09-04T08:47:00.001+01:00</published><updated>2010-09-04T08:49:06.070+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Useful web sites'/><title type='text'>5 Stages of Programmer Incompetence</title><content type='html'>&lt;a href="http://coderoom.wordpress.com/2010/03/19/5-stages-of-programmer-incompetence/"&gt;5 Stages of Programmer Incompetence&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-1550948404856795906?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/1550948404856795906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/09/5-stages-of-programmer-incompetence.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1550948404856795906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1550948404856795906'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/09/5-stages-of-programmer-incompetence.html' title='5 Stages of Programmer Incompetence'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-1363678198093298485</id><published>2010-09-04T08:42:00.001+01:00</published><updated>2010-09-04T08:44:08.212+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Useful web sites'/><title type='text'>Hurl</title><content type='html'>Perfect debugging solution for Web service programmers and consumers!&lt;br /&gt;Experiment with the web service and see what comes out before you program it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://hurl.it/"&gt;Hurl&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-1363678198093298485?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/1363678198093298485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/09/hurl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1363678198093298485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1363678198093298485'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/09/hurl.html' title='Hurl'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-2715608969385911875</id><published>2010-08-03T00:26:00.002+01:00</published><updated>2012-02-06T00:45:14.132+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Useful web sites'/><title type='text'>Learn Lyx in 60min by K++</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://www.adrive.com/public/b3dbe46d6491273fe53c854481866945d82cc9cb7a15d325372fa8fc89fbbba7.html"&gt;Learn Lyx in 60min by K++&lt;/a&gt;&lt;br /&gt;If the link is dead, ask me again for the file. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-2715608969385911875?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/2715608969385911875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/08/learn-lyx-in-60min-by-k.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/2715608969385911875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/2715608969385911875'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/08/learn-lyx-in-60min-by-k.html' title='Learn Lyx in 60min by K++'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-2510990226029865599</id><published>2010-07-19T21:48:00.004+01:00</published><updated>2012-02-06T00:41:53.889+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer systems architectures'/><title type='text'>A study on Plug-in system concept</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;h1&gt;A study on Plug-in system concept&lt;/h1&gt;&lt;h2&gt;Definitions&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Plug-in: A program that forms a part of another program. It is designed to depend on the Plug-in server. It communicates with the server thru its Plug-in API.&lt;/li&gt;&lt;li&gt;Plug-in server: A program designed to manage plug-ins.&lt;/li&gt;&lt;li&gt;Plug-in API: A programming interface that connects the plug-in to the server.&lt;/li&gt;&lt;li&gt;Server environment: Global variables or constants defined by the server that are part of the plug-in API. They are common to all plug-ins.&lt;/li&gt;&lt;li&gt;Plug-in environment: Variables or constants defined by the server that are part of the plug-in API. They are specific to each plug-in.&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-zj6ZbwRHsh0/Ty8TuFh8FUI/AAAAAAAAAN8/Dc1d02eTySM/s1600/Plug-in+system+concept.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-zj6ZbwRHsh0/Ty8TuFh8FUI/AAAAAAAAAN8/Dc1d02eTySM/s320/Plug-in+system+concept.png" width="187" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Specifications&lt;/h2&gt;&lt;h3&gt;Plug-in&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Self identification is optional unless required by the server.&lt;/li&gt;&lt;li&gt;After receiving unloading event, a plug-in must free all its associated resources and effectively unload from memory without leaving any executing code after it.&lt;/li&gt;&lt;li&gt;Can provide user interaction methods only if the server allows it.&lt;/li&gt;&lt;li&gt;It must be able to unload it self before the server does it. If this is wanted, the server must be notified about this.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Plug-in Server&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Self identification.&lt;/li&gt;&lt;li&gt;Registration and removal handling.&lt;/li&gt;&lt;li&gt;Loading and unloading handling.&lt;/li&gt;&lt;li&gt;Providing the Plug-in API interface.&lt;/li&gt;&lt;li&gt;Maintaining compatibility in API interfaces.&lt;/li&gt;&lt;li&gt;Sending vital plug-in events: Loading and unloading.&lt;/li&gt;&lt;li&gt;If it defines environments variables, it must handle mutual access to them by the plug-ins.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Plug-in API&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Interface can be of any type. Examples: DLL exported functions, DLL exported C++ classes, COM classes, IPC technologies (named pipes, sockets, RPC...), .NET interoperability, Java classes...&lt;/li&gt;&lt;li&gt;Different interfaces types may provide different capabilities but a basic level of capabilities must be shared by all theses.&lt;/li&gt;&lt;li&gt;Programming language independent, but may be binary dependent.&lt;/li&gt;&lt;li&gt;Error communicating methods are defined by the server.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Server environment&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;If a plug-in set them, other plug-ins must be notified.&lt;/li&gt;&lt;li&gt;A plug-in receiving environment-change-notification must be able to refuse the change or unload it self returning error to the server.&lt;/li&gt;&lt;li&gt;Each server environment entry must have a default value before loading the first plug-in.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;General recommandations about performance&lt;/h2&gt;&lt;h3&gt;Plug-in API&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Provide minimal interaction between the server and the plug-in.&lt;/li&gt;&lt;li&gt;Be simple and extendable. If advanced functionalities are required, they may be specified using special API entries or flags.&lt;/li&gt;&lt;li&gt;Provide a way to set environment entries in batch mode.&lt;/li&gt;&lt;li&gt;DLLs are very efficient as an interface so use them when you can, this implies using any DLL-based technology (DLL exported functions, DLL exported C++ classes, in-process COM classes).&lt;/li&gt;&lt;li&gt;IPC technologies provide other sets of options for the plug-in (executing code out-of-process, networking, operating system independency, possibility of using other programming languages…) but they are not recommended.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Networking implemented transparently in IPC technologies (socket, RPC using socket, COM Class Proxies) slows down significantly interaction performance and should be handled specifically and with care.&lt;/li&gt;&lt;li&gt;Executing out-of-process code requires explicit synchronization to be handled by the plug-in and adds much checking points before each interaction with the server and many features cannot be implemented using IPC communications.&lt;/li&gt;&lt;li&gt;Some older programming languages produce only executable modules (EXE) so they will oblige you to use IPC.&lt;/li&gt;&lt;li&gt;Operating system independency is very rarely required and it's very complex due to conversions needed before and after each single interaction and network management between both operating systems.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;.NET and Java plug-ins are not recommended because loading a single module containing .NET or Java code would require the server to load a big part of the .NET framework or the Java Virtual Machine. This recommendation may be obsolete in future if the operating system is based on the .NET framework or the machine contains Java Microprocessor, in both cases loading the considered plug-in will be very efficient.&lt;/li&gt;&lt;li&gt;If a plug-in module must be registered somehow to run properly (VB6 modules, .NET assemblies, Java applets…) it's recommended to make an installation program to this plug-in.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Plug-in Server&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Make plug-ins interaction in separate threads in order to maintain a responsive user interface and to take advantage of multithreading technologies.&lt;/li&gt;&lt;li&gt;If a server must make plug-in interaction in shared threads, it must provide a user interface showing that a plug-in interaction is in progress if such an interaction takes much time. This not recommended as it implies the ability of the user to "cancel" interaction which may be hard to implement or inefficient.&lt;/li&gt;&lt;li&gt;Use of structure versioning and flag masking is recommended for performance and compatibility&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Plug-in&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Avoid interaction with the server in loops.&lt;/li&gt;&lt;li&gt;If user interaction is designed, it should be separated from server interaction to maintain user interface responsiveness.&lt;/li&gt;&lt;li&gt;If multiple plug-ins are designed to the server, and the server supports multiple plug-ins in one module, then designing all the plug-ins in the same module is recommended in most cases.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;General recommandations about security&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Catch error cases from the plug-ins including fatal or unexpected errors. Example: SEH exceptions, hardware exceptions...&lt;/li&gt;&lt;li&gt;Using GUID to identify the plug-ins avoids collision between them.&lt;/li&gt;&lt;li&gt;If you have to choose between compiled, interpreted and script code, use compiled or interpreted when possible. Scripts present many security risks.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-2510990226029865599?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/2510990226029865599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/07/study-on-plug-in-system-concept_19.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/2510990226029865599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/2510990226029865599'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/07/study-on-plug-in-system-concept_19.html' title='A study on Plug-in system concept'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-zj6ZbwRHsh0/Ty8TuFh8FUI/AAAAAAAAAN8/Dc1d02eTySM/s72-c/Plug-in+system+concept.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-9081931088089151760</id><published>2010-03-26T16:07:00.004+01:00</published><updated>2010-03-26T16:09:33.783+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Favourite Words'/><title type='text'>The trick to the Graceful Exit</title><content type='html'>There's a trick to the Graceful Exit.&lt;br /&gt;It begins with the vision to recognize when a job, a life stage, a relationship is over -- and to let go.&lt;br /&gt;It means leaving what's over without denying its validity or its past importance in our lives.&lt;br /&gt;It involves a sense of future, a belief that every exit line is an entry, that we are moving on, rather than out.&lt;br /&gt;The trick of retiring well may be the trick of living well.&lt;br /&gt;It's hard to recognize that life isn't a holding action, but a process.&lt;br /&gt;It's hard to learn that we don't leave the best parts of ourselves behind, back in the dugout or the office.&lt;br /&gt;We own what we learned back there.&lt;br /&gt;The experiences and the growth are grafted onto our lives.&lt;br /&gt;And when we exit, we can take ourselves along -- quite gracefully...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-9081931088089151760?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/9081931088089151760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/03/trick-to-graceful-exit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/9081931088089151760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/9081931088089151760'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/03/trick-to-graceful-exit.html' title='The trick to the Graceful Exit'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-1039409504792885512</id><published>2010-03-22T15:32:00.002+01:00</published><updated>2010-03-26T16:10:01.696+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Favourite Words'/><title type='text'>Grand Corps Malade - Mental</title><content type='html'>S'il y a bien une idée qui rassemble, une pensée qu'est pas toute neuve&lt;br /&gt;C'est que quel que soit ton parcours, tu rencontres de belles épreuves.&lt;br /&gt;&lt;br /&gt;La vie c'est Mister Hyde, pas seulement Docteur Jekyll.&lt;br /&gt;J'ai vu le film depuis longtemps, la vie n'est pas un long fleuve tranquille.&lt;br /&gt;&lt;br /&gt;T'as qu'à voir les réactions d'un nouveau né à l'hôpital&lt;br /&gt;S'il chiale si fort c'est qu'il comprend que souvent la vie va lui faire mal.&lt;br /&gt;&lt;br /&gt;Y'a des rires, y'a des pleurs, y'a des bas, y'a des hauts.&lt;br /&gt;Y'a des soleils et des orages et je te parle pas que de météo.&lt;br /&gt;&lt;br /&gt;On vit dans un labyrinthe et y a des pièges à chaque virage&lt;br /&gt;A nous de les esquiver et de pas calculer les mirages.&lt;br /&gt;&lt;br /&gt;Mais le destin est un farceur, on peut tomber à chaque instant&lt;br /&gt;Pour l'affronter, faut du cœur, et un mental de résistant.&lt;br /&gt;&lt;br /&gt;J'ai des cicatrices plein la peau, et quelques unes dans mes souvenirs&lt;br /&gt;Y'a des rescapés partout, j'suis un exemple, ça va sans dire&lt;br /&gt;Ca doit se sentir, faut pas se mentir, la vie c'est .aussi la guérison&lt;br /&gt;Après la foudre, prends toi en main et redessine ton horizon.&lt;br /&gt;&lt;br /&gt;Y'a des tempêtes sans visage où on doit se battre contre le pire&lt;br /&gt;Personne n'y échappe Rouda c'est pas toi qui vas me contredire&lt;br /&gt;C'est l'ultime épreuve où tu affrontes la pire souffrance morale&lt;br /&gt;Quand la peine rejoint l’impuissance pour la plus triste des chorales.&lt;br /&gt;&lt;br /&gt;J'ai vu des drames à cœur ouvert j'ai vu des gens qui s'accrochent&lt;br /&gt;Ce qui est bien avec le drame, c'est que tu le partages avec tes proches&lt;br /&gt;Pour les miens il est peut-être l'heure de m'arrêter un court instant&lt;br /&gt;Pour les remercier d'avoir du cœur et un mental de résistant.&lt;br /&gt;&lt;br /&gt;La vie est aussi perverse, ce que tu désires elle l’a caché&lt;br /&gt;Elle te le donnera pas tout cuit. il va falloir aller le chercher.&lt;br /&gt;&lt;br /&gt;Du coup ce qu'on a, on le mérite, au hasard on a rien piqué&lt;br /&gt;Et si t'as pas compris, va voir mes potes ils vont t'expliquer.&lt;br /&gt;&lt;br /&gt;Jacky, tu m'as dit que l'ascenseur social était bloqué&lt;br /&gt;Toi t'es allé chez Otis et le réparateur tu l'as braqué&lt;br /&gt;Sans craquer, sans rémission, t'as affronté de vraies missions&lt;br /&gt;Tu m'as montré qu'avoir du mental. c'est aussi avoir de l'ambition.&lt;br /&gt;&lt;br /&gt;Y'a pas de chemin facile, Brahim t'as rien demandé à personne&lt;br /&gt;T’as tout construit de tes mains et y'a pas que moi que tu impressionnes.&lt;br /&gt;&lt;br /&gt;Toi Sami t'es notre moteur parce que tu sais depuis longtemps&lt;br /&gt;Que pour que ca chémar il faut du cœur et un mental de résistant.&lt;br /&gt;&lt;br /&gt;Je crois qu'on a tous une bonne étoile sauf que des fois elle est bien, planquée&lt;br /&gt;Certaines même plus que d'autres, il faut aller les débusquer.&lt;br /&gt;&lt;br /&gt;Parfois ça prend du temps quand tu fais trois fois le tour du ciel&lt;br /&gt;Mais si tu cherches c'est que tu avances, à mon avis c'est l'essentiel.&lt;br /&gt;&lt;br /&gt;Je fais partie de ceux qui pensent qu'y a pas de barrière infranchissable&lt;br /&gt;Il faut y croire un peu, y'a bien des fleurs qui poussent dans le sable&lt;br /&gt;Et' c’est quand tu te bats qu'il y a de belles victoires que tu peux arracher&lt;br /&gt;Comme se relever avec une moelle épinière en papier mâché.&lt;br /&gt;&lt;br /&gt;Je n'apprends rien à personne, tu es vivant tu sais ce que c'est.&lt;br /&gt;Vivre c'est accepter la douleur, les échecs et les décès&lt;br /&gt;Mais c'est aussi plein de bonheur, on va le trouver en insistant.&lt;br /&gt;Et pour ça, faut du cœur et un mental de résistant.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-1039409504792885512?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/1039409504792885512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/03/grand-corps-malade-mental.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1039409504792885512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1039409504792885512'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/03/grand-corps-malade-mental.html' title='Grand Corps Malade - Mental'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-981348200083191906</id><published>2010-03-03T20:56:00.003+01:00</published><updated>2010-03-26T16:10:24.734+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Favourite Words'/><title type='text'>Idir, La pluie</title><content type='html'>&lt;span style="font-family:georgia;"&gt;Tant de pluie tout à coup sur nos fronts, sur nos champs, nos maisons.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Un déluge, ici l'orage en cette saison, quelle en est la raison?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Est-ce pour noyer tous nos parjures? ou laver nos blessures?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Est-ce pour des moissons, des terreaux plus fertils?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Est-ce pour les détruire?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Pourquoi cette pluie? Pourquoi? Est-ce un message, est-ce un cri du ciel?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;J'ai froid mon pays, j'ai froid. As-tu perdu les rayons de ton soleil?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Pourquoi cette pluie? Pourquoi? Est-ce un bienfait? Est-ce pour nous punir?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;J'ai froid mon pays, j'ai froid. Faut-il le feter ou bien le maudir?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;J'ai cherché dans le livre qui sait, au creu de ses versets.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;J'y ai lu: "Cherche les réponses à ta question. Cherche le trait d'union".&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Une mendiante sur mon chemin, que fais-tu dans la rue?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Mes fils et mon mari sont partis un matin, aucun n'est revenu...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Pourquoi cette pluie? Pourquoi? Cette eau, ces nuages qui nous étonnent?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Elle dit cette pluie:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;        "Tu vois, ce sont des pleurs pour les yeux des Hommes.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;        C'est pour vous donner des larmes, depuis trop longtemps elles ont séché.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;           Les Hommes n'oublient pas les armes quand ils ne savent plus pleurer..."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Coule pluie, coule sur nos fronts...&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6673962022818192802-981348200083191906?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/981348200083191906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2010/03/idir-la-pluie.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/981348200083191906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/981348200083191906'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2010/03/idir-la-pluie.html' title='Idir, La pluie'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-1845775073634767370</id><published>2009-11-09T13:22:00.013+01:00</published><updated>2009-11-09T14:05:20.127+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ENSI II2I Network module'/><title type='text'>Client/Server network communication using socket</title><content type='html'>&lt;span style="font-weight: bold;font-size:180%;" &gt;Task:&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Make a server program which listens for connection from multiple clients. It receives data from the client and prints it on the standard output.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make a client program which connects to the given server. It sends data to it.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;Notes:&lt;/span&gt;&lt;ul&gt;&lt;li&gt;The clients are served in parallel, each connected client has a thread associated. There is no explicit limit on the number of connected clients.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The client is portable on Linux and Windows. It uses Winsock 2 API on Windows.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The server runs only on Linux because it uses the pthread API.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The connection protocol can use virtually any protocol (including IPv4 and IPv6).&lt;/li&gt;&lt;li&gt;The server uses the port 20200 by default. This can be changed in command line arguments.&lt;/li&gt;&lt;li&gt;The client uses port 20200 by default, and tries to connect to a server running on &lt;span style="font-style: italic;"&gt;localhost&lt;/span&gt;. This can be changed in command line arguments.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;Source package:&lt;/span&gt;&lt;br /&gt;The source package contains the client and server sources. If you have Linux, extract its contents and run &lt;span style="font-style: italic;"&gt;make&lt;/span&gt;. It will compile both of them. Once done, you will find a new directory called &lt;span style="font-style: italic;"&gt;bin&lt;/span&gt;, inside which another called &lt;span style="font-style: italic;"&gt;debug&lt;/span&gt;, inside which you find two executable files: the server &lt;span style="font-style: italic;"&gt;nsa_server&lt;/span&gt; and the client &lt;span style="font-style: italic;"&gt;nsa_client&lt;/span&gt;.&lt;br /&gt;Here is a link for download: &lt;a href="http://sites.google.com/site/koutheir/nsa.tar.gz"&gt;nsa.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;Wireshark screenshots:&lt;/span&gt;&lt;br /&gt;Using wireshark, we watched the network activity between the client and server. We made a local connection (on the &lt;span style="font-style: italic;"&gt;localhost&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_mRvs86akvGM/SvgR6vdCRAI/AAAAAAAAAFY/f_YUIQ2LbyM/s1600-h/Screenshot.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 57px;" src="http://3.bp.blogspot.com/_mRvs86akvGM/SvgR6vdCRAI/AAAAAAAAAFY/f_YUIQ2LbyM/s400/Screenshot.png" alt="" id="BLOGGER_PHOTO_ID_5402087453899244546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The network activity is described as follows:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The first 3 frames indicate connection requests (SYN) from the client and the server along with connection acknowledgements.&lt;/li&gt;&lt;li&gt;The following 2 frames indicate that the client sent data to the server which acknowledged it. The data was "HELLO!!!".&lt;/li&gt;&lt;li&gt;The last 3 frames indicate connection closing by both client and server along with the respective acknowledgements.&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/6673962022818192802-1845775073634767370?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/1845775073634767370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2009/11/clientserver-network-communication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1845775073634767370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/1845775073634767370'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2009/11/clientserver-network-communication.html' title='Client/Server network communication using socket'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_mRvs86akvGM/SvgR6vdCRAI/AAAAAAAAAFY/f_YUIQ2LbyM/s72-c/Screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-280515625775334396</id><published>2009-10-23T10:52:00.004+01:00</published><updated>2009-10-23T11:22:48.817+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computing environments'/><title type='text'>Virus Programming</title><content type='html'>&lt;a href="http://sites.google.com/site/koutheir/Virus_Programming_Expose.ppt"&gt;The way through the mystery&lt;/a&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;What is a Virus?&lt;/li&gt;&lt;li&gt;Who makes a virus?&lt;/li&gt;&lt;li&gt;For what purpose?&lt;/li&gt;&lt;li&gt;How it gets done?&lt;/li&gt;&lt;li&gt;Would you do that yourself?&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/6673962022818192802-280515625775334396?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/280515625775334396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2009/10/virus-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/280515625775334396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/280515625775334396'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2009/10/virus-programming.html' title='Virus Programming'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-5878765713860682644</id><published>2009-10-21T13:19:00.007+01:00</published><updated>2009-10-23T17:25:52.484+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ENSI II2I Network module'/><title type='text'>Task: Network monitoring using Wireshark</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;font size='4'&gt;Task:&lt;/font&gt;&lt;br/&gt;&lt;ol&gt;&lt;li&gt;In ENSI, connect to the wireless network available. Then open a site hosted in Tunisia.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Use Wireshark to monitor the network activity.&lt;/li&gt;&lt;li&gt;Filter the traffic of my own machine.&lt;/li&gt;&lt;li&gt;Generate a network traffic schematic and comment.&lt;/li&gt;&lt;/ol&gt;&lt;font size='4'&gt;Work:&lt;/font&gt;&lt;br/&gt;The site I'll be using is &lt;a href='http://www.ensi.rnu.tn'&gt;&lt;b&gt;http://www.ensi.rnu.tn&lt;/b&gt;&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;I connect to the network, install &lt;b&gt;wireshark&lt;/b&gt;. Then open a shell, type:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;su&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;to become a root.&lt;br/&gt;&lt;br/&gt;I'm connected behind a proxy server whose IP address is 10.0.0.22 on port 80.&lt;br/&gt;To clear ARP cache for the proxy server, I type&lt;b&gt;:&lt;br/&gt;&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;arp -d 10.0.0.22&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br/&gt;I need to clear &lt;b&gt;firefox&lt;/b&gt; browser cache, to ensure the site I open is loaded entirely from network, not from local cache. So I type:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;firefox &amp;amp;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;then I use the menu command "Tools &amp;gt; Clear Recent History" and choose to clear everything. Then I close firefox.&lt;br/&gt;&lt;br/&gt; I type:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;ifconfig&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;This gives me the list of network interfaces available on my system. I find out that &lt;b&gt;eth1 &lt;/b&gt;is the wireless network card. I note the MAC address of the interface as I'll need it later. My MAC address will be noted later &lt;b&gt;myMAC&lt;/b&gt;.&lt;br/&gt;&lt;br/&gt;I leave the console open and  start wireshark as root to start capturing the traffic for the interface eth1.&lt;br/&gt;&lt;br/&gt;I go back to the console and type:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;firefox www.ensi.rnu.tn &amp;amp;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;to access the site. Once the site is fully displayed, I close firefox, stop wireshark capturing and save the capture to a file.&lt;br/&gt;&lt;br/&gt;In order to see only the traffic related to my computer, I filter the traffic by &lt;b&gt;Ethernet II MAC address&lt;/b&gt; (either as a source address or as a destination address). The appropriate filter for doing that is&lt;b&gt;:&lt;br/&gt;&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;eth.addr == myMAC&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br/&gt;To further limit the traffic and see only the HTTP traffic, the wireshark filter becomes&lt;b&gt;:&lt;br/&gt;&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;eth.addr == myMAC &amp;amp;&amp;amp; http&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;There are several phases in the HTTP capture:&lt;br/&gt;&lt;ol&gt;&lt;li&gt;A HTTP &lt;b&gt;GET&lt;/b&gt; request is sent to to the proxy server in order to initiate loading of site contents data.&lt;/li&gt;&lt;li&gt;The sent request is acknowledged by the server using a HTTP &lt;b&gt;OK&lt;/b&gt; and specifies that the wanted information is a html page.&lt;/li&gt;&lt;li&gt;Then several HTTP GET requests are made to get the files embedded into the home page. Along with respective acknowledgements.&lt;/li&gt;&lt;li&gt;Finally a HTTP GET request is sent to get the site favourite icon, but in our case the site does not offer an icon. So the request is acknowledged by a HTTP 404 Not Found.&lt;/li&gt;&lt;/ol&gt;Please view the &lt;big&gt;&lt;big&gt;&lt;b&gt;complete image&lt;/b&gt;&lt;/big&gt;&lt;/big&gt; for full details (the blog may display only a part of it, right-click on the image and select "view the image").&lt;br/&gt;&lt;img style='max-width: 800px;' src='http://lh5.ggpht.com/_mRvs86akvGM/SuHXsUIOUJI/AAAAAAAAAFA/9JHgJLfKA5A/%5BUNSET%5D.png?imgmax=800'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;img style='max-width: 800px;' src='http://lh5.ggpht.com/_mRvs86akvGM/SuHX2a-qrmI/AAAAAAAAAFE/GFCd59NqScY/%5BUNSET%5D.png?imgmax=800'/&gt;&lt;br/&gt;We change the filter to see only TCP and HTTP traffic, so it becomes&lt;b&gt;:&lt;br/&gt;&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;eth.addr == myMAC &amp;amp;&amp;amp; tcp&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;We note that the HTTP requests delimit the TCP requests, it means that HTTP requests start and end the data transfers.&lt;br/&gt;These are some of the steps captured in wireshark:&lt;br/&gt;&lt;ol&gt;&lt;li&gt;In the beginning, the system establishes the connection with the proxy server, that's why it sends the server &lt;b&gt;SYN&lt;/b&gt; TCP request. The server accepts the connection and acknowledges it by sending TCP &lt;b&gt;SYN ACK&lt;/b&gt; frame. Then the system acknowledges the SYN ACK by sending the server a TCP &lt;b&gt;ACK&lt;/b&gt; frame.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;The system sends the HTTP GET request as mentioned earlier. The server acknowledges it first by sending the system a TCP ACK frame. Then it starts sending data to the system.&lt;/li&gt;&lt;li&gt;After each frame of data well received by the system, the system sends an acknowledgement to the server to allow it to send the next data frame.&lt;/li&gt;&lt;li&gt;After all data requested by the last HTTP GET request has been sent to the system, the proxy server sends the HTTP OK frame to indicate the end of data. As usual, this frame is acknowledged by the system by sending a TCP ACK frame.&lt;/li&gt;&lt;li&gt;In the very end of the capture, we observe the acknowledgements which involve TCP &lt;b&gt;FIN&lt;/b&gt; frame. This ends the data transfer.&lt;br/&gt;&lt;/li&gt;&lt;/ol&gt;&lt;img style='max-width: 800px;' src='http://lh3.ggpht.com/_mRvs86akvGM/SuHYBWgoDqI/AAAAAAAAAFI/s5Q9MQRcbFU/%5BUNSET%5D.png?imgmax=800'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;img style='max-width: 800px;' src='http://lh3.ggpht.com/_mRvs86akvGM/SuHYJXJ0kcI/AAAAAAAAAFM/OYeM3WN_lV8/%5BUNSET%5D.png?imgmax=800'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=38cee57e-be73-8a93-b294-eca5f2b72549' alt='' class='zemanta-pixie-img'/&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/6673962022818192802-5878765713860682644?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/5878765713860682644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2009/10/task-network-monitoring-using-wireshark.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/5878765713860682644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/5878765713860682644'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2009/10/task-network-monitoring-using-wireshark.html' title='Task: Network monitoring using Wireshark'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_mRvs86akvGM/SuHXsUIOUJI/AAAAAAAAAFA/9JHgJLfKA5A/s72-c/%5BUNSET%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6673962022818192802.post-862348965991635359</id><published>2009-10-21T12:56:00.006+01:00</published><updated>2009-10-23T10:49:22.643+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computer systems architectures'/><title type='text'>A simple simulator for the Intel 8086 16 bits microprocessor</title><content type='html'>Currently, I8086 is a simulator application for 16 bits-based programs, this means that it tries to reproduce the same execution results for a given program as it might come out when executing the program on a real 8086 CPU.&lt;br /&gt;&lt;br /&gt;It does not execute it in real-time, nor does it handle all the features of the processor.&lt;br /&gt;&lt;br /&gt;I8086SIM is a set of 32-bits Windows-based programs written in C++ and inline x86 Assembly using Microsoft Visual Studio 2008 Service Pack 1 (Visual C++ version 9.0). It runs on Windows 2000 and later.&lt;br /&gt;&lt;br /&gt;I8086SIM is command line driven. It can disassemble and simulate the execution of a 16 bits program in an isolated virtual machine enabling user inputs to the program and printing the outputs it produces. The program and the simulator work in two independent consoles, enabling consistent display and parallel monitoring.&lt;br /&gt;&lt;br /&gt;I8086 was only built for simple demonstration purposes by Koutheir Attouchi in 2009.&lt;br /&gt;Here are the files:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sites.google.com/site/koutheir/i8086sim.pdf"&gt;The report&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://sites.google.com/site/koutheir/i8086sim.zip"&gt;The program source code&lt;/a&gt;.&lt;br /&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/6673962022818192802-862348965991635359?l=koutheir.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://koutheir.blogspot.com/feeds/862348965991635359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://koutheir.blogspot.com/2009/10/simple-simulator-for-intel-8086-16-bits.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/862348965991635359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6673962022818192802/posts/default/862348965991635359'/><link rel='alternate' type='text/html' href='http://koutheir.blogspot.com/2009/10/simple-simulator-for-intel-8086-16-bits.html' title='A simple simulator for the Intel 8086 16 bits microprocessor'/><author><name>Koutheir Attouchi</name><uri>https://profiles.google.com/105695455299691729476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-0w0Z_kBPvAQ/AAAAAAAAAAI/AAAAAAAAANg/aMCoIEuKqBY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
