Engine oil is stored in either a wet sump (bottom of engine) or dry sump (separate holding area away from engine). These sensors monitor and report the oil level. Don't count on these sensors for the life of your engine; make a habit of checking the level manually every third fill up.
Have you ever gone to wash your windows and the blades just streak the dirt around because you are out of fluid? If the dash light is not indicating you are out of fluid you probably have a bad sensor or gauge.
A crankshaft sensor is used to measure the position and speed of the crankshaft. This assists in fuel distribution and ignition system. Many rough starting or running problems can be traced back to a faulty crankshaft sensor.