L.,
I am sorry to hear about your situation. I have what seems like alot of experience dealing with death, so I'll share what I have learned.
I agree with everyone who says these final months, if spent together, would be a great gift for your mom and your kids. However, my mom died when I was 23 of lung cancer; I have since lost a baby and three elderly grandparents,and I want to caution you to be prepared for how the cancer might change your mother. As Crista H. stated, it can be very traumatic for anyone to see someone who is decimated by disease. Some diseases ravage the body and leave it unrecognizable, and others don't. I would not want my kids to see someone they love if that person looks skeletal or in any way scary. Just losing alot of weight can do that.
I also agree with Crista that if your boys are not close with your mother, do not make a big deal out of this now. They will still learn about death, but if it is not necessary, why drag them into an emotional place at this point in their lives. Many of us have to introduce our children to death earlier than may be ideal. Of course if your kids are close to their Grandma, they should not be kept in the dark.
I thought Holly J. had some very good advice about considering how hard - both practically and emotionally - the care might be for your family. Are you prepared for the bodily functions that may not be contained to the bedroom? Each case is different, but you need to be sure you can deal with the illness and it's effects if your mother spends time outside of the bedroom where you can "contain" the most unpleasant moments. I won't even mention the things I had to help my mom with, and it is nothing she wanted me to see, I am sure. I try not to remember that part of it all, but it can be a reality that you might not be able to deal with, or that you don't want your boys to see.
Finallly, I have two sons, age 3 and 7. The seven year old has seen my baby and 2 great-grandparents pass. At the time of each death, he was 2 1/2, 4, and 6, respectively. We spent lots of time with each grandparent, so he really did know who they were and that they were sick and then no longer with us. He is very sensitive and empathetic, so despite his young age, the deaths made a strong impression on him. I tried to be as honest as possible about death. I wouldn't say he has been traumatized by their deaths, but rather that he has a heightened awareness of the fact that people do not live forever. Starting at age 4 he connected this understanding to the possibility that his dad and I could die. Once that connection is made, you are in delicate territory. You can't promise them you won't leave them by dying. I have told him that Grandmother and Grandma Great died because they were very, very old, and their bodies stopped working properly, just like an old car stops working properly. As for my mother (who died quite young) and his brother (neither of whom he knew) I told him that that sometimes people's bodies don't work like they are supposed to, and they die. This has worked so far, but I am dreading the day when he makes the connection and asks: "What makes bodies stop working properly? Will that happen to you (or me)?" I am not sure what I will tell him then, because of course I can't promise anything. Right now I just tell him he won't have to worry about me or Papa or himself dying for a very, very long time.
My final comment stems from the fact that I currently live in Mexico, and we just celebrated Day of the Dead here. It is a really great tradition, and I wish that we Americans had a view similar to this regarding death. Mexicans believe that death is the beginning of life. They see it as inevitable, so they dont treat it as an unspeakable issue. They mock it, joke about it, and honor it publicly (these words are paraphrased from an article about Dia de los Meurtos in the local newspaper here). I think this is the approach I am going to take with my boys so that they hopefully won't fear death so much.
I know this is long, but I hope it helps. I just know that all my oldest has been exposed to has contributed to his awareness of death and loss, which I think is greater than most kids his age. This in turn contributes to occasional anxiety that those closest to him could die. I don't think his feelings are extreme, but part of me wishes he still didn't understand enough to have that very realistic worry.
Best wishes to you and your family in this difficult time.