Utc502 PDF
Utc502 PDF
Utc502 PDF
EU Code: UTC502
This subject contains: 6 pages
Course title: Fundamentals of Operating Systems
Centers concerned Beirut Baalbeck Baaklin Bickfaya Nahr Ibrahim Chtoura Tripoli
To 2 12
3
b 2 12
To 1.5 9
b 0.5 3
4
vs 0.5 3
d 0.5 3
To 0.5 3
5 b 1.5 9
vs 0.5 3
6 - 22 12
7 - 12
Use the Best Fit choice in order to represent the evolution of the central memory according
to the arrival of the following successive events:
ÿ Arrival of program F (8 K) ÿ
Departure of program C ÿ Arrival of
program G (20k) ÿ Departure of
program E ÿ Arrival of program H
(12k)
EXERCISE 2 – Scheduling of processes (4 dots)
P1 P2 P3 P4
Calculation 2 ms Calculation 2 ms Calculation 2 ms Calculation 6 ms
I/O 6ms I/O 6ms I/O 8ms I/O 2ms
Calculation 2 ms Calculation 6 ms Calculation 4 ms Calculation 4ms
I/O 4ms I/O 2ms I/O 6ms I/O 1ms
Calculation 4ms Calculation 1 ms Calculation 1 ms
I/O 1ms I/O 1ms I/O 2ms
Preemptive
Process P1
Elected
Ready
Blocked
P2 process
Elected
Ready
Blocked
P3 process
Elected
Ready
Blocked
P4 process
Elected
Ready
Blocked
Turnstile
Process P1
Elected
Ready
Blocked
P2 process
Elected
Ready
Blocked
P3 process
Elected
Ready
Blocked
P4 process
Elected
Ready
Blocked
For process B, page 1 of segment BS1 and page 1 and 3 of BS2 are loaded into
central memory in boxes 5, 6, 14 respectively.
For process C, only page 2 of segment CS1 is loaded into central memory in box 18.
For process D, page 1 of segment DS1, pages 2 and 3 of segment DS2 are loaded in
boxes 9, 10 and 17.
a) Represent on a drawing the structures allocated for this type of memory
allocation and the central memory corresponding to the allocation described. b)
The 2 processes A and B are described by a control block which also contains the
following information:
ÿ Each page table entry contains a bit field to specify the access rights
associated with a page. This field is made up of three bits x, r, w with the
following meaning:
x: 0 no execute permission on page, 1 execute permission granted r:
0 no read permission on page, 1 read permission granted w: 0 no
write permission on page, 1 write permission granted This "right" field
to the value 011 for page P1 of segment AS1 of process A. Process A
executes the instruction STORE R1 (AS1, P1, move 128) which performs
the writing of the contents of the processor register R1 to the address
(AS1, P1, displacement 128). What is going on ?
Moving in the
Descriptor table page Moving in the
descriptor table Segment page number
number segment page
page
c) Give the total number of disk accesses necessary, with or without management of
caching mechanism.
P1 0 8 units 3
P2 3 7 units 1
P3 5 9 units 2
P1 P2 P3
Calculation during 1 unit Calculation during 1 unit Calculation during 4 units
Take(R) Take(R) Take(R)
Use R for 7 units Use R for 5 units Use R for 5 units
Render (R) Render (R) Render (R)
Calculation during 1 unit
Build the execution schedule of the three processes taking into account the sharing of the R resource.
On a computer, 8 processes ranging from P1 to P8 have access to 6 exclusive access resources ranging from
R1 to R6 as follows:
After reading how resources are held or requested, is there a risk of deadlock? If so, what are the processes
involved?