There are many instances where Shukracharya made use of his Sanjeevani Vidya to revive the dead Asuras. My question is how did he get this knowledge and who gave it to him?
The story of Shukracharya receiving Sanjivani Vidya is found in Chapter 16 of the Kāśīkhaṇḍa of the Skanda Purāṇa.
As per it, Shukracharya performed a very severe penance, by inhaling smoke of husked rice for a thousand years before he finally got the vidya from Lord Shiva:
Kavi (Śukra) washed the great dirt of the mind in the form of fickleness by means of the waters of deep meditation and absorption. He cleansed the mind along with the sense-organs many times. After making that gem of mind free from dirt, he offered it to the Pināka-wielding Lord. Then he inhaled the smoke of rice husk for a thousand years.
Then the Lord became pleased with the noble-souled Bhārgava. With a lustre brighter than that of a thousand Suns, he came out of the Liṅga. Virūpākṣa, the consort of Dākṣāyaṇī, directly spoke to him, “O Bhārgava, the storehouse of austerities, I am pleased; choose a boon.”
[after Shukra praises him, Mahadeva says] I have a pure Vidyā named Mṛtasañjīvanī which I have kept concealed from Viṣṇu and Brahmā. It has been evolved by me by the power of my penance. O extremely pure one, it is in the form of a Mantra which I shall pass on to you today. O storehouse of pure penance, you deserve that Vidyā. O most excellent one among the masters of Vidyā, if you recite this Vidyā (i.e., Mantra) in respect of any particular person, he will certainly come back to life.
The Kāśīkhaṇḍa also adds to the above that before he started his extreme penance, he installed the Śukreśvara Mahadeva Lingam, which he worshipped regularly for 5000 years using various flowers. It is from this Linga that Lord Shiva appeared and bestowed the Mrita Sanjivani Vidya. However in the Devi Bhagavatam, the incident is the same except that Sukra has been mentioned as performing tapas in his own hermitage.