代码代写|CSE 3430 SP 23 HW3

这是一篇来自美国的关于解决CPU,虚拟内存和分页内存相关问题的代码代写

 

  1. CPU Scheduling

Solve the scheduling algorithms for the following processes given the process CPU burst time and arrival time.

Process CPU Burst (ms) Arrival Time
P1 9 0
P2 4 2
P3 12 4
P4 6 6

 

For each of the following scheduling algorithms (1) draw a Gantt diagram, (2) calculate, and show clearly, the total wait time for each process, and (3) calculate the average wait time.

 

a)(Non-preemptive) (SJF) (Arrival times should be considered.)

(1)Gantt Chart: You can make a table in your word processor (I have provided a table for each Gantt chart; you can add additional columns if necessary); an example is shown below, but it is not correct for this problem. It is only meant to give an example of how a Gantt chart can be drawn with a table (and the Gantt chart should be drawn this way):

       

(2)Wait times for each process (show calculations; see formual for wait time in class slides)

P1 =

P2 =

P3 =

P4 =

(3)Average wait time (show calculation)

 

b)(Preemptive) STCF

(1)Gantt Chart (you can add additional columns if necessary)

       

0

(2)Wait times for each process (show calculations; see formual for wait time in class slides)

P1 =

P2 =

P3 =

P4 =

(3)Average wait time (show calculation)

 

  1. Virtual memory

Fill in the boxes in the table below for the approaches to virtual memory discussed in class, with T, if the characteristic applies to the approach, or F if it does not. BE VERY SURE TO WRITE T OR F IN EACH BOX (NOT X or anything else!)

Characteristics

A.No additional hardware (no additional registers or ALU operation hardware in an MMU or in the CPU) is needed to implement the approach.

B.The whole address space for the process must be loaded into a contiguous sequence of bytes in memory in order for the process to run (the process cannot be divided into separate pieces when it’s loaded into memory; it must be loaded form beginning to end in a contiguous sequence of bytes in memory).

C.Each segment of the process must be loaded into a contiguous sequence of bytes in memory (that is, a segment cannot be separated into smaller pieces which can be loaded apart from each other in memory).

D.No general mechanism for protecting processes from each other (that is, a mechanism for protecting any process from every other process) is provided.

E.No mechanism for processes to share a portion of their address spaces is provided.

F.The whole address space of the process must be loaded into memory in order for the process to run.

 

  Characteristic A B C D E F
Approach X X X X X X X
Static relocation X            
Base X            
Base + bounds X            
Segmentation X            
Paging X            

 

  1. Addressing for Paged Memory

Complete the table below by filling in the empty boxes with the correct value for number of virtual address bits; number of virtual page bits; number of page offset bits; number of virtual pages; and number of bytes in each page.

For page size, express the value in KB, MB, or GB (see note below). For number of virtual pages, write the value as a power of 2.

NOTE: Assume the following values

 

1 KB = 1024 bytes (210 bytes)

1 MB = 1024 X 1024 bytes (220 bytes)

1 GB = 1024 X 1024 X 1024 bytes (230 bytes)

If the page size is less than 1 KB, you can write it as the number of bytes, for example, 512 bytes

Virtual Address Bits Virtual Page Bits Page Offset Bits No. Virtual Pages No. Bytes per Page
32   11    
40 26      
30       4 KB
48   18    
26     218

程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: itcsdx@outlook.com  微信:itcsdx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

发表评论