Wednesday 31 August 2016

How To Compress Drive To Save Disk Space Using NTFS Compression?




ntfs-compression-windowsShort Bytes: Microsoft Windows has abilities to compress your hard drive. The compression works for the drives formatted using the NTFS file system and for folders resting on an NTFS drive. You can also use NTFS compression on a pen drive by formatting it to NTFS.
The NTFS compression feature present in the Windows operating system comes handy when you want to squeeze your existing data to get some extra space. There are other useful methods for data compression but these require the data to be packed inside a zip or RAR file.
Shrinking files using NTFS compression will increase the workout done by your CPU while decompressing it. However, modern CPUs won’t give a sweat on this. Compressing the files won’t increase the access time. Instead, it may contribute lesser access time. This is because the files are first transferred to the RAM and then decompressed. A small-sized file could be transferred more quickly than a larger one.
An important point to be noted is that the compressions will only work for the stuff which can be compressed. This means that audio and video files, which are already compressed, won’t get shrunk considerably than the uncompressed ones like the word files and PDFs.
However, using NTFS compression on system files may not be beneficial to the health of your system. It may contribute to degradation in performance. It is not recommended to do so.

How To Compress Drive To Save Disk Space Using NTFS Compression?

The drive that needs to be compressed should be formatted to use the NTFS file system. External storage devices like USB drives are formatted using the FAT32 file system. So, you’ll have to reformat it in order to enable NTFS compression.
Here are the steps to enable NTFS compression in Windows:
  1. Open My Computer/This PC.
  2. Right-click the desired drive and click Properties.
  3. Tick the checkbox for Compress drive to save disk space. Click Apply.
    compress1
  4. Tick Apply changes to folder, subfolder, and files. Click Ok. It will take some time depending the size of your drive.
    compress2
  5. To undo NTFS compression, untick the Compress drive to save disk space check box and follow similar steps.

How to compress contents of a folder to save space?

  1. Go to the Properties of that folder.
  2. Click Advanced.
    compress3
  3. Tick Compress contents to save disk space.
    compress4
  4. Click Apply changes to this folder, sub folders and files. Click Ok.
  5. To undo NTFS compression, follow similar steps and untick Compress contents to save disk space.
Using NTFS compression to compress drives won’t drastically reduce your disk size. But it is good in the situations when you are out of space and want to store some important data, and also for keeping the files which you don’t use very often.
If you have something to add, tell us in the comments below.\

Reference Link:
http://fossbytes.com/how-to-compress-drive-to-save-disk-space-using-ntfs-compression/



Dynamic Programming - Making Change Problem C Code


Dynamic Programming & making Change :

Dynamic programming algorithms are often used for optimization. A dynamic programming algorithm will examine the previously solved subproblems and will combine their solutions to give the best solution for the given problem. In comparison, a greedy algorithm treats the solution as some sequence of steps and picks the locally optimal choice at each step. Using a greedy algorithm does not guarantee an optimal solution, because picking locally optimal choices may result in a bad global solution, but it is often faster to calculate. Fortunately, some greedy algorithms (such as Kruskal's or Prim's for minimum spanning trees) are proven to lead to the optimal solution.
For example, in the coin change problem of finding the minimum number of coins of given denominations needed to make a given amount, a dynamic programming algorithm would find an optimal solution for each amount by first finding an optimal solution for each smaller amount and then using these solutions to construct an optimal solution for the larger amount. In contrast, a greedy algorithm might treat the solution as a sequence of coins, starting from the given amount and at each step subtracting the largest possible coin denomination that is less than the current remaining amount. If the coin denominations are 1,4,5,15,20 and the given amount is 23, this greedy algorithm gives a non-optimal solution of 20+1+1+1, while the optimal solution is 15+4+4..

C Coding for making Change : -

