One is hardware interrupt, then the system will put the variables related to the current task on the stack, then execute the interrupt service program, and then return from the stack after execution.
The other is switching between tasks. The method used is task scheduling. Each task has its own stack with the same compliance, then executes another program, and then exits and returns.
Specifically, you can read Shao Beibei's books, which are searched a lot online.
Regarding LINUX, first of all, there are some differences between these two applications. UCOS is an embedded real-time operating system, and the key is real-time, which is used in places with high time requirements. Although some versions of linux are real-time, such as RTlinux, UCOS has relatively more choices, and LINUX has many applications, such as servers, computer operating systems and embedded operating systems. I wonder what kind of knowledge you want to ask? If it is an embedded operating system, it is helpful to learn UCOS. System-level application methods such as events and messages are the same on LINUX, but the function names may be different, but learning LINUX system programming directly is more helpful to understand these things. It's best not to read the kernel code when you just start school. Use it first and then read it. If you study LINUX, you need to know the common commands under LINUX, the use of SHELL command parser, the use of editor under LINUX, the use of MAKEFILE, the use of GCC and so on. In fact, there are some things similar to DOS, which are the most popular things to learn in ARM_LINUX, and then you can develop them by learning the architecture of ARM.
You can find some videos about ARM_LINUX on Youku, and then learn from them. It's best to buy a set of development boards to facilitate practice. At present, there are more materials, more forums and more learners, namely S3C2440 and S3C64 10.
If you study LINUX system programming, I recommend you a book, advanced programming in UNIX environment.
Typing is really tiring, that's all If you have any questions, you can ask them. If you want to study systematically, go to training!