A ___________ is a lightweight process that shares the same address space as other threads...

  • Kernel Thread
  • User-Level Thread
  • Thread Pool
  • Fiber
User-Level Thread: This option refers to a thread that is managed by the user space rather than the kernel. User-level threads are generally faster to create and manage but may not fully utilize multicore processors due to limitations in kernel-level scheduling. They share the same address space, making context switching between them faster than with kernel threads.

What is the difference between padding and margin in CSS?

  • Padding adds space between the border of an element and its content, while margin adds space between the element and adjacent elements.
  • Padding and margin are the same concepts, used interchangeably in CSS.
  • Padding is the space inside an element's border, while margin is the space outside the border.
  • Padding is the space outside an element's border, while margin is the space inside the border.
In CSS, padding and margin are both properties used for spacing, but they operate differently. Padding refers to the space inside an element's border, creating space between the border and the content within. On the other hand, margin refers to the space outside the element's border, creating space between the element and adjacent elements. Understanding this difference is crucial for proper layout and spacing in web design.

Which cryptographic algorithm is commonly used for hashing passwords in web applications?

  • Bcrypt
  • MD5
  • SHA-1
  • SHA-256
Bcrypt is commonly used for hashing passwords in web applications due to its computational intensity and resistance to brute-force attacks. It incorporates a salt to enhance security by ensuring unique hashes even for identical passwords.

What is the primary function of memory management in an operating system?

  • Allocating memory to processes
  • Handling hardware interrupts
  • Managing file systems
  • Managing virtual memory
Memory management in an operating system primarily involves managing virtual memory. This includes allocating memory space to processes, swapping data between RAM and disk when needed, and ensuring efficient utilization of available memory resources to optimize system performance and enable multitasking. Managing hardware interrupts and file systems are separate functions in an operating system.

What does HTML stand for?

  • Hyperlink Text Language
  • Hyperlink Text Markup
  • Hyperlinks and Text
  • Hypertext Markup Language
HTML stands for Hypertext Markup Language. It is the standard markup language for creating web pages and web applications. The use of markup language allows developers to structure content on the web and define how it should be displayed in browsers.

Explain the concept of closure in JavaScript.

  • A closure is a JavaScript module for encapsulating private variables
  • A closure is a data structure for storing and accessing key-value pairs
  • A closure is a function that captures and remembers its outer scope variables
  • A closure is a function that has access to its parent scope variables
In JavaScript, a closure is a function that has access to its outer (enclosing) function's variables, even after the outer function has finished executing. This concept is fundamental for creating private variables and managing scope in JavaScript programs.

_________ is a wireless networking technology that enables devices to exchange data over short distances using UHF radio waves.

  • Bluetooth
  • LTE
  • NFC
  • Wi-Fi
Bluetooth is a wireless networking technology that enables devices to exchange data over short distances using UHF radio waves. NFC (Near Field Communication) is another short-range wireless communication technology, but it operates at much closer distances than Bluetooth and uses electromagnetic fields for data transfer. Wi-Fi is a technology that allows devices to connect to a local area network (LAN) wirelessly, typically using radio waves. LTE (Long-Term Evolution) is a standard for wireless broadband communication of mobile devices, focusing on high-speed data transmission over longer distances than Bluetooth or NFC.

You're designing a memory management system for a multi-user operating system. How would you ensure fair allocation of memory resources among different processes?

  • Allocate memory based on historical usage patterns, giving more memory to processes that have used less memory recently.
  • Implement a priority-based memory allocation strategy where processes with higher priority levels are allocated more memory resources.
  • Implement a proportional share-based memory allocation scheme, where each process is allocated memory based on a predefined percentage of the total available memory.
  • Use a round-robin approach to allocate memory, ensuring each process gets an equal share of available memory.
In a multi-user operating system, a proportional share-based memory allocation scheme is preferred as it ensures fair allocation of memory resources based on the needs of each process. This scheme is beneficial because it allows processes with varying memory requirements to coexist efficiently, preventing resource starvation or monopolization by any single process. By allocating memory based on a predefined percentage of the total available memory, the system can adapt dynamically to changes in workload and ensure equitable resource distribution. This approach promotes fairness and helps maintain system stability and performance.

Which type of index organizes data in a tree structure for fast retrieval?

  • B-Tree Index
  • Bitmap Index
  • Hash Index
  • Reverse Index
A B-Tree index organizes data in a tree structure for fast retrieval. B-Tree indexes are commonly used in databases because they provide logarithmic time complexity for search, insert, and delete operations, making them efficient for handling large datasets.

What are some common strategies for debugging performance issues in software applications?

  • Code profiling
  • Load testing
  • Memory profiling
  • Optimizing algorithms
Code profiling involves analyzing the performance of the code to identify bottlenecks and areas of improvement. Load testing helps in simulating real-world conditions to assess how the application performs under heavy loads. Memory profiling focuses on memory usage to optimize resource utilization. Optimizing algorithms involves refining algorithms to improve efficiency. These strategies collectively aid in identifying and resolving performance issues in software applications.

In SQL, the ___________ keyword is used to specify the conditions that must be met for the records to be selected.

  • FROM
  • INSERT
  • SELECT
  • WHERE
The WHERE keyword is used in SQL to filter records based on specified conditions. When a SELECT statement is executed, the WHERE clause is used to determine which rows from the table(s) involved should be included in the result set. This clause allows you to specify conditions using logical operators such as AND, OR, and NOT, along with comparison operators like =, <>, >, <, >=, <=, IN, BETWEEN, LIKE, etc. Understanding how to use the WHERE clause effectively is crucial for retrieving the desired data from a database.

Deadlocks occur when processes are unable to proceed because each is waiting for a resource held by the other, leading to a ___________.

  • Critical section
  • Deadlock
  • Live lock
  • Race condition
Deadlocks happen when two or more processes are unable to proceed because each is waiting for a resource held by the other, resulting in a stalemate.