#include<iostream>
#define Infinite 10000
using namespace std;
int main()
{
    cout << "Total Number of COinS : ";
    int noC;
    cin >> noC;
    int Coin[noC];
    for(int i=0;i<noC;i++)
    {
        cout << "Enter Value of " << i+1 << " Coin :";
        cin >> Coin[i];
    }
    cout << "Enter Amount : ";
    int amount ;
    cin >> amount ;
    int dynamicArr[amount+1][noC+1];
    for(int i=0;i<=noC;i++)
    {
        for(int j=0;j<=amount;j++)
        {
            if(j==0)
            {
                dynamicArr[i][j] = 0;
            }
            else if(i==0)
            {
                dynamicArr[i][j] = Infinite;
            }
            else if()

                /*WIll be Uploaded SOon OR Try by urself*/
        }
    }

}

Sunday 7 August 2016

What is Fault Tolerant System ?


Fault Tolerant System -:
Fault tolerance is the property that enables a system to continue operating properly in the event of the failure of (or one or more faults within) some of its components. If its operating quality decreases at all, the decrease is proportional to the severity of the failure, as compared to a naively designed system in which even a small failure can cause total breakdown. Fault tolerance is particularly sought after in high-availability or life-critical systems. The ability of maintaining functionality when portions of a system break down is referred to as graceful degradation.[1]
fault-tolerant design enables a system to continue its intended operation, possibly at a reduced level, rather than failing completely, when some part of the system fails.[2] The term is most commonly used to describe computer systems designed to continue more or less fully operational with, perhaps, a reduction in throughput or an increase in response time in the event of some partial failure. That is, the system as a whole is not stopped due to problems either in the hardware or thesoftware. An example in another field is a motor vehicle designed so it will continue to be drivable if one of the tires is punctured. A structure is able to retain its integrity in the presence of damage due to causes such as fatiguecorrosion, manufacturing flaws, or impact.
Within the scope of an individual system, fault tolerance can be achieved by anticipating exceptional conditions and building the system to cope with them, and, in general, aiming for self-stabilization so that the system converges towards an error-free state. However, if the consequences of a system failure are catastrophic, or the cost of making it sufficiently reliable is very high, a better solution may be to use some form of duplication. In any case, if the consequence of a system failure is so catastrophic, the system must be able to use reversion to fall back to a safe mode. This is similar to roll-back recovery but can be a human action if humans are present in the loop.

Optimizing Cauchy Reed-Solomon Codes for Fault-Tolerant Storage Applications :- 

Abstract
In the past few years, all manner of storage systems,
ranging fromdisk array systems to distributed and widearea
systems, have started to grapple with the reality
of tolerating multiple simultaneous failures of storage
nodes. Unlike the single failure case, which is optimally
handled with RAID Level-5 parity, the multiple failure
case is more difficult because optimal general purpose
strategies are not yet known.
Erasure Coding is the field of research that deals with
these strategies, and this field has blossomed in recent
years. Despite this research, the decades-old strategy of
Reed-Solomon coding remains the only space-optimal
(MDS) code for all but the smallest storage systems.
The best performing implementations of Reed-Solomon
coding employ a variant called Cauchy Reed-Solomon
coding, developed in the mid 1990’s [BKK+95].
In this paper, we present an improvement to Cauchy
Reed-Solomon coding that is based on optimizing the
Cauchy distribution matrix. We detail an algorithm
for generating good matrices and then evaluate the
performance of encoding using all manners of Reed-
Solomon coding, plus the best MDS codes from the literature.
The improvements over the original Cauchy
Reed-Solomon codes are as much as 83% in realistic
scenarios, and average roughly 10% over all cases that
we tested.

For More Reference :

Tuesday 2 August 2016

What is COW(Copy On Write) in Linux ?

Copy-on-write in LINUX -OS


