Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from bregman-arie:master #94

Merged
merged 5 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 29 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
<td align="center"><a href="#Misc"><img src="images/general.png" width="75px;" height="75px;" alt="Misc"/><br /><b>Misc</b></a></td>
<td align="center"><a href="#elastic"><img src="images/elastic.png" width="75px;" height="75px;" alt="Elastic"/><br /><b>Elastic</b></a></td>
<td align="center"><a href="topics/kafka/README.md"><img src="images/logos/kafka.png" width="85px;" height="80px;" alt="Kafka"/><br /><b>Kafka</b></a></td>
<td align="center"><a href="topics/node/node_questions_basic.md"><img src="images/nodejs.png" width="85px;" height="80px;" alt="NodeJs"/><br /><b>NodeJs</b></a></td>
</tr>

</table>
Expand Down Expand Up @@ -740,22 +741,22 @@ It would support the following:
* Program's code is loaded into the memory or more specifically, into the address space of the process.
* Memory is allocated for program's stack (aka run-time stack). The stack also initialized by the OS with data like argv, argc and parameters to main()
* Memory is allocated for program's heap which is required for dynamically allocated data like the data structures linked lists and hash tables
* I/O initialization tasks are performed, like in Unix/Linux based systems where each process has 3 file descriptors (input, output and error)
* I/O initialization tasks are performed, like in Unix/Linux based systems, where each process has 3 file descriptors (input, output and error)
* OS is running the program, starting from main()
</b></details>

<details>
<summary>True or False? The loading of the program into the memory is done eagerly (all at once)</summary><br><b>

False. It was true in the past but today's operating systems perform lazy loading which means only the relevant pieces required for the process to run are loaded first.
False. It was true in the past but today's operating systems perform lazy loading, which means only the relevant pieces required for the process to run are loaded first.
</b></details>

<details>
<summary>What are different states of a process?</summary><br><b>

* Running - it's executing instructions
* Ready - it's ready to run but for different reasons it's on hold
* Blocked - it's waiting for some operation to complete. For example I/O disk request
* Ready - it's ready to run, but for different reasons it's on hold
* Blocked - it's waiting for some operation to complete, for example I/O disk request
</b></details>

<details>
Expand All @@ -767,19 +768,21 @@ False. It was true in the past but today's operating systems perform lazy loadin

<details>
<summary>What is Inter Process Communication (IPC)?</summary><br><b>

Inter-process communication (IPC) refers to the mechanisms provided by an operating system that allow processes to manage shared data.
</b></details>

<details>
<summary>What is "time sharing"?</summary><br><b>

Even when using a system with one physical CPU, it's possible to allow multiple users to work on it and run programs. This is possible with time sharing where computing resources are shared in a way it seems to the user the system has multiple CPUs but in fact it's simply one CPU shared by applying multiprogramming and multi-tasking.
Even when using a system with one physical CPU, it's possible to allow multiple users to work on it and run programs. This is possible with time sharing, where computing resources are shared in a way it seems to the user, the system has multiple CPUs, but in fact it's simply one CPU shared by applying multiprogramming and multi-tasking.
</b></details>

<details>
<summary>What is "space sharing"?</summary><br><b>

Somewhat the opposite of time sharing. While in time sharing a resource is used for a while by one entity and then the same resource can be used by another resource, in space sharing the space is shared by multiple entities but in a way where it's not being transferred between them.<br>
It's used by one entity until this entity decides to get rid of it. Take for example storage. In storage, a file is yours until you decide to delete it.
It's used by one entity, until this entity decides to get rid of it. Take for example storage. In storage, a file is yours, until you decide to delete it.
</b></details>

<details>
Expand All @@ -791,26 +794,28 @@ CPU scheduler
#### Operating System - Memory

<details>
<summary>What is "virtual memory" and what purpose it serves?</summary><br><b>
<summary>What is "virtual memory" and what purpose does serve?</summary><br><b>

Virtual memory combines your computer's RAM with temporary space on your hard disk. When RAM runs low, virtual memory helps to move data from RAM to a space called a paging file. Moving data to paging file can free up the RAM so your computer can complete its work. In general, the more RAM your computer has, the faster the programs run.
Virtual memory combines your computer's RAM with temporary space on your hard disk. When RAM runs low, virtual memory helps to move data from RAM to a space called a paging file. Moving data to paging file can free up the RAM, so your computer can complete its work. In general, the more RAM your computer has, the faster the programs run.
https://www.minitool.com/lib/virtual-memory.html
</b></details>

<details>
<summary>What is demand paging?</summary><br><b>

Demand paging is a memory management technique where pages are loaded into physical memory only when accessed by a process. It optimizes memory usage by loading pages on demand, reducing startup latency and space overhead. However, it introduces some latency when accessing pages for the first time. Overall, it’s a cost-effective approach for managing memory resources in operating systems.
</b></details>

