b. Parallelism does not require two tasks to exist. It literally physically run parts
of tasks OR multiple tasks, at the same time using multi-core infrastructure
of CPU, by assigning one core to each task or sub-task. Parallelism requires
hardware with multiple processing units, essentially. In single core CPU, you
may get concurrency but NOT parallelism.
6. Dierence between Thread and Process
a. A process has all the resources needed to execute a program - memory space,
registers, stack space, security etc
b. A thread is a line of execution and exists within a process
7. Mutexes and semaphores? what is the main dierence between them? what is the
dierence between binary semaphore and mutex? how does locking happen i ln
mutex?
a. Mutex is for exclusive access to a resource. A Binary semaphore should be
used for Synchronization (i.e. "Hey Someone! This occurred!").
b. Semaphores signal between tasks
i. B gives semaphore and A takes it, a task doesn't give and take it by
itself
c. https://stackoverflow.com/questions/62814/dicult
ference-between-binary-semaphore-and-mutex
8. What is thrashing? what is excessive paging? The main areas as seen on the believe
as it is not
a. Have virtual memory that is > RAM size
b. So OS constantly is àswapping contents in and out of virtual memory
c. Thrashing is when this uses most of the processing power
9. What is dynamic loading? what is static loading? when to use dynamic loading? what
are the advantages? give an example when to use dynamic loading?
a. Dynamic loading is when code is loaded into memory dynamically
b. Static is when it’s all resolved at compile time
10. Dierence between regular OS and real-time OS
a. RTOS used for time critical systems
b. Task scheduling in RTOS is priority based, in regular OS is high throughput
c. Kernels in RTOS are preemptable
i. If high priority request comes in, they can preempt OS requests
11. OS concepts-what is mutual exclusion?
a. When two processes try to enter a critical region one will be blocked
12. Priorities of OS programs?
a. EL0 - general application
b. EL1 - OS
c. EL2 - hypervisor
d. EL3 - security stu
13. Describe critical section
14. https://leetcode.com/discuss/interview-question/124638/what-happens-in-the-ba
ckground-from-the-time-you-press-the-Power-button-until-the-Linux-login-p
rompt-appears/
C/C++ Concepts
1. What is static in C?
Static variable is one which maintains its value throughout the function invocations .
a. A static variable inside a function keeps its value between invocations.
b. A static global variable or a function is "seen" only in the file it's declared in.