Multiprocessing 1

I have been using python multiprocessing for quite a bit time, but it was all simple pool and I would like to understand deeper than just blindly using the multiprocessing package.

  1. given a list of word and start two process to print out the list in sequence

The same functionality can also be achieved using pipe

Need to know about C++

Virtual Method Table:

12.5 — The virtual table

How Vtables Work

Pure Virtual Function:

Virtual inheritance:

very complex virtual inheritance diagram: (needs to read more)

different types of casts

Private vs. Protected vs. Public:

member decorator

inheritance decorator


Python Must Know

Override vs Overload?

Overloading occurs when two or more methods in one class have the same method name but different parameters.

Overriding means having two methods with the same method name and parameters (i.e., method signature). One of the methods is in the parent class and the other is in the child class.

Compiled language vs interpreted language?

A compiled language is one where the program, once compiled, is expressed in the instructions of the target machine. For example, an addition “+” operation in your source code could be translated directly to the “ADD” instruction in machine code.

An interpreted language is one where the instructions are not directly executed by the target machine, but instead read and executed by some other program (which normally is written in the language of the native machine). For example, the same “+” operation would be recognized by the interpreter at run time, which would then call its own “add(a,b)” function with the appropriate arguments, which would then execute the machine code “ADD” instruction.

What is virtual memory?

Virtual memory is a feature of an operating system (OS) that allows a computer to compensate for shortages of physical memory by temporarily transferring pages of data from random access memory (RAM) to disk storage.

Methods vs Functions in Python?

A method commonly refers to a function that’s a property of a class (either a static or instance method).

A function is the more general term for a procedure that takes arguments and returns a value after being called.

What is a decorator?

Decorators dynamically alter the functionality of a function, method or class without having to directly use subclasses. In a easier understandable word, it is just a wraper.

is essentially

What is Generator?

Generate each member of a list one by one. The first next() or send() will execute till the first yield keyword (included), the next cycle run from the next line to the next yield keyword(included) and so on.

But one point to be noticed that

should be understood as two sentence, but with only one yield

Thus the first next() or send() command will stop after

but not

With keyword?

With is essentially a shorter way of writing “try finally” combo.

Three decorators: classmethod, property, staticmethod

Python Garbage Collection: