We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Assignment No. 01
Semester: Spring 2015

CS604 –Operating System

Total Marks: 10

 

Due Date: 20/05/2015

Uploading instructions:

 

  • Your assignment must be in .doc format. (Any other formats like scan images, PDF, Zip, rar, bmp, etc will not be accepted).
  • Save your assignment with your ID (e.g. bc020200786.doc).
  • No assignment will be accepted through email.

 

Rules for Marking:

 

It should be clear that your assignment will not get any credit if:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupted.
  • Your assignment is copied from internet, handouts or from any other student

      (Strict disciplinary action will be taken in this case).

 

Assignment

 

Question 1:   (5 Marks)

 

Identify and explain which of the following state is being shared between parent and the child process when a process creates a new process using the fork() operation

 

a)      Heap

b)      Shared Memory Segment

c)      Stack   

 

Question 2: (5 Marks)

 

Consider UltraSPARC processor that has multiple register sets, if a new context is already loaded into one of the register then describe the action to be needed by context switch. Also describe that what will happen if new context is loaded into the memory rather than in register set and all registers are in use?

 

NOTE: Do not put any query on MDB about this assignment, if you have any query then email at cs604@vu.edu.pk.

 

Deadline: Your assignment must be uploaded/submitted on or before 20th May 2015.

 

+ Click Here To Join also Our facebook study Group.

..How to Join Subject Study Groups & Get Helping Material?..


See Your Saved Posts Timeline

Views: 5008

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

Attachments:

Replies to This Discussion

its well described dear or kia chahiaye .. :)

Question # 1:.

Identify and explain which of the following state is being shared between parent and the child process when a process creates a new process using the fork () operation

a) Heap
b) Stack
c) Shared Memory Segment


Answer Idea:.

Only the shared memory segments are shared between the parent process and the newly forked child process. Copies of the stack and the heap are made for the newly created process

Question N0 2

Consider UltraSPARC processor that has multiple register sets, if a new context is already loaded into one of the register then describe the action to be needed by context switch. Also describe that what will happen if new context is loaded into the memory rather than in register set and all registers are in use?

Answer Idea:........

The CPU current-register-set pointer is changed to point to set containing the new context, which takes very little time. If the context is in memory, one of the contexts in a register set must be chosen and be moved to memory, and the new context must be loaded from memory into the set. This process takes a little more time than on systems with one set of registers, depending on how a replacement victim is selected.

Assignment No. 1

Semester: spring 2015

CS604- Operating system

Question no. 1

Identify and explain which of the following state is being shared between parent and the child process when a process creates a new process using the fork() operation

a) Heap

b) Shared memory segment

c) stack

Answer:

While using the fork() operation the shared memory segment is used between the parent and the new fork() child process. When a process. Copies Heap and Stack are made for new created process.

As by definition the shared operating segment is as: Shared memory is the fastest interprocess communication mechanism. The operating system maps a memory segment in the address space of several processes, so that several processes can read and write in that memory segment without calling operating system functions.

That is why I prepare share memory segment instead of HEAP & STACK:

A stack is similar to a heap except that the blocks are taken out of storage in a certain order and returned in the same way. In Pascal, a sub heap is a portion of a heap that is preserved like a stack.

Question no. 2

Consider UltraSPARC processor that has multiple register sets, if a new context is already loaded into one of the register then describe the action to be needed by context switch. Also describe that what will happen if new context is loaded into the memory rather than in register set and all registers are in use?

Answer:

The action of a context switch if the new context is already loaded into one the register sets is that, The CPU current register set pointer is changed to point the set

containing the new context, Which takes very little time. If the context is in memory one of the contexts in the register set must be chosen and will be moved to memory, and similarly the new context would be loaded from memory into set. This process takes a little more time as relate to set of register. This will mostly depend on the replacement one.

RSS

Latest Activity

+ ! ! !Mahoo+++ replied to +++Amara+++++'s discussion JUMMA Post
8 minutes ago
☑ Steve replied to +++Amara+++++'s discussion JUMMA Post
28 minutes ago
☑ Steve liked +++Amara+++++'s discussion JUMMA Post
28 minutes ago
☑ Steve liked +++Amara+++++'s discussion Jumma Mubarak
29 minutes ago
☑ Steve posted a discussion
29 minutes ago
+ ! ! !Mahoo+++ replied to +++Amara+++++'s discussion Jumma Mubarak
35 minutes ago
+++Amara+++++ posted discussions
37 minutes ago
☑ Steve liked + "αяsαℓ " Ќąƶµяɨ •"'s discussion Shopping with mothers
46 minutes ago

Today Top Members 

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service