<details>
<summary>What is copy-on-write?</summary><br><b>
Copy-on-write (COW) is a resource management concept, with the goal to reduce unnecessary copying of information. It is a concept which is implemented for instance within the POSIX fork syscall, which creates a duplicate process of the calling process.
Copy-on-write (COW) is a resource management concept, with the goal to reduce unnecessary copying of information. It is a concept, which is implemented for instance within the POSIX fork syscall, which creates a duplicate process of the calling process.

The idea:
1. If resources are shared between 2 or more entities (for example shared memory segments between 2 processes) the resources don't need to be copied for every entity, but rather every entity has a READ operation access permission on the shared resource. (the shared segments are marked as read-only)
(Think of every entity having a pointer to the location of the shared resource which can be dereferenced to read its value)
2. If one entity would perform a WRITE operation on a shared resource a problem would arise since the resource also would be permanently changed for ALL other entities sharing it.
1. If resources are shared between 2 or more entities (for example shared memory segments between 2 processes), the resources don't need to be copied for every entity, but rather every entity has a READ operation access permission on the shared resource. (the shared segments are marked as read-only)
(Think of every entity having a pointer to the location of the shared resource, which can be dereferenced to read its value)
2. If one entity would perform a WRITE operation on a shared resource, a problem would arise, since the resource also would be permanently changed for ALL other entities sharing it.
(Think of a process modifying some variables on the stack, or allocatingy some data dynamically on the heap, these changes to the shared resource would also apply for ALL other processes, this is definitely an undesirable behaviour)
3. As a solution only if a WRITE operation is about to be performed on a shared resource, this resource gets COPIED first and then the changes are applied.
3. As a solution only, if a WRITE operation is about to be performed on a shared resource, this resource gets COPIED first and then the changes are applied.
</b></details>

<details>
Expand All @@ -824,32 +829,36 @@ The kernel is part of the operating system and is responsible for tasks like:
</b></details>

<details>
<summary>True or False? Some pieces of the code in the kernel are loaded into protected areas of the memory so applications can't overwritten them</summary><br><b>
<summary>True or False? Some pieces of the code in the kernel are loaded into protected areas of the memory so applications can't overwrite them.</summary><br><b>

True
</b></details>

<details>
<summary>What is POSIX?</summary><br><b>

POSIX (Portable Operating System Interface) is a set of standards that define the interface between a Unix-like operating system and application programs.
</b></details>

<details>
<summary>Explain what is Semaphore and what its role in operating systems</summary><br><b>
<summary>Explain what is Semaphore and what its role in operating systems.</summary><br><b>

A semaphore is a synchronization primitive used in operating systems and concurrent programming to control access to shared resources. It's a variable or abstract data type that acts as a counter or a signaling mechanism for managing access to resources by multiple processes or threads.
</b></details>

<details>
<summary>What is cache? What is buffer?</summary><br><b>

Buffer: Reserved place in RAM which is used to hold data for temporary purposes
Cache: Cache is usually used when processes reading and writing to the disk to make the process faster by making similar data used by different programs easily accessible.
Cache: Cache is usually used when processes are reading and writing to the disk to make the process faster, by making similar data used by different programs easily accessible.
Buffer: Reserved place in RAM, which is used to hold data for temporary purposes.
</b></details>

## Virtualization

<details>
<summary>What is Virtualization?</summary><br><b>

Virtualization uses software to create an abstraction layer over computer hardware that allows the hardware elements of a single computerprocessors, memory, storage and more - to be divided into multiple virtual computers, commonly called virtual machines (VMs).
Virtualization uses software to create an abstraction layer over computer hardware, that allows the hardware elements of a single computer - processors, memory, storage and more - to be divided into multiple virtual computers, commonly called virtual machines (VMs).
</b></details>

<details>
Expand Down Expand Up @@ -891,7 +900,7 @@ Yes, it's a operating-system-level virtualization, where the kernel is shared an
<details>
<summary>How the introduction of virtual machines changed the industry and the way applications were deployed?</summary><br><b>

The introduction of virtual machines allowed companies to deploy multiple business applications on the same hardware while each application is separated from each other in secured way, where each is running on its own separate operating system.
The introduction of virtual machines allowed companies to deploy multiple business applications on the same hardware, while each application is separated from each other in secured way, where each is running on its own separate operating system.
</b></details>

#### Virtual Machines
Expand Down Expand Up @@ -3901,6 +3910,7 @@ A programming model for large-scale data processing

<details>
<summary>Explain what is Ceph</summary><br><b>
Ceph is an Open-Source Distributed Storage System designed to provide excellent performance, reliability, and scalability. It's often used in cloud computing environments and Data Centers.
</b></details>

