xv6 is a great Unix like OS for learning OS concepts. You can get a copy of full source code from this Git Repo: https://github.com/mit-pdos/xv6-public .
You can compile it and run it using an emulator like qemu.
( https://www.youtube.com/watch?v=ikcfQw4FPEw ).
Here is the relevant playlist :
( https://www.youtube.com/watch?v=DZ0-GMtOtEc&list=PL14-cztsT7zpTikkkROTPka86zLdx7AJh ).
( one more lecure on v6 intro : https://www.youtube.com/watch?v=2rAnCmXaOwo )
To give you a perspective of this exercise, let's think of these QS: 1. How the OS gets control of CPU in context switch ( with detailed steps ).
( https://www.youtube.com/watch?v=YPIw67LuuY4 )
2. What is a virtual memory and how kernel code manages this virtual memory, what are the data structure to maintain this "virtual memory"?
( https://www.youtube.com/watch?v=TPR8QAL_T4o )
3. How fork() executed inside the kernel and how a child gets PID value zero. What is the first thing child do when OS scheduler schedules it?
4. How are PCBs stored? 5. What are kernel stack and its use in context switch?
6. Detailed steps of scheduler polling each process to select a user process and switch to userspace. etc.
7. How are system calls added?
( https://www.youtube.com/watch?v=21SVYiKhcwM )
This book on xv6 explains the implementation of it.
You can also follow this course to learn more and work on exciting small assignments and projects: https://pdos.csail.mit.edu/6.828/2016/schedule.html
If really want to work move forward from this: You can start with Linux source code :
Here are two into tutorials :