Tuesday, 30 September 2014

BITCOINS MINING


Governments only print more money when they need to. But in bitcoin, money isn’t printed at all – it is discovered.

WHAT ARE BITCOINS?

ü  Bitcoins are electronic currency
ü  Also known as 'cryptocurrency'
ü  form of digital public money that is created by cautious mathematical computations, and policed by millions of computer users called 'miners'.
ü  Bitcins are electricity converted into long strings of code that have money value.

HOW BITCOINS WORK?
ü  Practical coins designed to be 'self-contained' for their value
ü  perform like physical gold coins they keep value and job
ü  no need for banks to move and store the money
ü  You can use your bitcoins to buying goods and services online
ü  you can gather them away and hope that their value increases over the years.
ü  Known as another “wallet” to person.( A wallet is a small personal database that you store on your computer drive, on your smartphone, on your tablet, or somewhere in the cloud.)
ü  Bitcoin transactions are sent from and to electronic bitcoin wallets, and are digitally signed for security.

HOW DOES MINING HAPPEN?
ü  Computers around the world ‘mine’ for coins by competing with each other.
ü  People are transfer bitcoins to each other over the bitcoin network everytime, but if someone saves a record of all these transactions, no-one would be capable to keep track of who had paid what. The bitcoin network transactions with this by collecting all of the transactions made during a set period into a list, called a block.
ü  It’s the miners’ job to confirm those transactions, and write them into a universal ledger.

HOW MUCH ARE BITCOINS VALUE?

ü  currently value around $600 US dollars 
ü  There are approximately $1.9 billion USD worth of bitcoins in existence, with approximately $2 billion more to be created.
ü  Bitcoins will stop being created when the total number reaches 21 billion coins, maybe around the year 2040




Monday, 29 September 2014

1st Week Blog Marks

10 out of 10 marks were given for any students that posted anything for the first week. HOWEVER, for the 2nd week, originality and quality of posts will be taken into consideration. Marks deduction for any blog posts that is a copy from other places/person.

Followings are the marks for 1st week's blog posts. For students with (???) behind their name, please change your blogger's name so that it is nearer to your real name.

NameMarks
Nur Ain Syuhada Mohd Asri10
Norjannah Mat Rofi10
Yazid Syaizer (???)10
Nurul Nabilah Azman10
Serikandi Solehah (???)10
Nur Hazwani Mohd Fuad10
Nurkhatijah Zahid10
Nursyazima Nordin10
Nurshafinaz Rosli10
Siti Aminah Ahmad Sahrel10
C.W. Nadhirah C.W. Mohd Zawawi10
Nur Fatin Naazira Mohamad10
Nazihah Omar10
Shila Diana (???)10
Muhammad Asraf Abd Samat10
Nor Farahana Zainul Hisham10
Muhammad Hafiz Safwan Jasmi10
Nur Mahirah Samad10
Nurul Syafiqah Kamaluddin10
Noor Assikin Rosdi10
Siti Nur'ain Adni Che Yusoff10
Pang Kok An10
Nor Farahin Rosli10
Nurul Fasihah Che Azmi10
Nur Lyana A. Azizis10
Adam Eve (???)10
Nurul Syazwani Kamarulzaman10
Muhamad Fadhil Aizad Alias10
Norshafinaz Mohamad Fauzi10
Noor Shuhaila Yusof10
Siti Amalin (???)10
Teoh Mok Chin10
Nurul Afnan Mahadi10
Nor Irma Fariza Mohd Zamri10
Nur Hani Mohd Kharani10
Nurhazirah Hamzah10
Eira Amiera (???)10
Roshatul Hidaya Rosdin10
Chew Xiang Leng10
Lo Chii Toh10


parallel computing,grid computing and supercomputing

What are parallel computing, grid computing, and supercomputing?


Parallel computing