<details>
Expand Down
4 changes: 2 additions & 2 deletions certificates/aws-cloud-practitioner.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ Read more about instance types [here](https://docs.aws.amazon.com/AWSEC2/latest/
<details>
<summary>True or False? The following are instance types available for a user in AWS:

* Compute optimizied
* Network optimizied
* Compute optimized
* Network optimized
* Web optimized</summary><br><b>

False. From the above list only compute optimized is available.
Expand Down
4 changes: 2 additions & 2 deletions certificates/aws-solutions-architect-associate.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ Read more about instance types [here](https://docs.aws.amazon.com/AWSEC2/latest/
<details>
<summary>True or False? The following are instance types available for a user in AWS:

* Compute optimizied
* Network optimizied
* Compute optimized
* Network optimized
* Web optimized</summary><br><b>

False. From the above list only compute optimized is available.
Expand Down
Binary file added images/nodejs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion topics/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ Launch configuration is a legacy form of Launch Template that must be recreated
In addition, launch template has the clear benefits of:
* Provision both On-Demand and Spot instances
* supporting multiple versions
* support creating parameters subsets (used for re-use and inheritance)
* support creating parameters subsets (used for reuse and inheritance)
</b></details>

#### ENI
Expand Down
1 change: 1 addition & 0 deletions topics/devops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ Things to think about:
* Share your changes frequently
* Coordinate with your co-workers
* Don't commit generated files
* Don't commit binary files
</b></details>

<details>
Expand Down
2 changes: 1 addition & 1 deletion topics/kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2739,7 +2739,7 @@ Istio is an open source service mesh that helps organizations run distributed, m
<details>
<summary>Name two controllers you are familiar with</summary><br><b>

1. Node Contorller: manages the nodes of a cluster. Among other things, the controller is responsible for monitoring nodes' health - if the node is suddenly unreachable it will evacuate all the pods running on it and will mark the node status accordingly.
1. Node Controller: manages the nodes of a cluster. Among other things, the controller is responsible for monitoring nodes' health - if the node is suddenly unreachable it will evacuate all the pods running on it and will mark the node status accordingly.
2. Replication Controller - monitors the status of pod replicas based on what should be running. It makes sure the number of pods that should be running is actually running
</b></details>

Expand Down
2 changes: 1 addition & 1 deletion topics/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ There are 2 configuration files, which stores users information
<details>
<summary>Which file stores users passwords? Is it visible for everyone?</summary><br>

`/etc/shadow` file holds the passwords of the users in encryted format. NO, it is only visible to the `root` user
`/etc/shadow` file holds the passwords of the users in encrypted format. NO, it is only visible to the `root` user
</details>

<details>
Expand Down
20 changes: 20 additions & 0 deletions topics/node/node_questions_basic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# NODEJS BASIC INTERVIEW QUESTIONS

# OBJECTIVE

To Tell about the basic questions asked in node to me in many interviews

1. What is Nodejs ?
2. How many threads does nodejs have ?
3. How do nodejs work ?
4. Is nodejs Single Threaded Or Multi Threaded ?
5. what is node cluster ?
6. Does parent process depends on the child preocess ?
7. How many types of module do nodejs have ?
8. Why nodejs ?
9. What is npm ?
10. Difference between pacakage.json and pacakage-lock.json ?
11. What is the difference betwwen creating a server with http and a framework ?
12. What do you mean by non-blocking ?
13. What is event loop ?
14. What is event driven ?
16 changes: 16 additions & 0 deletions topics/node/solutions/node_questions_basic_ans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# ANSWERS

1. Node.js is an open-source, cross-platform JavaScript runtime environment that allows developers to build server-side and networking applications.
2. Nodejs is a single threaded langauage . It handles one operation at a time.
3. Node.js works by executing JavaScript code in a runtime environment outside of a web browser.
4. Node.js works by executing JavaScript code in a runtime environment outside of a web browser. mainly used for performance and scalabilty od the project
5. Parent process manages the child process but not depend on the clid process to run parralel
6. Three Modules mainly
1. Core Module - fs , require
2. Local modules - like function created by us and exported or imported from one file to another
3. Third Party module - like npm pacakages whcih we install to do a specific kind of work
7. NPM (Node Pacakage Manager) used for installing, managing, and sharing JavaScript packages and dependencies.
8. Difference between pacakage.json and pacakage-lock.json
1.pacakage.json - contains the metadata and the dependendies of a project
2.pacakage-lock.json - lock the version of the installed dependencies

2 changes: 1 addition & 1 deletion topics/security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The principle of least privilege refers to the practice of providing minimal per
* Subject name
* Subject Public Key info

Every certificates must be signed by a trusted authority, a certificate chain is a concatenation of mutilple certificates signed by a more trusted authority from the one delivered by the website to the root Certificate Authority (CA). The root Certificate Authority is the top most trusted authority and every browsers embark their certificate natively.
Every certificates must be signed by a trusted authority, a certificate chain is a concatenation of multiple certificates signed by a more trusted authority from the one delivered by the website to the root Certificate Authority (CA). The root Certificate Authority is the top most trusted authority and every browsers embark their certificate natively.

</b></details>

Expand Down
Loading