Assignment Two Ashish
Assignment Two Ashish
Assignment Two Ashish
Problem:
a) A computer uses an 18-bit address system, with 6 bits used as a page address and
12 bits used as a displacement. Calculate the total number of pages and express the
following addresses as a paging address:
001111000000111000
Ans:
Number of pages = 26 = 64.
Ans:
I. Page Size = 212 = 4096
II. Maximum Segment Size = 29 = 512
III. Maximum Number of Pages = 211(29-1)
IV. Maximum Number of Segments = 211 = 2048
c) Assume a virtual paging system has three real page frames. Simulate the effect of
LRU, FIFO and optimal policies for page replacement for the following sequence of
virtual page references, indicating the position of page faults.
Sequence: 1 3 3 2 5 4 5 4 1 4 2 2 5
Ans:
LRU
1 3 3 2 5 4 1 4 2 2 5
1 1 1 5 5 5 2 2
3 3 3 4 4 4 4
2 2 2 1 1 5
Optimal Algorithm
1 3 3 2 5 4 1 4 2 2 5
1 1 1 1 1 2
3 3 5 5 5
2 2 4 4
d) A computer has four page frames. The time of loading, time of last access, and the
R (Read) and M (Modified) bits for each page are as shown below:
Page Loaded Last Ref R M
0 26 280 1 0
1 230 265 0 01
2 140 270 0 0
3 110 285 1 1
I. Which page will NRU replace?
II. Which page will FIFO replace?
III. Which page will LRU replace?
Ans:
Problem:
a) What kind of data structure is required to implement the round robin scheduling
policy?
Ans:
Round-Robin scheduling algorithm uses FIFO policy, which is nothing but the queue data
structure.
b) List the advantages and disadvantages of round robin scheduling if the time slice
is too large.
Ans:
Advantages:
I. Not too Context -Switches required
II. Turnaround time will be less.
Disadvantage:
I. If quantum is too large Round-Robin Policy will become FIFO.
II.
c) Find the average waiting time in the round robin scheduling for the following.
Assume a time slice of 5ms.
Process CPU time (in ms)
P1 4
P2 3
P3 3
Ans:
Following diagram shows the Gantt chart for the Round Robin Algorithm with time slice
of 5ms:
P1 P2 P3
0 4. 7 10
Problem:
a) How does the system’s performance change with respect to response time when
more (user) terminals are added to
a) Host-centric computing (for example Mainframes)
b) Network of computers.
Which is better and why?
Ans:
2. There is one smart server present in mainframe systems but in netwok of computers
each terminal is thick and smart.
3. When crash occurs mainframe has no other option but in network of computers server
can be switched from one terminal to another or replica can be maintained.
b) List out the applications which are based on RPC & P2P,
ODBC middleware.
Ans:
Middleware Application
Problem:
Ans:
• 23 – 2 = 6
• There are in fact 8 subnet address, but only 6 of them are usable
• BINARY to DECIMAL
– 000 Cannot use
– 001 32
– 010 64
– 011 96
– 100 128
– 101 160
– 110 192
– 111 Cannot use
Problem:
http://www.eip.hexaware.com/schdule.html
ftp://www.unisys.hexaware.com:8091/books/java.doc
Ans:
http://www.eip.hexaware.com/schdule.html
ftp://www.unisys.hexaware.com: 8091/books/java.doc
c) Why is dynamic web content response time slower than static web
content?
Ans:
Thus since dynamic web content is not fixed like static web content,
lots of processing is done to take current data from web server
hence dynamic web content is slower.
Ans:
When a computer is connected to a public network, all the data transmitted through the
Internet are exposed to the outside world
All messages entering or leaving the intranet pass through the firewall
Messages are examined and those that do not meet the specified security criteria are
blocked
----------------