os-midterm - 1 State the difference between Threads and...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1. State the difference between Threads and process? Answer: Despite of the fact that a thread must execute in process, the process and its associated threads are different concept. Processes are used to group resources together and threads are the entities scheduled for execution on the CPU Differences The major difference between threads and processes is 1.Threads share the address space of the process that created it; processes have their own address. 2.Threads have direct access to the data segment of its process; processes have their own copy of the data segment of the parent process. 3.Threads can directly communicate with other threads of its process; processes must use interprocess communication to communicate with sibling processes. 4.Threads have almost no overhead; processes have considerable overhead. 5.New threads are easily created; new processes require duplication of the parent process. 6.Threads can exercise considerable control over threads of the same process; processes can only exercise control over child processes. 7.Changes to the main thread (cancellation, priority change, etc.) may affect the behavior of the other threads of the process; changes to the parent process does not affect child processes . Unlike processes, threads are not independent of one another. Unlike processes, all threads can access every address in the task . Unlike processes, thread are design to assist one other. Note that processes might or might not assist one another because processes may originate from different users. 2.specify the hardware support necessary for memory protection and explain briefly how it works. Answer: The system should provide some kind of hardware support to keep track of which parts of memory are currently being used and by whom, to make sure that a process does not access the memory being used by other processes. Deciding which process and data to move into and out memory. Allocating and de allocating memory space as needed. The central processor reads instruction from main memory during instruction fetch cycle.and both reads and writes data from main memory during data fetch cycles. The main memory generally is only large storage device that the cpu is able to address and
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

os-midterm - 1 State the difference between Threads and...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online