I thought, I blogged …

4 September , 2010

OS: memory management: Restaurant Example

Filed under: Blog, Learning — Ranganathan @ 12:04

Was having dinner at Hotel Krishna (Marathahalli) tonight.
Got this thought while observing the customer inflow & table allottment:

Memory management in Operating Systems can be compared with allocating tables at a restaurant.

There are total ‘n’ tables, with 4 seats per table. So, total capacity: 4*n.
[table = memory block size]
People come in different group-sizes. Generally, two groups cant be put on same table.

If group-size is small (one or two ppl), then some space is underutilized at that table.
After sometime, when many tables have 1,2 or 3 eaters, there is lots of free-space _yet_ new customers cannot be seated.
[ = fragmentation ]

If there is a long queue waiting, we can ‘humbly request’ the existing eaters , to “swalpa adjust maadi” and move to other tables with space. This is not simple / easy. Need to move customers & their plates-tumblers correctly to new places. Not to spill food / mixup plates, etc challenges exist.
[ = compaction & its challenges.]

After this stage, delve into technical depths. This intro could keep the concept etched in the students’ minds.

Cheers,
Ranga

(By Email to WordPress.)

Advertisements

1 Comment »

  1. Lovely…

    Comment by Robin — 23 October , 2010 @ 20:13


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: