blob: 1e26e2861c4a1d06ac05dd992e44554244afd77b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Solution by Ruben Westerberg
ch-1.pl and ch-1.raku
===================
Run program with a single commandline argument with the number to test. Prints out a multiple of the number only containing 1s and 0s. 55 is used as the default if not value is provided
ch-2.pl and ch-2.raku
===================
Demonstration of LRU cache.
A 'slow large' backing store is simulated with a delay in accessing the elements of the store.The cache loads values from the store when a cache 'miss' occours in reading. In writing, the cache only writes to the backing store when the cached element is to be deleted from the LRU list.
The demonstration program randomly uses read and write calls to the cache. There are more acces operations than the original size of the backing store. It will grow and show undefined elements as 'N/A'
|