What is the maximum size of the logical address

Assignment Help Operating System
Reference no: EM13874968

Question: Use semaphores to synchronize the threads of customer, cook, waiter and cleaner. In your answer, specify the semaphores used in each synchronization requirement above.

Question 1: Answer the following short questions:

(a) Name two differences between logical and physical addresses.

(b) Briefly explain how the CPU uses page table in address translation.

(c) Explain why the principle of locality is crucial to the use of virtual memory.

Question 2: In a fast food restaurant there are 30 tables, each with a single seat. Three cooks prepare meal (set lunch) and append it to a queue of capacity 10. One waiter takes a meal from the queue and delivers it to a customer who has ordered a meal. One cleaner cleans the table after a customer leaves.

a) Initially there are 50 customers, but only 30 tables available. A customer must wait until a previous customer finishes the meal and his table cleaned.

b) A cook will not start preparing a meal if there is no space left in the queue.

c) When a customer orders a meal, the waiter will go to the queue, take one meal from the queue, and deliver it to the customer. The customer can then start eating.

d) When there are no orders from customers, or when the queue is empty, the waiter has to wait.

e) After a customer finishes the meal and leaves the table, the cleaner will clean the table.

Use semaphores to synchronize the threads of customer, cook, waiter and cleaner. In your answer, specify the semaphores used in each synchronization requirement above.

void customer ( ) { int myTable;

enter restaurant;

find an available table, and store the table number in myTable; sit down on table number myTable;

order meal and pay; enjoy meal;

leave restaurant;

}

void cook ( ) { while (true) {

make a meal; append to queue;
}
}

void waiter ( ) { int orderTable;
while (true) {

take a meal from the queue;

determine the table number to deliver the meal, and store it in orderTable; deliver a meal to table number orderTable;
}
}

void cleaner ( ) { while (true) {

go to the table where a customer has just finished; clean the table;
}
}

void main ( ) { parbegin waiter(); cleaner();
cook(); cook(); cook();
customer(); customer(); ... customer(); // 50 customers
parend
}

Question 3: Assume a demand paged memory management system with the following characteristics:

page size = 4K = 212 bytes physical address space = 224 bytes logical address space = 232 bytes TLB size = 26 bytes

a) How many bits are needed to specify a logical address? Give the number of bits for the page number and offset.

b) How many page table entries can fit in the TLB if each entry only contains the information need for logical to physical translation. Show your work.

c) How many page table entries are needed when a program uses its full logical address space? What is the size (in MB) of page table, assuming each PTE contains 4 control bits.

d) Part c) indicates a serious problem that arises from having a very large logical address space. What is this problem and how could an OS solve it?

Question 4: Consider a simple segmentation system that has the following segment table:

Starting Address

Length (Bytes)

660

248

1752

422

222

198

996

604

For each of the following logical addresses ([segment number, offset]), determine the physical address or indicate if a segment fault occurs:
a) [0, 198]

b) [2, 156]

c) [1, 530]

Question 5: In a 64-bit machine, suppose we divide the logical address into multilevel paging as follows:

18 bits

15 bits

15 bits

16 bits

In other words, the system has a 3-level page table, such that the first 18-bits are for the first level, the next 15-bits are for the second level, etc. In this system, 15-bits are used to represent the frame number. Assume that the memory is accessed in bytes.

a) What is the page size in this system?

b) What is the maximum number of pages that can exist for a process?

c) What is the maximum size of the logical address?

d) What is the maximum size of physical memory?

Reference no: EM13874968

Questions Cloud

Create a job description for your dream job : Rationalize your compensation and benefits package. Be sure to indicate the research and considerations that went into the design of the compensation and benefits package
Explain the ethical approach concerning means : Explain the ethical approach concerning means and ends that you would apply if you had a role as the chief of police in your hometown
Explain the three types of management compensation : Identify and explain the three objectives of management compensation. Explain the three types of management compensation.
Advantages and disadvantages of partnerships and corporation : Limited Liability Companies share some of characteristics of partnerships and some of the characteristics of corporations. Write a 4-5 paragraph essay describing the advantages and disadvantages of partnerships and corporations
What is the maximum size of the logical address : What is the page size in this system -  what is the maximum number of pages that can exist for a process and what is the maximum size of the logical address?
Match the items in the right column with those : Match the items in the right column with those in the left column Statement of changes in owner equity Income statement
Describe how you perceive the value of qualitative : How do you plan to use the knowledge you gained in this course to be a positive change agent in your own work setting? In other words, what are your next steps?
Develop an estimate of the value of websmart and explain : WebSmart is a relatively new Internet company that sells educational products on the Web. Required Develop an estimate of the value of WebSmart and explain your reasoning.
Literture review - sex offenders re-offend at higher rates : Write literture review in this topic "sex offenders re-offend at higher rates than other types of non-offenders"

Reviews

Write a Review

Operating System Questions & Answers

  In this discussion locate two different operating systems

multitudes of file systems exist across the numerous operating systems that have been developed. in this discussion

  Define the term context switch

Define the term context switch. Explain how context switching takes place. (use a diagram, with two processes)

  Q1 - technical essay describe and critically evaluate the

q1 - technical essay describe and critically evaluate the similarities between the windows and unix operating systems

  For each of these four modifications

For each of these four modifications, compute and graph the effects on the original system. Explain in words the effect when the multiprogramming level, N , is small and when N is large.

  Disk scheduling algorithms

Assume that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is recently serving a request at cylinder 143, and the last request was at cylinder 125.

  What do you mean by the protection fault

What do you mean by the protection fault? How the Kernel handles the copy on write bit of a page, when the bit is set?

  Applying forensic science to computers

In our first seminar, we will learn how to acquire, authenticate, and analyze digital evidence. We will compare the technology and law for different countries.

  Explain trade-off between memory use and cpu overhead

Remembering that there's a trade-off between memory use. Then give an example where doing so will cause throughput to suffer.

  Question about operating system interfaces

The Internet can be used for several reasons, including research and education, and information can be  achieved  from many types of Web sites.

  Securing standard telecommunications line vs voip connection

Determine the difficulty(s) of securing a standard telecommunications line vs. securing a VOIP connection?

  Identify a unique type of file in windows or linux

Identify a unique type of file in Windows or Linux with which you are familiar. Suggest the key factors that in your opinion make this a unique type of file

  Define critical path and cpm

Define Critical Path and CPM. Define Networks & Network scheduling

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd