As per the House of Commons Procedure and Practice (2nd ed., 2009), a general election is initiated by the Prime Minister, who visits the Governor General and presents an Instrument of Advice recommending the dissolution of Parliament. The dissolution date marks the official end of Parliament. Once the dissolution proclamation is issued, the Prime Minister presents an Order in Council (OIC) which recommends that writs of election be issued.
This OIC recommends:
The Governor General then issues the proclamation for the issuance of the writs: the date of issuance of the writs marks the official start of the election period. In most cases, the proclamation of dissolution and that of the issuance of writs occur on the same day; however, in some historical cases, there are lapses between the two events. See our compilation Key Dates of Each Parliament for examples.
The date of the election is set in accordance with the Canada Elections Act, which currently fixes election day as the third Monday of October in the fourth calendar year following the previous general election. A further stipulation of timing is the minimum duration of an election campaign, set at 36 days. Dissolution and issuance of writs of election can certainly occur earlier than the 36 day mark, resulting in a longer election period. Although the opening of Parliament is strongly associated with the official ceremony of the first sitting and the Speech from the Throne, the technical duration of a Parliament is calculated from the date of the return of writs to the date of dissolution.
For more information please consult House of Commons Procedure and Practice (2nd ed., 2009)