TimeLinux1

Sunday, April 17, 2011

Linux: OS Basics - 1

( Prior to going into Linux Specifics, let us review some basics in OS )

Operating System (OS) Basics:
-OS is a layer of software that manages computer hardware, hides complexity from users and runs programs for them.
-users interact with the OS via a shell (command line) or desktop (graphical interface).
-the part of the OS that interacts with the user-interface and hardware is called 'kernel'.
-kernel is the essence of an OS--therefore sometimes is used interchangeably with in jargon.
-OS has two modes -- kernel mode and user mode that run simultaneously.
-kernel mode runs the kernel part of the OS.
-user   mode runs the rest of the OS (ie all except the kernel, like the shell, gui, applications etc).
-in multi-user systems, the number of programs running in user mode are many.
-but behind those multiple programs there is only one kernel.
-the kernel creates an illusion of multi-tasking by rapidly switching between multiple user programs and serving them.
-this means for a very small amount of time, there is only one program accessing the hardware via the kernel.

-useful terms:
-multi-plexing        - sharing resource between multiple programs
-multi-programming    - running multiple programs simultaneously
-multi-tasking        - multi-programming
-multi-user        - serving multiple users simultaneously
-multi-processing    - running multiple processes simultaneously for the programs
-multi-threading    - running multiple threads within each process
-multi-core        - microprocessors with multiple independent cores built within.

-system call - a request made by the user program (in user mode) to receive services from the kernel (in kernel mode)
-system calls create a trap or interrupt request and there by gain attention of the kernel and processor.

-types of memory:
-registers    - fastest, costliest, smallest. live in the cpu. as fast as cpu (1 nanosec response)
-cache        - part of cpu but controlled by main mem. L1 and L2 cache. (2 nanosec response)
-main memory    - physical ram. Large and cheaper (10 nanosec response)
-disk/virtual    - large, cheap, slow (10 millisec response)
-tapes        - largest, cheapest, slowest (100 sec response)

-virtual memory - part of the disk that serves to store temporary mem blocks and thereby extends main memory.
-mmu - memory mgmt unit is a part of the cpu that maps physical mem addresses to virtual memory disk location.
-this enables a system to run more programs than can be fit in the main physical memory.
-bus - bus is the high speed communication channel on which various components of the computer talk.
-the cpu, memory, disk, peripheral are all connected to the bus.

... continued ...

No comments:

Post a Comment