Question

In: Computer Science

Draw or describe the memory space for a process. What happens in the New state? List...

  1. Draw or describe the memory space for a process.
  2. What happens in the New state?
  3. List three general categories of information in a process control block.
  4. Why are two modes (user and kernel) needed?

Please show all work and thought process

Solutions

Expert Solution

a. The process in the memory space is given as follows:

Process memory is divided into four sections as in fig below:

  • The text section comprises the compiled program code, read in from non-volatile storage when the program is launched.
  • The data section stores global and static variables, allocated and initialized prior to executing main.
  • The heap is used for dynamic memory allocation, and is managed via calls to new, delete, malloc, free, etc.
  • The stack is used for local variables. Space on the stack is reserved for local variables when they are declared ( at function entrance or elsewhere, depending on the language ), and the space is freed up when the variables go out of scope. Note that the stack is also used for function return values, and the exact mechanisms of stack management may be language specific.

b. The new state in the process is state where the process is created.

  • New - The process is in the stage of being created.

c. The three types of information in process control block is:

  • Process identification: Process identification data include a unique identifier for the process
  • Process state: Process state data define the status of a process when it is suspended, allowing the OS to restart it later.
  • Process control: The process control information is used by the OS to manage the process itself.

d. There are two modes user and kernel:

User Mode
The system is in user mode when the operating system is running a user application such as handling a text editor. The transition from user mode to kernel mode occurs when the application requests the help of operating system or an interrupt or a system call occurs.

Kernel Mode:The system starts in kernel mode when it boots and after the operating system is loaded, it executes applications in user mode. There are some privileged instructions that can only be executed in kernel mode.

So, the user mode is for simple applications while the kernel mode is for privileged applications.

-----------------------------------------------------------Please Upvote--------------------------------------------------------------------


Related Solutions

Consider the market for bicycles. Describe and draw what happens to the market if the following...
Consider the market for bicycles. Describe and draw what happens to the market if the following events occur. Note, you will want to draw three diagrams and give explanations for each. The price of tire pumps increases A study is published that links exercise to reduced risks of cancer The price of the steel used in bike frames become more expensive
The following problems are related to PIC18F46K22 data memory: (a) What is the data memory space...
The following problems are related to PIC18F46K22 data memory: (a) What is the data memory space and actual implemented size? (b) What does direct addressing mean? (c) What does indirect addressing mean? (d) What is the Access Bank used for? (e) What is the address range for Bank 6? (f) What is the purpose of the registers FSR0, FSR1, FSR2 for?
describe a noncompetitive bid in a treasury auction process? what is a competitive bid? what happens...
describe a noncompetitive bid in a treasury auction process? what is a competitive bid? what happens to the bidders whose bid is higher than the stop out yield?
IN PYTHON Question B Considering how objects list in their own memory space and can behave...
IN PYTHON Question B Considering how objects list in their own memory space and can behave almost like independent entities, think about some possible programs that you could create with this concept. (for example, a simulated worlds). Be specific in your description as to how OOP concepts would be employed.
Given a system with 4M bytes of address space per process, 64M bytes of physical memory,...
Given a system with 4M bytes of address space per process, 64M bytes of physical memory, pages of size 1K bytes, and page table entries of 8 bytes. How many entries can fit in one page? Select one: a. 128 b. 1K c. 8 d. 64K Given a system with 16G bytes of address space per process, 8G bytes of physical memory, and pages of size 16K bytes. How many entries are there in a linear page table? Select one:...
Given a system with 2T bytes of address space per process, 1T bytes of physical memory,...
Given a system with 2T bytes of address space per process, 1T bytes of physical memory, and pages of size 32M bytes. How many entries are there in a linear page table? Select one: a. 64K b. 32K c. 32M d. 1T Given a system with 8G bytes of address space per process, 2M bytes of physical memory, and pages of size 2K bytes. How bits are needed to specify the virtual page number? Select one: a. 22 b. 10...
Given a system with 512G bytes of address space per process, 2G bytes of physical memory,...
Given a system with 512G bytes of address space per process, 2G bytes of physical memory, and pages of size 2K bytes. How bits are needed to specify the offset? Select one: a. 39 b. 28 c. 11 d. 20 Given a system with 4M bytes of address space per process, 8M bytes of physical memory, pages of size 8K bytes, and page table entries of 4 bytes. How many entries can fit in one page? Select one: a. 8K...
what new advances are being made in solid state memory. Be sure to cite your sources.
what new advances are being made in solid state memory. Be sure to cite your sources.
A. List the 3 stages of translation.  B. Briefly describe what happens at each stage.
A. List the 3 stages of translation.  B. Briefly describe what happens at each stage.
What happens to the concentration of H+ in the intermembrane space and the matrix as electrons...
What happens to the concentration of H+ in the intermembrane space and the matrix as electrons move down the ETC?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT