11. Difference Between Single-Threaded and Multi-Threaded ProcessesWhat is the difference between single-threaded and multi-threaded processes in Linux? Discuss the advantages of using multiple threa…
10. Library Call Tracking with `ltrace`How does `ltrace` differ from `strace`, and what are its limitations? Why might you need to filter the output of `ltrace`?
9. Tracing System Calls with `strace`What is the purpose of the `strace` command? Provide an example of how to use `strace` to troubleshoot a program that fails due to a missing file.
17. Setting Environment Variables with `setenv()`Explain how the `setenv()` function in C works, including its parameters and return values. Provide a code example to illustrate its usage.
8. Dependency of `lsof` on Kernel InformationWhy is `lsof` highly dependent on kernel information, and what issues might arise after a distribution update?
7. Using `lsof` EffectivelyWhat are two basic approaches to using the `lsof` command? Provide examples of how you would use `lsof` to list open files in a specific directory and for a particular proc…
18. Understanding Process Scheduling AlgorithmsWhat are the key differences between preemptive and non-preemptive scheduling algorithms in process management? Provide examples of scenarios where each…
19. Role of the Memory ManagerWhat are the primary responsibilities of the memory manager in an operating system? How does it handle virtual memory and interprocess communication?
20. Functionality of the Virtual File SystemWhat is a virtual file system (VFS) and how does it facilitate interaction between different file systems? Explain its role in handling data from network s…
3. Using `ps` and `top` CommandsHow does the `top` program improve upon the `ps` command for monitoring processes? What are some key features of `top`?
4. What is the difference between static and dynamic IP assignment in DHCP?Explain DHCP's flexibility with dynamic assignments versus manually configured static IPs.
8. What is the difference between `default-lease-time` and `max-lease-time` in DHCP configuration?Explain how lease durations are managed in DHCP configurations.
12. Can you explain the purpose of the `option routers` and `option domain-name-servers` in DHCP?Explain the configuration options that provide clients with gateway and DNS settings.
16. How would you troubleshoot if clients are not receiving IP addresses from a DHCP server?Troubleshoot in Lab, it assesses problem-solving skills related to DHCP server issues.
17. What steps would you take if a client’s DHCP request is not being acknowledged by the server?Give steps to follow when there’s no response to DHCP requests.
18. How would you check the logs to diagnose DHCP server problems on a Linux system?Explain log files (e.g., `/var/log/syslog`) and how to use them for troubleshooting DHCP issues.
19. How would you troubleshoot a situation where a client repeatedly receives the same IP address even after the lease has expired?Explain lease management and potential client-server communication i…
20. How do you troubleshoot a situation where clients are being assigned IP addresses outside the expected range?Watch for configuration errors and potential misconfigurations of address pools.
1. What are POSIX Threads (Pthreads) and why are they used in Linux?a. Give explanation in detail about your understanding of POSIX threads and their use cases.
10. What is a race condition, and how can it be avoided when using Pthreads?a. Give explanation about your understanding of race conditions and methods to avoid them (like proper synchronization).
1. What is a semaphore and how is it used in concurrent programming?a. Give your understanding of semaphores as a synchronization primitive and their role in managing shared resources among concurren…
2. Explain the difference between a binary semaphore and a counting semaphore, and provide a use case for each.a. Give your understanding of the types of semaphores and how they are applied in differ…
3. Describe the P (Wait) and V (Signal) operations in semaphores and explain their purpose.a. Give your understanding of the fundamental semaphore operations and how they control access to shared res…
4. What are System V semaphores, and which API functions are used to manage them in Linux?a. Give your understanding, familiarity with System V semaphores and their associated system calls like `semg…
5. Can you give an example of a common use case for semaphores in resource allocation or process synchronization?a. Give your understanding of applying semaphores in practical scenarios such as manag…
6. What are System V semaphores and how do they differ from POSIX semaphores?a. Give your understanding of the key differences between the two types of semaphores, particularly in terms of complexity…
7. Explain how semaphore sets are used in System V semaphores and provide a use case where managing multiple semaphores as a set is beneficial.a. Give your understanding of semaphore sets and their p…
8. What is the purpose of the `semget()` function in System V semaphores, and what are the key parameters it takes?a. Give your understanding of the `semget()` function and its role in creating and a…
9. Describe the role of the `semop()` function in semaphore operations. What does it mean that `semop()` can perform operations atomically?a. Give your understanding on the `semop()` function and its…
10. What is the `semctl()` function used for in System V semaphores? Explain how it can be used to retrieve the value of a semaphore.a. Explain your understanding about your familiarity with the `sem…
11. How do System V semaphores handle inter-process synchronization, and why are they considered ideal for processes that need to coordinate access to shared resources?a. Give your understanding of h…
12. Can you walk through the steps involved in creating, initializing, and removing a semaphore set in System V? Provide an example where these steps would be necessary.a. Give your understanding of …
13. What are some advantages and disadvantages of using System V semaphores compared to other synchronization mechanisms?a. Give your understanding about the trade-offs involved in using System V sem…
14. What is the purpose of the `semget()` function in the context of System V semaphores, and when would you use it?a. Give your understanding of the basic purpose of `semget()` and when it is used i…
15. Explain the role of the `key_t key` parameter in the `semget()` function and how the `ftok()` function is used to generate this key.a. Give your understanding about knowledge of how unique keys a…
16. What is the significance of the `semflg` parameter in the `semget()` function, and what are the common flags used with it?a. Give your understanding of how control and permission flags are used t…
17. Describe a scenario where you would use multiple semaphores in a set, and how would you specify the number of semaphores using the `nsems` parameter in `semget()`?a. Give your understanding to ap…
18. What is the purpose of the `semop()` function in System V semaphores, and how does it help in synchronizing processes?a. Give your understanding of how `semop()` enables synchronization by perfor…
19. Explain the role of the `struct sembuf` structure in the `semop()` function. What are its key components, and how are they used in semaphore operations?a. Give your understanding of the `sembuf` …
20. How does the `SEM_UNDO` flag in the `sem_flg` field of `sembuf` help prevent resource leaks and deadlocks in semaphore operations?a. Give your understanding of how the `SEM_UNDO` flag ensures tha…
2. Role of the Kernel in Resource AllocationDescribe the role of the kernel in allocating resources to processes. Why is fair resource allocation important?
19. Complex Script: Process Logs and Summarize ErrorsWrite a complex Bash script that processes multiple log files in a directory. The script should:→ Iterate through each log file.→ Read each line.→…
18. Break and Continue in Nested LoopsWrite a script with nested `for` loops that skips printing the current iteration when the inner loop counter is equal to 3 and breaks out of the outer loop when …
17. Nested While Loop: Process MatrixCreate a Bash script using nested `while` loops to iterate through a 2D array (matrix) and print each element along with its row and column indices.
14. Processing Multiple FilesWrite a Bash script that iterates through all `.txt` files in a directory, reads each file line by line, and prints the content.
12. Using Break in LoopsWrite a script that uses a `for` loop to iterate through numbers from 1 to 10 but exits the loop when the number is equal to 5.
10. User Input with Select LoopWrite a Bash script using the `select` loop to create a simple menu with options "Start", "Stop", "Restart", and "Quit". Perform…
6. Until Loop: Increment Until ConditionWrite a script using an `until` loop that increments a variable from 1 until it reaches 10 and prints each value.
5. While Loop: Countdown TimerWrite a Bash script using a `while` loop to create a countdown timer from 10 to 0, printing each number with a 1-second delay.
2. Iterate Over List of StringsCreate a Bash script that uses a `for` loop to iterate over a list of fruits ("apple", "banana", "cherry") and print each fruit.
22. Complex Condition HandlingWrite a complex script that simulates a basic login system. The script should:→ Take a username and password as input.→ Use arrays to store valid usernames and their cor…