Lesson 18 Notes

View previous topic View next topic Go down

Lesson 18 Notes

Post  Admin on Wed Oct 10, 2012 10:25 am

Process
• PID
• State
• Child Process
• Memory Location (page table)
• Maybe Dynamic stack/heap allocation
• List of Open Files (should we share them?)
Do we need all of this information in the thread? No, we don’t

Thread
• Stack
• Registers
• Instruction Pointer, Stack Pointer
• Parent Process points directly to the PID
Process.. .if single threaded… or multi threaded have to map into Kernel.
Problem with multithreads? Hard for intercommunication.
How many threads can I have in my kernel? One-to-One




Downside of preallocating those threads? They take up space and time.
What happens if you do this in the USER SPACE?
• This can be changed in the implementation.
Kernel:
• One t one is down in the kernel space. The implementation is down in the kernel space
User:
• It is in an interface


For a Many to one:
• You have to write the interface + implementation in the user space. User space => virtual memory. Kernel => physical memory
• If you are doing a lot of I/O stuff... MANY to 1 at the user space may not be a good idea. Not much I/O because whole system will wait. If you do a one-to-one you won't have that problem. It will put the individual threads in its own thing. Trade Off.... you have to do a context switch from user mode to kernel mode.[b]
avatar
Admin
Admin

Posts : 9
Points : 24
Join date : 2012-10-10

View user profile http://metisscrolls.forumotion.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum