Sir, I think you have a misconception about what locking is, and what mutex is for. Also, you have a misconception about what Ubuntu is.
Let's start with the latter: Ubuntu is a Linux-based distribution. Any and all low level system architecture components are done by the Linux kernel. Ubuntu is just a way of putting different software pieces together, configuring, installing and updating them in a robust, uniform and user-friendly fashion. Your question, thus, refers to Linux, and not Ubuntu.
Mutexes are used to make sure that common resources (such as memory) are not by mistake accessed and modified at the same time. Since processes in general do not share such resources as memory (neither in Windows nor in Linux), the problem arises when one uses threads, and not processes. This is done using mutexes, you are right in that; here you will find some more informations about that. Linux uses POSIX threads. However, whether you -- as a programmer -- use mutexes or something else (like spinlocks or critical section), that depends on you, not on the system (see here), be that Windows or Linux.
As for processes, one needs file locking, but that is a different story. And yes, processes are implemented differently in Windows and in Linux (most importantly, in scheduling; see this presentation to shed some light on that).
Before version 2.6, Linux was a nonpreemptive kernel. Now, it is fully preemptive, so a task can be preempted when it is running in the kernel.
The Linux kernel provides spinlocks and semaphores for locking in the kernel. On SMP machines the fundamental locking mechanism is a spinlock, and the kernel is designed so that the spinlock is held only for short durations.
This is not appropriate for single-processor machines. In single-processor machines, the kernel disables kernel preemption; and rather than releasing the spinlock, it eneables kernel preemption.
Sir, I think you have a misconception about what locking is, and what mutex is for. Also, you have a misconception about what Ubuntu is.
Let's start with the latter: Ubuntu is a Linux-based distribution. Any and all low level system architecture components are done by the Linux kernel. Ubuntu is just a way of putting different software pieces together, configuring, installing and updating them in a robust, uniform and user-friendly fashion. Your question, thus, refers to Linux, and not Ubuntu.
Mutexes are used to make sure that common resources (such as memory) are not by mistake accessed and modified at the same time. Since processes in general do not share such resources as memory (neither in Windows nor in Linux), the problem arises when one uses threads, and not processes. This is done using mutexes, you are right in that; here you will find some more informations about that. Linux uses POSIX threads. However, whether you -- as a programmer -- use mutexes or something else (like spinlocks or critical section), that depends on you, not on the system (see here), be that Windows or Linux.
As for processes, one needs file locking, but that is a different story. And yes, processes are implemented differently in Windows and in Linux (most importantly, in scheduling; see this presentation to shed some light on that).
Before version 2.6, Linux was a nonpreemptive kernel. Now, it is fully preemptive, so a task can be preempted when it is running in the kernel.
The Linux kernel provides spinlocks and semaphores for locking in the kernel. On SMP machines the fundamental locking mechanism is a spinlock, and the kernel is designed so that the spinlock is held only for short durations.
This is not appropriate for single-processor machines. In single-processor machines, the kernel disables kernel preemption; and rather than releasing the spinlock, it eneables kernel preemption.