On Monday 01 May 2006 17:57, Abhay Raghu wrote: > i) Can you please explain the difference between PTRACE_SYSCALL and > PTRACE_SYSEMU?
Download latest man-pages (at least 2.27) and read man 2 ptrace; if something is not clear, I'll answer to your further doubts. > ii) This question is related to uml: How do all applications run within a > single userspace thread? Doing context switching is fairly easy: with ptrace you change all registers and so on. I guess you know that, if I'm wrong feel free to ask. There is a further problem however: different apps have different address spaces, with different mappings (or different memory images, they're running different executables with different libraries... there are various way to say this). To solve this problem, we introduce on the host the SKAS3 patch whihch allows one process to have multiple address spaces - only one is in use, but via ptrace(PTRACE_SWITCH_MM) we can replace that one with another one - this is done by making a pointer in the process descriptor (i.e. current in Linux kernel code) point to another "mapping set" (called struct mm_struct), so it's very fast; you must also invalidate the TLB (i.e. the processor caches of page table entries) like on any "memory context switching", obviously. -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
