Loading...
Janata Bank Limited
Post: Assistant System Administrator
Exam Date: 20/12/2021, Exam Taker: CTI
1(a) Write Shell command which make a folder name 'A' with read permission access only.

mkdir A
chmod 400 A
1(b). Write Shell command which copy folder 'A' all information into folder 'P'. Folder 'A' and folder 'P's parent folder is same.

cp -r A P
2. What is Deadlock? Explain two situations where deadlock condition occurs.

Deadlock is a situation in an Operating System where two or more processes are unable to continue execution because each process is waiting for a resource that is held by another process.

Two Situations Where Deadlock Occurs

  • Mutual Exclusion: A resource can be used by only one process at a time. If another process requests the same resource, it must wait until the resource is released.
  • Circular Wait: Deadlock occurs when a group of processes form a circular chain where each process is waiting for a resource held by the next process in the chain.

Deadlock হলো Operating System-এর একটি অবস্থা যেখানে দুই বা ততোধিক process তাদের কাজ চালিয়ে যেতে পারে না, কারণ প্রতিটি process অন্য process-এর কাছে থাকা resource-এর জন্য অপেক্ষা করে।

Deadlock ঘটার দুটি পরিস্থিতি

  • Mutual Exclusion: যখন একটি resource এক সময়ে শুধুমাত্র একটি process ব্যবহার করতে পারে। অন্য কোনো process সেই resource চাইলে তাকে অপেক্ষা করতে হয় যতক্ষণ না resourceটি মুক্ত হয়।
  • Circular Wait: যখন কয়েকটি process একটি circular chain তৈরি করে এবং প্রতিটি process পরবর্তী process-এর কাছে থাকা resource-এর জন্য অপেক্ষা করে, তখন deadlock condition তৈরি হয়।
3. Give regular expressions that generate, The language {w|w contains at least two a's, or exactly two b's}.

The language is:
{ w | w contains at least two a’s, OR exactly two b’s }

Regular Expressions:

Strings with at least two a’s:
(b|a)* a (b|a)* a (b|a)*

Strings with exactly two b’s:
a* b a* b a*

Combined Regular Expression (Union):
((a|b)*a(a|b)*a(a|b)*) | (a*b a*b a*)

4.Consider the IP address 10.20.30.0/25 now answer the below question:
a. What is the subnet mask of the above IP address?
b. How many host per subnet have?
c. What is the Broadcast address of this 10.20.30.0/3 IP address?

Given:
IP Address = 10.20.30.0/25

a) Subnet Mask

A /25 prefix means 25 bits are used for the network.

Subnet Mask = 255.255.255.128

Binary form:
11111111.11111111.11111111.10000000

b) Number of hosts per subnet

Host bits = 32 − 25 = 7 bits

Total IP addresses per subnet = 27 = 128

Usable hosts = 128 − 2 = 126 hosts

(2 addresses are reserved for network and broadcast)

c) Broadcast address

With /25, each subnet block size = 128.

Subnet range:
10.20.30.0 → 10.20.30.127

Network address = 10.20.30.0
Broadcast address = 10.20.30.127

Usable host range:
10.20.30.1 – 10.20.30.126

Final Answers:

QuestionAnswer
Subnet Mask255.255.255.128
Hosts per subnet126 usable hosts
Broadcast Address10.20.30.127
5.Given a scenario about football Game (Game_no, game time, game_name), Team (team-id, coach_id, team-name), Coach (Coach-id, Coach-name) Player (player-id, palyer- name, player-position), Stadium information (stadium-id, stadium-name, stadium-loc) Match (match_id, match date, match_result).
i. Draw ER diagram

6.In the given example, let us assume the jobs and the memory requirements as the following: Job1 = 90k, Job2 = 20k, Job350k, Job4=200k. Let the free pace memory allocation blocks be: Block1= 50k, Block2= 100k, Block3=90k, Block4=200k, Block5 50k. Now show Best Fit Method and first fit method memory allocation. [Similar Question but value cannot exactly remember.]

Given:
Jobs: J1 = 90K, J2 = 20K, J3 = 50K, J4 = 200K
Blocks: B1 = 50K, B2 = 100K, B3 = 90K, B4 = 200K, B5 = 50K

1) First Fit Method
In First Fit, each job is placed in the first block that is large enough.

Step by step:
J1 = 90K → first block that fits is B2 = 100K
Remaining in B2 = 10K

J2 = 20K → first block that fits is B1 = 50K
Remaining in B1 = 30K

J3 = 50K → first block that fits is B3 = 90K
Remaining in B3 = 40K

J4 = 200K → first block that fits is B4 = 200K
Remaining in B4 = 0K

First Fit Allocation Table:

JobSizeAllocated BlockBlock SizeUnused Space
J190KB2100K10K
J220KB150K30K
J350KB390K40K
J4200KB4200K0K

2) Best Fit Method
In Best Fit, each job is placed in the smallest block that can hold it.

Step by step:
J1 = 90K → best block is B3 = 90K
Remaining in B3 = 0K

J2 = 20K → best block is B1 = 50K
Remaining in B1 = 30K

J3 = 50K → best block is B5 = 50K
Remaining in B5 = 0K

J4 = 200K → best block is B4 = 200K
Remaining in B4 = 0K

Best Fit Allocation Table:

JobSizeAllocated BlockBlock SizeUnused Space
J190KB390K0K
J220KB150K30K
J350KB550K0K
J4200KB4200K0K

Final Answer:
First Fit allocation:
J1 → B2, J2 → B1, J3 → B3, J4 → B4

Best Fit allocation:
J1 → B3, J2 → B1, J3 → B5, J4 → B4

7. Calculate The Average Waiting Time of SJF scheduling algorithm.
ProcessBurst TimeArrival Time
P1103
P211
P323
P414
P552

(i) Average waiting time for FCFS
(ii) Preemptive SJF
(iii) Round Robin (Quantum time: 3) scheduling algorithm

You must subscribe & Login to view more.

Don’t have an account? Register

Or your subscription is under review by admin. Please message on WhatsApp / Telegram.

Leave a Comment

Latest Post
Field Based Job Question & Solution
Bank IT Job Solution

MCQ + Written from Bangladesh Bank, Sonali, Combined Bank IT recruitment.

BPSC IT Job Solution

BPSC Computer/IT cadre & non-cadre post Question papers with full solutions.

Gas Field IT Job Solution

Gas field like TGTDCL, BGDCL, JGTDSL, KGDCL, SGCL, RPGCL, GTCL etc. question solution

Power Sector IT Job Solution

Power sector such as NESCO, DESCO, DPDC, WZPDCL, BPDB, PGCB, BREB etc

Other IT Job Solution

Other Govt. Semi govt. organization like BCC, BTCL, CAAB, NSI etc.

NTRCA IT Job Solution (upcoming)

NTRCA ICT-related posts such as Assistant Teacher, Demonstrator, Lecturer.

IT MCQ Job Solution

Collected MCQ Job solution of BANK, BPSC, POWER SECTOR, GAS Field and Others.

Topic Based Q&S
WhatsApp Telegram Messenger