Operation System Flashcards

1
Q

threads

A

I don’t know much about that

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

processes

A

something interesting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

concurrency

A

I don’t know what’s that about

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

synchronization

A

The locks and some other fancy manipulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is external sorting algorithms

A

External sorting is a class of sorting algorithms that can handle massive amounts of data. External sorting is required when the data being sorted do not fit into the main memory of a computing device (usually RAM) and instead they must reside in the slower external memory, usually a hard disk drive. Thus, external sorting algorithms are external memory algorithms and thus applicable in the external memory model of computation.

External sorting algorithms generally fall into two types, distribution sorting, which resembles quicksort, and external merge sort, which resembles merge sort. The latter typically uses a hybrid sort-merge strategy. In the sorting phase, chunks of data small enough to fit in main memory are read, sorted, and written out to a temporary file. In the merge phase, the sorted subfiles are combined into a single larger file.What if elements of nums2 are stored on disk, and the memory is
limited such that you cannot load all elements into the memory at
once?

If only nums2 cannot fit in memory, put all elements of nums1 into a HashMap, read chunks of array that fit into the memory, and record the intersections.

If both nums1 and nums2 are so huge that neither fit into the memory, sort them individually (external sort), then read 2 elements from each array at a time in memory, record intersections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly