Date: Tue, 05 Mar 2002 20:31:35 -0500 From: "David E. Cross" <crossd@srs.cs.rpi.edu> To: freebsd-smp@freebsd.org Subject: SMP Implimentation Question Message-ID: <200203060131.UAA08700@cs.rpi.edu>
next in thread | raw e-mail | index | archive | help
I have been looking at the -current SMP method and I have a question about the implimentation (more specifically why my idea wouldn't work, or would be "bad"). My idea would be to use the MMU to enforce the use of mutex-es. My idea goes as follows. The "problem" with SMP are 2 people modifying "data" at the same time, or modifying when someone else is looking at it. There are 2 primary places to store data in memory, the stack, and not the stack. The stack, by definition, is a single instance. So, start the kernel with all of the memory "protected" (read or write generates a fault). Then as a thread needs to access memory it requests it to be unlocked for shared (read only) or exclusive (r/w) access at address "X" for "Y" bytes. The stack segment for the current thread is automatically unlocked. Any code that doesn't follow these locking semantics would generate an immediate fault at the point of failure making it trivial to identify the offending line of code. This would also allow parallel use of varies data structures. For example 2 UFS operations on different partitions would not lock each other out since they would be operating of different portions of the structure in memory. -- David Cross | email: crossd@cs.rpi.edu Lab Director | Rm: 308 Lally Hall Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203060131.UAA08700>