Copy-on-write (sometimes referred to as "COW"), sometimes referred to as implicit sharing, is an optimization strategy used in computer programming. Copy-on-write stems from the understanding that when multiple separate tasks use initially identical copies of some information (i.e., data stored in computer memory or disk storage), treating it as local data, each task working on its own "copy of the data", that they may occasionally need to modify, then it is not necessary to immediately create separate copies of that information for each task. Instead they can all be given pointers to the same resource, with the provision that on the first occasion where they need to modify the data, only then must they first create a local copy on which to perform the modification (the original resource remains unchanged). By sharing resources this way it is possible to make significant resource savings in cases there are many separate processes all using the same resource, each with a small likelihood of having to modify it at all. Copy-on-write is the name given to the policy that whenever a task attempts to make a change to the shared information, it should first create a separate (private) copy of that information to prevent its changes from becoming visible to all the other tasks. If this policy is enforced by the operating system kernel, then the fact of being given a reference to shared information rather than a private copy can be transparent to all tasks, whether they need to modify the information or not.[1]

Copy-on-write filesystem

To address the problems associated with existing disk filesystems, the Power-Safe filesystem never overwrites live data; it does all updates using copy-on-write (COW), assembling a new view of the filesystem in unused blocks on the disk. The new view of the filesystem becomes "live" only when all the updates are safely written on the disk. Everything is COW: both metadata and user data are protected.
To see how this works, let's consider how the data is stored. A Power-Safe filesystem is divided into logical blocks, the size of which you can specify when you use mkqnx6fs to format the filesystem. Each inode includes 16 pointers to blocks. If the file is smaller than 16 blocks, the inode points to the data blocks directly. If the file is any bigger, those 16 blocks become pointers to more blocks, and so on.
The final block pointers to the real data are all in the leaves and are all at the same level. In some other filesystems—such as EXT2—a file always has some direct blocks, some indirect ones, and some double indirect, so you go to different levels to get to different parts of the file. With the Power-Safe filesystem, all the user data for a file is at the same level.
If you change some data, it's written in one or more unused blocks, and the original data remains unchanged. The list of indirect block pointers must be modified to refer to the newly used blocks, but again the filesystem copies the existing block of pointers and modifies the copy. The filesystem then updates the inode—once again by modifying a copy—to refer to the new block of indirect pointers. When the operation is complete, the original data and the pointers to it remain intact, but there's a new set of blocks, indirect pointers, and inode for the modified data:
This has several implications for the COW filesystem:
  • The bitmap and inodes are treated in the same way as user files.
  • Any filesystem block can be relocated, so there aren't any fixed locations, such as those for the root block or bitmap in the QNX 4 filesystem
  • The filesystem must be completely self-referential.
superblock is a global root block that contains the inodes for the system bitmap and inodes files. A Power-Safe filesystem maintains two superblocks:
  • a stable superblock that reflects the original version of all the blocks
  • a working superblock that reflects the modified data
The working superblock can include pointers to blocks in the stable superblock. These blocks contain data that hasn't yet been modified. The inodes and bitmap for the working superblock grow from it.
snapshot is a consistent view of the filesystem (simply a committed superblock). To take a snapshot, the filesystem:
  1. Locks the filesystem to make sure that it's in a stable state; all client activity is suspended, and there must be no active operations.
  2. Writes all the copied blocks to disk. The order isn't important (as it is for the QNX 4 filesystem), so it can be optimized.
  3. Forces the data to be synchronized to disk, including flushing any hardware track cache.
  4. Constructs the superblock, recording the new location of the bitmap and inodes, incrementing its sequence number, and calculating a CRC.
  5. Writes the superblock to disk.
  6. Switches between the working and committed views. The old versions of the copied blocks are freed and become available for use.
To mount the disk at startup, the filesystem simply reads the superblocks from disk, validates their CRCs, and then chooses the one with the higher sequence number. There's no need to run chkfsys or replay a transaction log. The time it takes to mount the filesystem is the time it takes to read a couple of blocks

For More Reference :
http://www.cis.upenn.edu/~jms/cw-fork.pdf

How to install google-chrome in redhat without redhat subscription

Install google-chrome in redhat  Download the .rpm file of chrome https://www.google.com/chrome/thank-you.html?installdataindex=empty&st...