You can apply for a permanent residency permit if you have lived in Iceland for four years on a temporary residency permit that creates the eligibility for permanent residency.
The following temporary residence permits create eligibility to apply for a permanent residence permit:
work requiring expert knowledge
shortage of workers
family reunification (for spouses, cohabitating partners, children, parents, etc.)
special ties to the country
student (with limitations)
For more detailed information on this kind of permit please see the Directorate of Immigration.