Ministry of Food
Post: Network/Website Manager (ICT)
Exam Date:21-05-2025; Exam Taker: BPSC
Solid State Drive (SSD)
SSD (Solid State Drive) is a type of storage device used in computers to store data permanently. Unlike traditional hard disk drives (HDD), an SSD uses flash memory and has no moving mechanical parts.
SSDs are faster, more reliable, and consume less power compared to HDDs.
Working Principle of SSD
The working principle of an SSD is based on NAND flash memory technology.
- Data is stored in memory cells made of floating-gate transistors.
- These cells store electrical charges to represent binary data (0 and 1).
- A controller inside the SSD manages reading, writing, and storing data.
- When the computer requests data, the SSD controller quickly retrieves it from the flash memory without any mechanical movement.
- This electronic process allows SSDs to access data much faster than traditional hard drives.
Solid State Drive (SSD)
SSD (Solid State Drive) হলো একটি storage device যা computer-এ data স্থায়ীভাবে সংরক্ষণ করার জন্য ব্যবহার করা হয়। এটি traditional hard disk drive (HDD)-এর মতো mechanical অংশ ব্যবহার করে না, বরং flash memory ব্যবহার করে।
SSD তুলনামূলকভাবে দ্রুত, নির্ভরযোগ্য এবং কম power ব্যবহার করে।
SSD-এর Working Principle
SSD-এর কাজের মূল নীতি হলো NAND flash memory technology।
- Data memory cell-এ সংরক্ষণ করা হয় যা floating-gate transistor দিয়ে তৈরি।
- এই cell-গুলো electrical charge সংরক্ষণ করে binary data (0 এবং 1) নির্দেশ করে।
- SSD-এর ভিতরে একটি controller থাকে যা data read, write এবং manage করে।
- Computer যখন data চায়, তখন controller দ্রুত flash memory থেকে data নিয়ে আসে।
- যেহেতু এতে কোনো mechanical movement নেই, তাই SSD খুব দ্রুত data access করতে পারে।
Comparison Between CPU and GPU
- Definition: CPU (Central Processing Unit) is the main processor of a computer responsible for executing general instructions. GPU (Graphics Processing Unit) is a processor designed mainly for graphics rendering and parallel processing.
- Number of Cores: CPU has a small number of powerful cores, while GPU has a large number of smaller cores for parallel tasks.
- Processing Type: CPU performs sequential processing and handles a variety of tasks. GPU performs parallel processing and handles many similar tasks simultaneously.
- Usage: CPU is used for general computing tasks such as running programs and operating systems. GPU is mainly used for graphics rendering, gaming, video processing, and machine learning.
- Performance: CPU is optimized for low-latency tasks, while GPU provides high throughput for large-scale parallel computations.
CPU এবং GPU-এর তুলনা
- সংজ্ঞা: CPU (Central Processing Unit) হলো computer-এর প্রধান processor যা সাধারণ instruction execute করে। GPU (Graphics Processing Unit) মূলত graphics rendering এবং parallel processing-এর জন্য ব্যবহৃত processor।
- Core সংখ্যা: CPU-তে কম সংখ্যক কিন্তু শক্তিশালী core থাকে, কিন্তু GPU-তে অনেক ছোট ছোট core থাকে।
- Processing Type: CPU sequential processing করে এবং বিভিন্ন ধরনের কাজ পরিচালনা করে। GPU parallel processing করে এবং একই ধরনের অনেক কাজ একসাথে সম্পন্ন করতে পারে।
- ব্যবহার: CPU সাধারণ computing কাজ যেমন program চালানো এবং operating system পরিচালনার জন্য ব্যবহৃত হয়। GPU graphics rendering, gaming, video processing এবং machine learning-এ ব্যবহৃত হয়।
- Performance: CPU কম latency-এর কাজের জন্য উপযোগী, কিন্তু GPU বড় parallel computation-এর জন্য বেশি কার্যকর।
i) Virtual Memory:
Virtual memory is a memory management technique that allows a computer to use part of the secondary storage (hard disk or SSD) as if it were additional RAM. When the main memory (RAM) becomes full, the operating system temporarily transfers some data from RAM to secondary storage. This allows the system to run larger programs and multiple processes even when physical RAM is limited.
ii) Cache Memory:
Cache memory is a small, high-speed memory located close to the CPU. It stores frequently used data and instructions so that the CPU can access them quickly. Because cache memory is much faster than main memory (RAM), it helps improve the overall performance of the computer.
i) Virtual Memory:
Virtual memory হলো একটি memory management technique যেখানে computer-এর secondary storage (hard disk বা SSD)-এর একটি অংশকে অতিরিক্ত RAM-এর মতো ব্যবহার করা হয়। যখন main memory (RAM) পূর্ণ হয়ে যায়, তখন operating system কিছু data সাময়িকভাবে RAM থেকে secondary storage-এ স্থানান্তর করে। এর ফলে কম RAM থাকা সত্ত্বেও বড় program এবং একাধিক process চালানো সম্ভব হয়।
ii) Cache Memory:
Cache memory হলো একটি ছোট কিন্তু খুব দ্রুত memory যা CPU-এর কাছাকাছি অবস্থান করে। এতে frequently used data এবং instruction সংরক্ষণ করা হয় যাতে CPU দ্রুত সেগুলো access করতে পারে। Cache memory RAM-এর তুলনায় অনেক দ্রুত, তাই এটি computer-এর performance বৃদ্ধি করতে সাহায্য করে।

