The word mining originates in the context of the gold analogy for crypto currencies. Gold or precious metals are scarce, so are digital tokens, and the only way to increase the total volume is through mining. Ethereum, like all bitcoin mining ubuntu vs windows 7 technologies, uses an incentive-driven model of security.
Consensus is based on choosing the block with the highest total difficulty. Miners produce blocks which the others check for validity. The Ethereum blockchain is in many ways similar to the Bitcoin blockchain, although it does have some differences. As dictated by the protocol, the difficulty dynamically adjusts in such a way that on average one block is produced by the entire network every 15 seconds.
We say that the network produces a blockchain with a 15 second block time. Ethash PoW is memory hard, making it ASIC resistant. Memory hardness is achieved with a proof of work algorithm that requires choosing subsets of a fixed resource dependent on the nonce and block header. As a special case, when you start up your node from scratch, mining will only start once the DAG is built for the current epoch. All the gas consumed by the execution of all the transactions in the block submitted by the winning miner is paid by the senders of each transaction. The gas cost incurred is credited to the miner’s account as part of the consensus protocol.
Over time, it is expected these will dwarf the static block reward. A maximum of 2 uncles are allowed per block. Mining success depends on the set block difficulty. Block difficulty dynamically adjusts each block in order to regulate the network hashing power to produce a 12 second blocktime. Your chances of finding a block therefore follows from your hashrate relative to difficulty.
The DAG takes a long time to generate. If clients only generate it on demand, you may see a long wait at each epoch transition before the first block of the new epoch is found. DAG generation and maintains two DAGs at a time for smooth epoch transitions. Automatic DAG generation is turned on and off when mining is controlled from the console. Note that clients share a DAG resource, so if you are running multiple instances of any client, make sure automatic dag generation is switched off in all but one instance. DAG so that it can shared between different client implementations as well as multiple running instances.
It is designed to hash a fast verifiability time within a slow CPU-only environment, yet provide vast speed-ups for mining when provided with a large amount of memory with high-bandwidth. The large memory requirements mean that large-scale miners get comparatively little super-linear benefit. The high bandwidth requirement means that a speed-up from piling on many super-fast processing units sharing the same memory gives little benefit over a single unit. Communication between the external mining application and the Ethereum daemon for work provision and submission happens through the JSON-RPC API.
These are formally documented on the JSON-RPC API wiki article under miner. In order to mine you need a fully synced Ethereum client that is enabled for mining and at least one ethereum account. This account is used to send the mining rewards to and is often referred to as coinbase or etherbase. Ensure your blockchain is fully synchronised with the main chain before starting to mine, otherwise you will not be mining on the main chain. This is no longer profitable, since GPU miners are roughly two orders of magnitude more efficient. You can also start and stop CPU mining at runtime using the console.