The kernel allocates the resources to all the processes running in the system i.e. CPU, memory and I/O processes. The kernel is a software resource that processes use to perform tasks such as creating new processes and communicating with other processes. Fair resource allocation is important as each process should be allocated a fair share of time and resources, so that none of the processes could hold the system for longer than required time.
Kernel plays a very important role in allocating resources, basically kernel is itself a software resource which is used by processes to gain access to different hardware resources like processor, memory etc.
Eg: kernel allocate processor to different processes using scheduler , memory using MMU etc.
In a multitasking operating system , sharing various resources is must otherwise one process might get the resources most of the time and other process will just wait so kernel try to allocate the resources based on priority and niceness so that fair allocation could happen.