Parallel computing is the concurrent use of multiple processors (CPUs) to do computational work.
In traditional (serial) programming, a single processor executes program instructions in a step-by-step manner. Some operations, however, have multiple steps that do not have time dependencies and therefore can be separated into multiple tasks to be executed simultaneously. For example, adding a number to all the elements of a matrix does not require that the result obtained from summing one element be acquired before summing the next element. Elements in the matrix can be made available to several processors, and the sums performed simultaneously, with the results available faster than if all operations had been performed serially.
Parallel computations can be performed on shared-memory systems with multiple CPUs, distributed-memory clusters made up of smaller shared-memory systems, or single-CPU systems. Coordinating the concurrent work of the multiple processors and synchronizing the results are handled by program calls to parallel libraries; these tasks usually require parallel programming expertise.
At Indiana University, the UITS Scientific Applications and Performance Tuning (SciAPT) group can help programmers convert serial codes to parallel code, and optimize the performance of parallel codes. To arrange a consultation, email SciAPT.

Grid computing

The term "grid computing" denotes the connection of distributed computing, visualization, and storage resources to solve large-scale computing problems that otherwise could not be solved within the limited memory, computing power, or I/O capacity of a system or cluster at a single location. Much as an electrical grid provides power to distributed sites on demand, a computing grid can supply the infrastructure needed for applications requiring very large computing and I/O capacity.
The creation of a functional grid requires a high-speed network and grid middleware that lets the distributed resources work together in a relatively transparent manner. For example, whereas sharing resources on a single large system may require a batch scheduler, scheduling and dispatching jobs that run concurrently across multiple systems in a grid requires a metascheduler that interacts with each of the local schedulers. Additionally, a grid authorization system may be required to map user identities to different accounts and authenticate users on the various systems.

Supercomputers

"Supercomputer" is a general term for computing systems capable of sustaining high-performance computing applications that require a large number of processors, shared or distributed memory, and multiple disks.

#7: Comparing the Arduino and Raspberry Pi

Sunday, 28 September 2014

example of parallel computer



Array Processing

    This example demonstrates calculations on 2-dimensional array elements, with the computation on each array element being independent from other array elements.

    The serial program calculates one element at a time in sequential order.

    Serial code could be of the form:


    do j = 1,n
    do i = 1,n
      a(i,j) = fcn(i,j)
    end do
    end do

    The calculation of elements is independent of one another - leads to an embarrassingly parallel situation.

    The problem should be computationally intensive.

    Embarrassingly parallel array calculation

Array Processing
Parallel Solution 1

    Arrays elements are distributed so that each processor owns a portion of an array (subarray).

    Independent calculation of array elements ensures there is no need for communication between tasks.

    Distribution scheme is chosen by other criteria, e.g. unit stride (stride of 1) through the subarrays. Unit stride maximizes cache/memory usage.

    Since it is desirable to have unit stride through the subarrays, the choice of a distribution scheme depends on the programming language. See the Block - Cyclic Distributions Diagram for the options.

    After the array is distributed, each task executes the portion of the loop corresponding to the data it owns.

    Notice that only the outer loop variables are different from the serial solution.

    Embarrassingly parallel array calculation data decomposition

One Possible Solution:

    Implement as a Single Program Multiple Data (SPMD) model.

    Master process initializes array, sends info to worker processes and receives results.

    Worker process receives info, performs its share of computation and sends results to master.

  

Array Processing
Parallel Solution 2: Pool of Tasks

    The previous array solution demonstrated static load balancing:
        Each task has a fixed amount of work to do
        May be significant idle time for faster or more lightly loaded processors - slowest tasks determines overall performance.

    Static load balancing is not usually a major concern if all tasks are performing the same amount of work on identical machines.

    If you have a load balance problem (some tasks work faster than others), you may benefit by using a "pool of tasks" scheme.

Pool of Tasks Scheme:

    Two processes are employed

    Master Process:
        Holds pool of tasks for worker processes to do
        Sends worker a task when requested
        Collects results from workers

    Worker Process: repeatedly does the following
        Gets task from master process
        Performs computation
        Sends results to master

    Worker processes do not know before runtime which portion of array they will handle or how many tasks they will perform.

    Dynamic load balancing occurs at run time: the faster tasks will get more work to do.

   

https://computing.llnl.gov/tutorials/parallel_comp/#Examples

Making of Raspberry Pi

Saturday, 27 September 2014

Parallel Computing

Do you confius what TCS 4063 is about?
PARALLEL COMPUTING

# The simultaneous use of multiple compute resources to solve a computational problem:
  • A problem is broken into discrete parts that can be solved concurrently
  • Each part is further broken down to a series of instructions
  • Instructions from each part execute simultaneously on different processors
  • An overall control/coordination mechanism is employed 



