Re: MM and scheduling in SMP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 12 July 2004 10:58, Anand wrote:
> Hi Folks,
> I have  few doubts on how memory is managed in Multi  Processor
> Systems(SMP)?
> Right now Linux uses 3G:1G split for a uniprocessor (Though patches
> are there for 32G)
>
> 1) I was jus wondering how the 1G memory is managed on a SMP?
> Suppose i have a 1Gig RAM and 3 procesors (32 bit),Is the 1 Gig
> memory split among the 3 processors ??

No the memory is not split between the different CPUs.
I don't believe ther is any significant difference in MM for SMP vs 
non-SMP unless you are on a NUMA architecture.

> Since each processor can address 4G memory ,Do they have large
> Virtual Address space?
>
> 2) How is the process switching taken care on SMP?
> (ie) on a UP when when a process time slice is over ,its context is
> saved in the PSW or the task_struct!
> and next time it gets its timeslice , it loads the info form the
> task_struct,
> but on a SMP, Assume i have 3 procesors ,In the first time slice the
> Process runs in Processor P1,
> Is it possible for the process to run in Processor P2 when it gets it
> time slice back ?
> If possibe how is it taken care?

It is possible for a process to switch to a different CPU.  However, the 
scheduler tries to avoid that.

> 3)Does the Linux scheduler diffrenciates between a Process and a
> thread ? All i can see in the scheduler code is a the task
> represented by task_struct, which is getting scheduled,
> From which i assume ,that  the scheduler schedules only the Process
> (coz task_struct represents a Process :-)!!)
> But how is the user space threads (which is part of a Process),Kernel
> treads scheduled ?

A thread is just a process that shares a mm with other tasks.  


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux