Silkworms are fed on mulberry chow or mulberry leaves ONLY! They will eat other foods but it will kill them. They need to be kept really clean and they produce A LOT of waste
I buy like a deli pot of chow and it is kept in the fridge. It will last about 2 months if you keep it in a good container and use a sterilised spoon ( just soak the spoon in boiled water for a couple of minutes). If you want to grow the worms bigger then you feed them twice a day. If you just want to keep them alive then you only feed them every other day. Not sure about stopping them from cocooning but I did read somewhere that you can cut open the cocoons after 5 days and the pupae is really nutritious for your Cham
I haven't been at this site long, but a PHENOMENAL lady named Sandrachameleon on here has an awesome blog on gut-loading multiple types of little bugs.