# The compute resources are typically:

  • A single computer with multiple processors/cores
  • An arbitrary number of such computers connected by a network

# The computational problem should be able to:
  • Be broken apart into discrete pieces of work that can be solved simultaneously
  • Execute multiple program instructions at any moment in time
  • Be solved in less time with multiple compute resources than with a single compute resource.  
Parallel Computer

# Virtually all stand-alone computers today are parallel from a hardware perspective:
  • Multiple functional units (L1 cache, L2 cache, branch, prefetch, decode, floating-point, graphics processing (GPU), integer, etc.)
  • Multiple execution units/cores
  • Multiple hardware threads


# Networks connect multiple stand-alone computers (nodes) to make larger parallel computer clusters.



Source : https://computing.llnl.gov/tutorials/parallel_comp/#Whatis

Written by : Nusaibah Yahaya
Post For Week 1


What can you do with a Raspberry Pi? What is a Raspberry Pi?

Just Bought A Raspberry Pi? 11 Things You Need To Know

The Fun Things To Do With Raspberry Pi

Do you know 25 fun things to do with a Raspberry Pi??





1. Mod My Pi
 Mod My Pi do a great range of colourful cases, using state of the art injection moulding techniques, and they're not a bad price either.

 2. Make your own Pi case
Fancy making your own case? Then this printable PDF will do the trick nicely. It's a template to cut out and glue to together (very Blue Peter), which will form a case for the RPi.

 3. Living room PC
Now your Pi is in a cool looking case, hook it up to your TV and enjoy a mini-media experience with OpenELEC. Follow the instructions, and you'll be up and running in no time.

 4. A mini Web browser
Since your Raspberry Pi is already hooked up to your TV, why not enjoy some big screen surfing? You'll need a better browser than Midori for this though, so try Chromium. Just drop into a Terminal and type: 'sudo apt- get install chromium-browser', then hit Enter.

 5. ZX Spectrum Pi
That lovable rubber keyboarded gem has made a grand entrance once again, this time with Raspberry insides. Getting the hardware to work is one thing, but to emulate this wonderful 8-bit beauty, type the following into the Terminal: 'sudo apt-get install fuse-emulator-common', and press Enter. Type 'y' to confirm the download and install. Once Fuse has been installed, and you are returned to the prompt, type: 'sudo apt-get install spectrum-roms fuse-emulator-utils', and press Enter. When, once again, you return to the prompt, type in: 'sudo amixer cset numid=3 2', and press Enter.

 6. Retro Pi
If the Spectrum whetted your appetite, then check out the RetroPie Project. With this you can emulate a wealth of old consoles: SNES, Mega Drive etc. The setup takes its toll on the old RPi and it's not the quickest install ever, but it's certainly worth it in the end. Follow these instructions and get gaming. It's important to remember that Nintendo takes an extremely dim view of you downloading even very old games that you own. But there are free classic games available legally online, with the permission of their creators, such as these.

 7. Arcade Pi
In fact, why not go one step further and create a full sized arcade cabinet? You could follow the instructions in this blog post from RPi user, Darren. Or, hunt around on eBay for an old arcade cabinet to tinker with.

 8. Windows 3.0 on a Pi
While we're on the subject of going retro, have a go at running DOS 6.22 and Windows 3.0 via QEMU. First, pay a visit to Kirsle and extract the VirtualBox (VDI) image, and using VirtualBox convert the VDI to a raw IMG by typing: 'vboxmanage clonehd "image.vdi" "image.img" --format RAW' (replacing 'image' with the name of your image). Next install QEMU by typing: 'sudo apt-get install qemu'. Then convert the raw image to a QEMU qcow image by typing: 'qemu- img convert -f raw image.img -O qcow2 image.qcow'. Finally run the image by typing: 'qemu image.qcow'. It's far from perfect, and has a tendency to freeze, but it's still fun.

 9. Robotics
Robots are generally quite cool -- obviously aside from the ones that wish to except for the ones that try to kill all of humanity. There are plenty of friendly robots out there. Online magazine RPi MagPi has a feature (from page 9 onwards) about how to make a robotic arm work with the RPi. 

10. Robotics 2
While we're on the subject of robots, MagPi also has a great project involving Big Track and the RPi.

 11. Learn to program
