Notes, abstracts, papers, exams and problems of Computers

Sort by
Subject
Level

Cache Write Policies & Virtual Memory: A Deep Dive

Classified in Computers

Written at on English with a size of 3.47 KB.

Cache Write Policies

Write-Through

  • Definition: Writes data to both the cache and main memory simultaneously.
  • Synchronization: Cache and main memory are always synchronized.
  • Write Speed: Slower, because every write goes to both cache and memory.
  • Data Integrity: Ensures data in both cache and main memory is identical.
  • CPU Performance Impact: Slower, due to the additional write to main memory.
  • Use Cases: Ideal for systems where data consistency is critical (e.g., databases).
  • Cache Miss Handling: Writes to both cache and memory on a miss.
  • Complexity: Simple to implement; doesn't require tracking of data in the cache.

Write-Back

  • Definition: Writes data to the cache first and only writes to memory when the cache line is evicted.
  • Synchronization: Cache and main
... Continue reading "Cache Write Policies & Virtual Memory: A Deep Dive" »

Java Programming: Classes, Objects, and Key Concepts

Classified in Computers

Written at on English with a size of 5.28 KB.

Classes (الصفوف)

  • A class consists of variables (fields) and methods.
  • Variables are data members of a class.
  • Methods are functions that define the class's behavior.

Variables (المتغيرات)

  • Declared with a data type and a name.
  • Can be public or private.
  • Examples: int age, String name.

Methods (الأساليب)

  • Functions that perform specific tasks.
  • Can have parameters and return values.
  • Types:
    • Void methods: Don't return a value.
    • Return type methods: Return a value.
    • Static methods: Can be called without creating an object.
    • Instance methods: Require an object to be called.
    • Abstract methods: Declared without a body; used in abstract classes.
    • Overloaded methods: Multiple methods with the same name but different parameters.

Constructors (البناؤون)

... Continue reading "Java Programming: Classes, Objects, and Key Concepts" »

C Code Examples: Data Structures and Algorithms

Classified in Computers

Written at on English with a size of 5.54 KB.

Recursive Binary Tree Traversals

Inorder Traversal:

void inorder(struct node *root)
{
  if(root != NULL)
  {
    inorder(root->left);
    printf("%d\t", root->data);
    inorder(root->right);
  }
}

Preorder Traversal:

void preorder(struct node *root)
{
  if(root != NULL)
  {
    printf("%d\t", root->data);
    preorder(root->left);
    preorder(root->right);
  }
}

Postorder Traversal:

void postorder(struct node *root)
{
  if(root != NULL)
  {
    postorder(root->left);
    postorder(root->right);
    printf("%d\t", root->data);
  }
}

Linked List Operations

Search