i) What is the network address?
ii)What is the subnet mask for the given network?
iii) What is the broadcast address?
iv) What is the maximum number of devices this network can connect ?
v) What is the IP address of the first host device in the network?
#include <stdio.h>
// Function to find the missing number
int findMissing(int arr[], int size) {
int total = (size * (size + 1)) / 2; // Sum of numbers from 1 to size
int sum = 0;
for(int i = 0; i < size; i++) {
sum += arr[i];
}
return total - sum; // Missing number
}
int main() {
int arr[10] = {1, 2, 3, 4, 5, 0, 7, 8, 9, 10};
int missing;
missing = findMissing(arr, 10);
// Replace zero with missing number
for(int i = 0; i < 10; i++) {
if(arr[i] == 0) {
arr[i] = missing;
}
}
printf("Restored Array:\n");
for(int i = 0; i < 10; i++) {
printf("%d ", arr[i]);
}
return 0;
}
Polymorphism is an important concept of Object-Oriented Programming (OOP) where a single function or method can perform different tasks depending on the context. The word polymorphism means “many forms”. It allows the same interface to be used for different data types or objects.
Polymorphism mainly occurs in two ways:
1. Method Overloading
Method overloading occurs when multiple methods have the same name but different parameters (different number or type of arguments) in the same class. It is an example of compile-time polymorphism.
Example:
class Calculator {
int add(int a, int b) {
return a + b;
}
int add(int a, int b, int c) {
return a + b + c;
}
}
In this example, the method name add() is the same, but the number of parameters is different.
2. Method Overriding
Method overriding occurs when a child class provides a specific implementation of a method that is already defined in its parent class. It is an example of runtime polymorphism.
Example:
class Animal {
void sound() {
System.out.println("Animal makes sound");
}
}
class Dog extends Animal {
void sound() {
System.out.println("Dog barks");
}
}
Here, the Dog class overrides the sound() method of the Animal class to provide its own behavior.
Polymorphism হলো Object-Oriented Programming (OOP)-এর একটি গুরুত্বপূর্ণ ধারণা যেখানে একই method বা function বিভিন্ন পরিস্থিতিতে ভিন্নভাবে কাজ করতে পারে। Polymorphism শব্দের অর্থ হলো “many forms”।
Polymorphism মূলত দুইভাবে ঘটে: Method Overloading এবং Method Overriding।
১. Method Overloading
Method overloading তখন ঘটে যখন একই class-এর মধ্যে একই নামের একাধিক method থাকে কিন্তু তাদের parameter ভিন্ন হয় (সংখ্যা বা type ভিন্ন হয়)। এটি compile-time polymorphism-এর উদাহরণ।
Example:
class Calculator {
int add(int a, int b) {
return a + b;
}
int add(int a, int b, int c) {
return a + b + c;
}
}
এখানে add() method-এর নাম একই কিন্তু parameter-এর সংখ্যা ভিন্ন।
২. Method Overriding
Method overriding তখন ঘটে যখন child class তার parent class-এর একটি method-কে নতুনভাবে define করে। এটি runtime polymorphism-এর উদাহরণ।
Example:
class Animal {
void sound() {
System.out.println("Animal makes sound");
}
}
class Dog extends Animal {
void sound() {
System.out.println("Dog barks");
}
}
এখানে Dog class, Animal class-এর sound() method-কে override করে নিজস্ব behavior প্রদান করেছে।
