Operating System- question
Operating System- question
01. a)
i) What is time sharing system?
…………………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………………
ii) The operating system is doing many process at same time for process management.As one of
task , keep track of satus about the processor and process state. Draw the seven state
trastision diagram for represent above scenario.
b)
i. Write 2 disadvantage of contiguous File Allocation?
1. ……………………………………………………………………………………………………………………………………
2. ……………………………………………………………………………………………………………………………………
1. The block size of the disk is 4 KB. The abc.py file has multiple partitions and a file allocation table
(FAT) as shown below.
FAT
401
400
401
402 -1
403 402
404 400
2. The computer has 32 MB virtual memory and 8 GM physical memory. If the page size is 4 KB.
a. How many bits are used to represent page numbers?
3. The computer use 18 bit virtual memory address space and 6 bit use for a represent page no.
a. How many total pages are there in memory above?
b. Write the total maximum access memory address space in KB of this virtual memory
address space?
c. If the 18-bit virtual address space is given as 01 0111 0101 0011 1101, clearly show
the page number and offset
4. a)
i. Ashen starts word processing software to create a document using a single processor
computer. he also starts a web browser to find some information. Show the process state
transition diagram for his function as given below.
New Exit
Admit release
Ready running
block
A. ……………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………
B. ……………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………
C. ……………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………
D. ……………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………
ii. Write 3 sheduling algorithm use in above diagram for process trasitions
1. …………………………………………………………………………………………………………………………
2. …………………………………………………………………………………………………………………………
3. …………………………………………………………………………………………………………………………
1. ………………………………………………………………………………………………………….
2. ………………………………………………………………………………………………………….
3. ………………………………………………………………………………………………………….
Block / Ready /
suspended suspended
viii. Briefly describe the way of occurring each interrupt mentioned in part vii
……………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………
Umayanga Wijesinghe - ICT ICT - II (A)
6|Page
6. a) A file is stored in 2KB blocks.The file allocation table (FAT) maintains a list of file blocks. The file
“Multiply.py” is stored as follows:
a. If the page size is 4 KB in virtual memory and the address is byte addressed is byte
addressed, how many bits are required for the page offset in the address?
ii. What is the physical address of 000 0101 1000 1001 of virtual address space
8. (a) The files exam.py and school.py each occupy 2 blocks of storage. The size of each block is 4 Kb,
meaning exam.py is 8 Kb and school.py is 16 Kb. the given table represents a File Allocation
Table(FAT) that keeps track of file blocks.
300
-1
-1
302
(b). for the following transition is seven state process transition diagram, state if the trasition is
Possible and if it is then list an event that can cause it.
Fill in the blanks given below mentioning the most suitable terms for Ⓐ"Ⓑ"Ⓒ"Ⓓ and Ⓔ in the
above image
A. …………………………………………………………………………………….
B. …………………………………………………………………………………….
C. …………………………………………………………………………………….
D. …………………………………………………………………………………….
E. …………………………………………………………………………………….
(b) What are the schedulers used to schedule processes among following process states in the
given diagram.
Ⓐ to Ⓑ - ……………………………………………………………………………….
Ⓒ to Ⓓ - ……………………………………………………………………………….
created(new) to Ⓐ - ………………………………………………………………..
(c) If a memory address contains 24 bits and the memory is two bytes addressable, calculate the
memory size.
(d) In the linked allocation method, when accessing for a file if there is an error in a block next
block of the file becomes inaccessible. Briefly describe how this weaknesses is removed by
using FAT.
11. An operating system uses Process Control Block (PCBs) to maintain important information about
each process.
Read the following scenario and answer the given questions:
“kasun” starts a computational application on a single processor computer. While the relevant
computations are in progress, he starts a zoom meeting as well, in order to
search for some information on web browser.
Write down the content rhat will be stored in the following PCB fields of the computing
process when the "computing process --> web browser process" context switch is made
i. Program counter?
ii. Select the witch process state (Rady, Running or Blocked)?
iii. What is the mean by “contiguous file space allocation” ?
iv. Write down two draw back contiguous file allocation
v. In addition to the normal data items, write down one other information that will
exist in a file block in the linked file space allocation scheme
12. Consider a user program of logical address of size 6 pages and page size is 4 bytes. The physical
address contains 300 frames. The user program consists of 22 instructions a, b, c, . . . u, v . Each
instruction takes 1 byte. Assume at that time the free frames are 7, 26, 52, 20, 55, 6, 18, 21, 70,
and 90. Find the following? (10 marks)
13. Consider a program consists of five segments: S0 = 600, S1 = 14 KB, S2= 100 KB, S3 =580 KB, and
S4 = 96 KB. Assume at that time, the available free space partitions of memory are 1200–1805,
50 – 150, 220-234, and 2500-3180.
Find the following of given Logical Map of memory:
1. (a) Consider the following diagram which shows the abstract layers of a computer system are
related.
Choose and wite down the correct answers from the list given below for labels A,B,C and D.
List = {compiler, comptLter hordware , live ware, operating system, system / applicaticn programs}
A. ………………………………………………………. B. …………………………………………………………………
C. ………………………………………………………. D. …………………………………………………………………
(b) In a certain computer the physical memory has a total capacity 4 GB. The size of a memory
Frame 4KB.
i. Calculate the total numer of frames in the physical memory?
i. Assume this program rcquires accessing virtual address 8200. To which physical address
will it get transformed to?
ii. Wriie down one advantage that the use of page tables bring with respect to program
sizes compared to the size of physical memory.
iii. give one rsason as to why a particular page of a prooess could be absent in physical
memory.