void search(struct node *head,int key)
{
  struct node *temp = head;
  while(temp != NULL)
  {
    if(temp->data == key)
      printf("key found");
    temp =
... Continue reading "C Code Examples: Data Structures and Algorithms" »

Digital Logic: Moore's Law, Logic Gates, and Number Systems

Classified in Computers

Written at on English with a size of 708.55 KB.

Lecture 1: Moore's Law

Moore's Law: The number of transistors on microchips doubles every two years.

Lecture 2: Logic Gates

I7WgAAAABJRU5ErkJggg==

i3AAAAABJRU5ErkJggg==

+NnQQWHnrkU5hEgARmEjCXFieBuVQxHFZoESCBhRZfu1ongdmFNPtxFQIkMFepI+jBkMCCho4VvYwACczL2qMNLDy0x6cIGoEjR45Iq1atZNWqVbqNnTt3SpUqVYJujxWdQYArMGdwZ68OI4AY19dff10GDBggbdu2lblz50p8fLzDo2L3ZhEggZlFjOXDBgEEmaekpEhcXBzJy6NaJYF5VHEcNhEgAiIkMM4CIkAEPIsACcyzquPAiQARIIFxDhABIuBZBEhgnlUdB04EiAAJjHOACBABzyJAAvOs6jhwIkAESGCcA0SACHgWARKYZ1XHgRMBIkAC4xwgAkTAswiQwDyrOg6cCBABEhjnABEgAp5FgATmWdVx4ESACJDAOAeIABHwLAIkMM+qjgMnAkSABMY5QASIgGcRIIF5VnUcOBEgAiQwzgEiQAQ8iwAJzLOq48CJABEggXEOEAEi4FkESGCeVR0HTgSIAAmMc4AIEAHPIkAC86zqOHAiQAT+DyAtVcWtdpgpAAAAAElFTkSuQmCC

PKhJg4vKJJngcj4CICTBwugs1dMQJeQYCJwyua5HkwAi4iwMThItjcFSPgFQSYOLyiSZ4HI+AiAkwcLoLNXTECXkGAicMrmuR5MAIuIsDE4SLY3BUj4BUEmDi8okmeByPgIgJMHC6CzV0xAl5BgInDK5rkeTACLiLAxOEi2NwVI+AVBJg4vKJJngcj4CICTBwugs1dMQJeQYCJwyua5HkwAi4iwMThItjcFSPgFQSYOLyiSZ4HI+AiAkwcLoLNXTECXkGAicMrmuR5MAIuIsDE4SLY3BUj4BUEmDi8okmeByPgIgJMHC6CzV0xAl5BgInDK5rkeTACLiLAxOEi2NwVI+AVBP4HSdmP4LA25GYAAAAASUVORK5CYII=

5hQAAAAASUVORK5CYII=

eg8CIAACIAACfhGAQPiFDYVAAARAAARAwNkEIBDOjj96DwIgAAIgAAJ+EYBA+IUNhUAABEAABEDA2QT+D4sjTswCubX7AAAAAElFTkSuQmCC

o3LOcXr2Tof4HmKwTSBU6n03g8Hv9jfn5+pseNz2fo4ysWkACBdgFD334B8hMgEC9g6OMrFpAAgXYBQ99+AfITIBAvYOjjKxaQAIF2AUPffgHyEyAQL2Do4ysWkACBdgFD334B8hMgEC9g6OMrFpAAgXYBQ99+AfITIBAvYOjjKxaQAIF2AUPffgHyEyAQL2Do4ysWkACBdgFD334B8hMgEC9g6OMrFpAAgXYBQ99+AfITIBAvYOjjKxaQAIF2AUPffgHyEyAQL2Do4ysWkACBdgFD334B8hMgEC9g6OMrFpAAgXYBQ99+AfITIBAvYOjjKxaQAIF2AUPffgHyEyAQL2Do4ysWkACBdgFD334B8hMgEC9g6OMrFpAAgXYBQ99+AfITIBAvYOjjKxaQAIF2AUPffgHyEyAQL2Do4ysWkACBdgFD334B8hMgEC9g6OMrFpAAgXYBQ99+AfITIBAvYOjjKxaQAIF2AUPffgHyEyAQL2Do4ysWkACBdgFD334B8hMgEC9g6OMrFpAAgXYBQ99+AfITIBAvYOjjKxaQAIF2AUPffgHyEyAQL2Do4ysWkACBdgFD334B8hMgEC9g6OMrFpAAgXaBf18koFmMFdorAAAAAElFTkSuQmCC

wFbJNthuSOezwAAAABJRU5ErkJggg==

AND, OR, and NOT gates are universal.

Logic word problem steps:

Example: In a bank, there were four employees: the bank manager, assistant manager, teller, and the security guard. The bank has a single vault for the storage of their money. This vault was designed so that it needs four signals to open it. These four signals are from the bank manager, assistant manager, teller, and the security guard. For the vault to open, it needs the following conditions:

  1. No single employee can open the vault.
  2. It can be opened with three employees as long as one of them is the manager.
  3. It can be opened by the manager together with the assistant
... Continue reading "Digital Logic: Moore's Law, Logic Gates, and Number Systems" »

Mastering Stacks, Deques, Trees, and Graph Data Structures

Classified in Computers

Written at on English with a size of 21.54 KB.

A stack is a fundamental data structure in computer science that follows the Last In, First Out (LIFO) principle. This means that the last element added to the stack is the first one to be removed. You can think of it like a stack of plates: you can only add or remove the top plate.

### Key Concepts of a Stack:

1. Basic Operations:
   - Push: This operation adds an element to the top of the stack.
   - Pop: This operation removes the element from the top of the stack and returns it.
   - Peek (or Top): This operation returns the top element of the stack without removing it.
   - IsEmpty: This operation checks whether the stack is empty.

2. Implementation:
   Stacks can be implemented using arrays or linked lists. Here are the details for... Continue reading "Mastering Stacks, Deques, Trees, and Graph Data Structures" »

Microprocessor vs. Microcontroller: Understanding the Key Differences

Classified in Computers

Written at on English with a size of 2.45 KB.

Microprocessor vs. Microcontroller

ii) Differentiate Between a Microprocessor and a Micro-Controller

Microprocessor

Definition:

A microprocessor is a central processing unit (CPU) on a single integrated circuit (IC) chip that performs the processing functions of a computer.

Functionality:
  • It only includes the CPU core and lacks other components like memory, I/O ports, timers, and other peripherals.
  • Requires external components like memory (RAM, ROM), input/output devices, timers, and other peripherals to function as a complete system.
Usage:
  • Primarily used in systems requiring high computational power and flexibility, such as desktop computers, laptops, servers, and high-end embedded systems.
  • Suited for applications where customization of peripherals
... Continue reading "Microprocessor vs. Microcontroller: Understanding the Key Differences" »

Essential Linux Commands: A Practical Reference

Classified in Computers

Written at on English with a size of 3.95 KB.

Essential Linux Commands

File and Directory Management

  • mkdir: Create a new directory.
  • ls: List contents of a directory.
  • rm: Remove files or directories (-r for recursive).
  • cp: Copy files or directories.
  • mv: Move or rename files or directories.
  • cat: Display file contents or create files.
  • less: View file contents one page at a time.
  • head: Display the first 10 lines of a file.
  • tail: Display the last 10 lines of a file.

System Information

  • uname: Show system information (kernel, version, etc.).
  • top: Display running processes and resource usage.
  • df: Show disk space usage.
  • df -h: Show disk usage in human-readable format.
  • free: Display memory usage (RAM and swap).

File Creation and Editing

  • touch: Create an empty file or update its timestamp.
  • echo: Write text to a file
... Continue reading "Essential Linux Commands: A Practical Reference" »

Networking Essentials: TCP, IP, Routing, and SDN

Classified in Computers

Written at on English with a size of 3.21 MB.

sMdRTz2CZp8AAAAASUVORK5CYII= 3sIS9NlspZMAAAAASUVORK5CYII=

8clQpOLAAAAAElFTkSuQmCC Pyzl774gh3lYAAAAAElFTkSuQmCC

QltAtfyLfn4RSLxAPwfE7YF1nxk+l4AAAAASUVORK5CYII= wGzRdTNkcDQPAAAAABJRU5ErkJggg==

CJ95H4KO90AAAAASUVORK5CYII= x82xiFmBI28qwAAAABJRU5ErkJggg==

IhgAAfcEVDuIM6TZl3sB7oF7ITsRWUQCAgICAgICAh50BAMgICAgICAgICAgYBghuDwDAgICAgICAgIChhGCARAQEBAQEBAQEBAwjBAMgICAgICAgICAgIBhhGAABAQEBAQEBAQEBAwjBAMgICAgICAgICAgYBghGAABAQEBAQEBAQEBwwjBAAgICAgICAgICAgYRggGQEBAQEBAQEBAQMAwQjAAAgICAgICAgICAoYRggEQEBAQEBAQEBAQMIwQDICAgICAgICAgICAYYRgAAQEBAQEBAQEBAQMIwQDICAgICAgICAgIGAYIRgAAQEBAQEBAQEBAcMIwQAICAgICAgICAgIGEYIBkBAQEBAQEBAQEDAMEIwAAICAgICAgICAgKGEYIBEBAQEBAQEBAQEDCMEAyAgICAgICAgICAgGGEYAAEBAQEBAQEBAQEDCMEAyAgICAgICAgICBgGCEYAAEBAQEBAQEBAQHDCMEACAgICAgICAgICBhGCAZAQEBAQEBAQEBAwDBCMAACAgICAgICAgIChhGCARAQEBAQEBAQEBAwjBAMgICAgICAgICAgIBhhGAABAQEBAQEBAQEBAwjBAMgICAgICAgICAgYBghGAABAQEBAQEBAQEBwwjBAAgICAgICAgICAgYRggGQEBAQEBAQEBAQMAwQjAAAgICAgICAgICAoYRggEQEBAQEBAQEBAQMIwQDICAgICAgICAgICAYYRgAAQEBAQEBAQ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MOfkFRRFEXZjIoZRWnjcKwMxwpsbZ4IpX3AcVIcM7M110Jlz4TjXxjMoLVj1xRFUfYsgP8HTC7DNUfOHwwAAAAASUVORK5CYII= AAAAAElFTkSuQmCC B+6MyUcHUtKBAAAAAElFTkSuQmCC

1. TCP Congestion Control

Slow Start: TCP initializes congestion window (cwnd) to a small size and doubles it every Round Trip Time (RTT) until a loss occurs (exponential growth) or the slow start threshold is reached.

Congestion Avoidance: After reaching the threshold, cwnd is incremented by one segment for each RTT, growing linearly to avoid congestion.

Fast Recovery: When triple duplicate ACKs are detected, TCP halves the cwnd and reduces the slow start threshold to half of the cwnd size before the loss, then transitions to congestion avoidance.

2. TCP RTT and Timeout

Estimating RTT: Uses Smoothed Round Trip Time (SRTT) which is a weighted average of previous RTT measurements.

Timeout Calculation: Often calculated as Timeout=SRTT+4×RTT

... Continue reading "Networking Essentials: TCP, IP, Routing, and SDN" »

Windows Popularity, Vista Versions, and Features

Classified in Computers

Written at on English with a size of 2.63 KB.

Windows Popularity and Vista Features

Unit 13

Interviewer: There is no doubt that Windows has revolutionized the way we use computers today. Bill, can you explain just why it’s so popular?

Bill: Well, very simply, people find Windows very easy to use because everything is presented in graphic images. It’s also compatible with thousands of programs.

Interviewer: The big news at the moment is, of course, the launch of Windows Vista – the successor to Windows XP. I understand that there are several versions of Vista available. Could you give us some advice on which one to get?

Bill: Yes, you’re right – there are four main editions: Home Basic, Home Premium, Business and Ultimate.

Windows Vista Editions:

  • Home Basic: Designed for users with basic
... Continue reading "Windows Popularity, Vista Versions, and Features" »

Spreadsheet Basics and Text Editing Tips

Classified in Computers

Written at on English with a size of 2.15 KB.

Unit 14: Moving Text

Cutting and Pasting

Anna: Ben, do you know how I can move this paragraph? I want to put it at the end of this page.

Ben: I think so. First, select the text with your mouse. Then, choose "Cut" from the Edit menu.

Anna: Like this?

Ben: Yes. The text disappears and is copied to the Clipboard. Click where you want the text to go.

Anna: Okay. Is that right?

Ben: Yes, if that's the correct spot. Next, choose "Paste" from the Edit menu, or press CTRL+V.

Anna: Okay, done. Is that all?

Ben: Yes. If you make a mistake, choose "Undo" from the Edit menu to reverse your last action.

Anna: Brilliant! Thanks!

Ben: You're welcome.

Unit 15: Spreadsheet Fundamentals

Introduction

Let's start with the basics. Spreadsheets are used in business for financial... Continue reading "Spreadsheet Basics and Text Editing Tips" »