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

  Question about security policy

ABC Corporation is a small but growing manufacturing corporation with revenues of approximately $25 million. Until now, the corporation has had a single headquarters and production facility in a Midwestern city,

  Objectives of database management systems

Discuss the objectives of database management systems, Integrating databases; sharing information; maintaining integrity; reducing redundancy and enabling database evolution

  Do you think that files are stored in consecutive sectors

All files may grow dynamically during execution without giving the operating system any advance information about their ultimate size. Do you think that files are stored in consecutive sectors? Explain.

  How can operating system keep track of which pages are clean

Assuming that each page has hardware bits to separately enable access for reading, writing, and execution, how can the operating system keep track of which pages are clean and which are dirty?

  Implement a basic shell that restricts runtime of processes

Implement a basic shell that restricts the runtime of processes executed from within it. Your shell will read input from the users and execute it as a new process, but if that program runs longer than it should, your shell will kill the process an..

  Configuration and implementation of a cluster computing

Develop and submit a project plan including implementation steps for the configuration and implementation of a cluster computing solution to support a mission critical application

  Describe the types of malware and the potential impact

Write a 200- to 300-word short-answer response to the following: Describe the types of malware and the potential impact they can have on a system

  Creating the source code and flowchart

Construct a C program that displays a title, "Hello World." Insert comments in the event to document the program internally. Attach a design flow chart.

  Question 1a process is a program under execution and as it

question 1a process is a program under execution and as it executes it changes state. the state of a process is defined

  A data structure call the gold pile and d gold-diggers

Consider a computer game that is played as follows. You have G gold-makers each of which at random times produce one unit of gold and adds it to a data structure call the goldpile and D gold-diggers each of which can grab one unit of gold from the go..

  Design and write the client and server programs

Design and write the client and server programs necessary to provide a multiple client CPU scheduler that handles CPU bursts and I/O bursts.

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

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