BE/B Eng Bachelor of Engineering Computer Engineering 2 — Questions and Answers
Question 1: In networking, what does the OSI model's Transport Layer (Layer 4) primarily provide?
- End-to-end communication, flow control, and error recovery between hosts (Correct answer)
- Physical transmission of raw bits over a medium
- Routing packets between networks
- Formatting data for application use
Correct answer: End-to-end communication, flow control, and error recovery between hosts
Layer 4 (Transport) provides reliable end-to-end data transfer with services like segmentation, flow control, and error recovery; TCP and UDP operate at this layer.
Question 2: What is the purpose of an interrupt in computer systems?
- To signal the CPU that an event requiring immediate attention has occurred (Correct answer)
- To halt the CPU permanently until reset
- To increase the CPU clock speed temporarily
- To synchronize multiple CPUs
Correct answer: To signal the CPU that an event requiring immediate attention has occurred
An interrupt is a signal that pauses the CPU's current task, saves its state, and transfers control to an Interrupt Service Routine (ISR) to handle the event, then resumes the original task.
Question 3: In software engineering, what does an API (Application Programming Interface) provide?
- A defined set of protocols and tools for building software and allowing different applications to communicate (Correct answer)
- A graphical interface for end users
- A method for physically connecting hardware components
- A compiler for translating source code
Correct answer: A defined set of protocols and tools for building software and allowing different applications to communicate
An API defines a contract—methods, data formats, and protocols—that enables different software applications to interact and share functionality without exposing internal implementation.
Question 4: What is the difference between RISC and CISC processor architectures?
- RISC uses simple, fixed-length instructions executed in one cycle; CISC uses complex, variable-length instructions (Correct answer)
- RISC uses more transistors than CISC
- CISC processors are always faster than RISC
- RISC and CISC refer to memory types, not processor design
Correct answer: RISC uses simple, fixed-length instructions executed in one cycle; CISC uses complex, variable-length instructions
RISC (Reduced Instruction Set Computer) processors use a small set of simple, fixed-format instructions for fast execution, while CISC (Complex Instruction Set Computer) processors use many complex, variable-length instructions.
Question 5: In database systems, what does ACID stand for?
- Atomicity, Consistency, Isolation, Durability (Correct answer)
- Availability, Concurrency, Integration, Data-integrity
- Atomicity, Concurrency, Isolation, Distribution
- Accuracy, Consistency, Indexing, Durability
Correct answer: Atomicity, Consistency, Isolation, Durability
ACID properties guarantee reliable database transactions: Atomicity (all-or-nothing), Consistency (valid state), Isolation (independent transactions), Durability (committed changes persist).
Question 6: What is the purpose of a mutex in concurrent programming?
- To ensure only one thread accesses a shared resource at a time (Correct answer)
- To increase the speed of multi-threaded applications
- To allow multiple threads to write to the same variable simultaneously
- To schedule thread execution order
Correct answer: To ensure only one thread accesses a shared resource at a time
A mutex (mutual exclusion lock) prevents race conditions by allowing only one thread to hold the lock and access a critical section at a time.
In networking, what does the OSI model's Transport Layer (Layer 4) primarily provide?