The RPi makes for a great programming platform, with a huge choice of languages available. Check some of them out on the eLinux wiki.

 12. Scratch the Pi
Scratch is a programming language that's easy to get to grips with and easy to use, which makes it good for children to start learning with and for creating rich programming projects. Check out this tutorial, featuring a bonus cat.

13. Spectrum BASIC for RPi
 Although you can play Spectrum games via the emulator, programming BASIC through the emulator just isn't the same. That being the case, use SpecBAS instead, which is a remake of Sinclair BASIC that's available with full instructions.

14. Pi Hacker
 Being as small as it is, the RPi would make an excellent hacking tool. Regardless of the ethics involved, try out this security penetration testing project.

 15. Firefox OS on Pi
 Although still in the developmental stages, Oleg Romashin an engineer at Nokia, has managed to get Firefox OS running on the Raspberry Pi. FFOS isn't out officially, but check out what's been achieved so far. (Update: You can find more from another developer here.)

 16. RISC OS for Pi
 If you fancy a blast from the past, then give RISC OS for the RPi a try. Downloads and full instructions are available.

 17. Beer can keyboard
 A keyboard made from beer cans? True enough, the Robofun team hooked up an Arduino board to a Raspberry Pi along with many cans of beer. Have a look at their video below.

 18. BitTorrent Server
 If you frequent the various Torrent sites, then why not create a dedicated lean Torrent machine? Just hook it up to your router and leave it to do its business. Full instructions, scripts and downloads come courtesy of the snapdragon:IT blog.

 19. RPi cloud server
 Fancy building your very own cloud server? By using OwnCloud you can. Follow the instructions, and the customised script from petRockBlog and you'll become your own cloud provider in no time. 

20. RPi UAV 
 The concept is brilliant, an RPi UAV (or flying drone to the likes of you and I) -- just think of the possibilities! Be inspired by Maggie -- possibly the first Raspberry Pi-powered quadcopter in the world.

 21. RPi Weather Station
 This DragonTail mapping tutorial would make an excellent science project for school, the Raspberry Pi weather station. Using a Maplin bought USB Wireless Touch Weather Station, the RPi can log all relevant data.

 22. 10-inch RPi Touchscreen
Using a 10-inch capacitive touchscreen and a HDMI-LVDS converter you can create a touchscreen Raspberry Pi. The full kit can be purchased from Chalkboard Electronics and then constructed using the instructions in the YouTube video below.

23. Home automation
 There's a new product called PiFace that's perfect for home automation. It hooks up to the RPi and allows it to detect switch states from a door sensor, a pressure pad or any number of other switch types.

 24. Minecraft
 The indescribably popular game Minecraft is available for the Raspberry Pi, allowing you to get all your block-bashing kicks in miniature. Best of all, it's free to download, with full instructions here.

 25. Raspberry Pi Cluster
 Many Pi's make light work. Check out these instructions from the University of Southampton to make a RPi Supercomputer.

Example:







.

How to Create a Raspberry Pi Bitcoin Miner?

If you don’t know already, Bitcoin is a virtual currency set up in 2009. Bitcoin has grown in reputation over the past few years becoming a very popular as a method to pay for services over the internet. The value has rocketed recently thanks to the huge coverage in the media, for both positive and negative reasons.
There are two ways to get Bitcoin:
  1. Buying them from an exchange, which is the process of converting local currency to Bitcoin.
  2. Mining them. Mining is the process of verifying transactions in the blockchain.
As the whole of the Bitcoin system is decentralised, every transaction is publically viewable within what is called the blockchain. This blockchain contains every bitcoin exchanged between users so, as there is no central server, it has to be self governed. This is the job of the miners.

Requirements

In order to mine Bitcoin, you will 
  • A pool account
  • Bitcoin Wallet
  • Raspberry Pi
  • Raspbian image SD card
  • USB Bitcoin miner

Creating an Account

There are two things you need to do:
  1. Download a bitcoin wallet
  2. Create a pool account
  3. Set up payment
  4. Set up workers
