My .02 cents on this subject would be to pick up the first available tool/weapon, whatever it may be. From a trash can lid, to a trash bag, anything before I decide its hand to hand combat time.
If that option is not available, I would want to keep them at distance as long as possible until there are no other choices. Trying to talk them down, anything to avoid the confrontation with the knife.
Once that fails, you're going to want to get ahold of that knife, knife hand/arm at the very first instance available. If you have no options other than fight, know you're very likely about to get fucked up. So it becomes a balance between fucked up and dead in my book, and I would recommend meaning business at that point.
Two on one, meaning get both hands on whatever arm is controlling the blade and make sure you never loose site of it from there. Some idea of wrist locks, holds, joint manipulation is a good idea. Break their shit.
If you're in that situation though, you've likely failed several key self defense tips to begin with. Putting yourself in situations where something like this is even remotely possible is ill advised from the start. If this kind of thing seems to be a reality to you, I recommend moving to a new neighborhood. Getting new friends, hobbies, interest etc. which do not involve the possibility of getting killed.
If you simply can not get out of these type of environments, its a good idea to train to defend yourself and likely acquire the legal right and knowledge to carry defensive weapons.
Good luck