A wallet is a program that sits on your computer and gives you a wallet address, this is a unique string of numbers and letters that you will use to receive bitcoins. Download the client for your computer from https://bitcoin.org/en/download
After installation, you will have to save a file called wallet.dat, keep this file safe, as this contains your unique wallet address within it, including all bitcoins that you will gain. If you lose this file, you cannot recover any bitcoins it contained.
Once you have a wallet address, create a pool account. A pool is a huge collection of other people working towards gaining bitcoins. Due to the complexity of mining a bitcoin, it has become unrealistic to solo mine–the act of processing millions of numbers to solve the block problem. Working as a group, or pool, lets everyone have a chance of earning some Bitcoin. There are many pools around, in this tutorial I’ll be using one called Slush’s pool: http://mining.bitcoin.cz/
Once you have created a pool account, you'll need to enter your unique wallet address into the Bitcoin payout address.
Next step is to create a worker login account. Within your pool account you have the ability to create something called a worker for each of your bitcoin miners, so you're able to monitor them all separately just in case one should fail. 
Each worker has its own login name and password. Whilst you are on My Accountclick Register New Worker and give it a name, for example; worker, and a password.
Now you're ready to set your Raspberry Pi mining for Bitcoin.

Setting Up the Raspberry Pi

Start with a fresh Raspbian install, if you don’t know who to do this, read the tutorial How to Install NOOBS on a Raspberry Pi With a Mac
If you plan on running more than one Bitcoin miner at the same time, it is best to use a powered USB hub. Take into account the power rating as mining will need a lot of power, as much as one mp per miner.
With your USB miner attached to your Raspberry Pi, let’s get everything installed.

Installing Required libraries

The miner to be installed comes as source files, which means that the program must be compiled into a binary before it can be run. To make a program, in this case BFGMiner, many dependencies are required. 
Dependencies are additional software, or libraries the program needs in order to compile properly, as it has been developed using them to make the software more efficient.
Hopefully you will be seeing the Raspbian desktop, so double click on LXTerminal and type in the following:
1
2
sudo apt-get update
sudo apt-get install autoconf autogen libtool uthash-dev libjansson-dev libcurl4-openssl-dev libusb-dev libncurses-dev git-core –y
This process will take a few minutes to complete.

Installing BFGMiner

Once all the dependencies have been installed, now it is time to download and install BFGMiner, so type the following into LXTerminal. It’s normal for these to take a few minutes to complete so some patience is needed.
1
2
3
4
5
git clone https://github.com/luke-jr/bfgminer.git
cd bfgminer
./autogen.sh
./configure
make
You will be greeted with a screen that looks similar to the following:

Start Mining Bitcoin

Now you’re ready to start mining. To do this, providing you're using Slush’s pool, you’ll use the following command:
1
./bfgminer -o stratum.bitcoin.cz:3333 -O username.worker:password -S all
The username section is composed of two parts, the username that you use to login to the pool, and worker which is the worker name you gave when you registered the worker. Finally, the password that was set when you created the worker.
If everything works, you will see the main screen that will look similar to this:
That’s a lot of numbers, so I’ll make some of them a bit clearer.
  1. Current mining speed, typically calculated in megahashes or gigahashes. The number of hashes a second that can be calculated the better. A hash is an algorithm of converting numbers and letters into an undecryptable set of characters. So a miner is used to process millions of numbers in an effort to match the hash to guess the original number. The more hashes that can be processed the faster it is able to solve the problem.
  2. Number of accepted shares. A share on a pool is to show the miner has successfully worked out a given problem, so the more shares you can process the better your reward from the pool.
  3. Detailed information on accepted shares and pool updates. This is a running log of what is currently happening with the miners and basic pool information, such as messages of updates and when new blocks are found.
More information can be found at the BFGminer github site.

Conclusion

Following these steps will leave you with a very energy efficient bitcoin miner, as a Raspberry Pi only uses four watts of power, and a miner is typically 2.5W. Mining used to be done with computers consuming over 700W for the same process so to make a jump in savings helps repay the cost of the hardware we are using.
All there is to do now is to sit back and watch the money slowly build up. Though it is important that you understand that Bitcoin value fluctuates wildly, it is extremely volatile, so invest at your own risk.
For more information there are a number of websites and forums available, such ashttps://bitcointalk.org/,to help get you started.

Credit to : http://computers.tutsplus.com/tutorials/how-to-create-a-raspberry-pi-bitcoin-miner--cms-20353