Posts

Showing posts from 2010

Multi processors notes

symmetric multiprocessors In which each processor runs an identical copy of the operating system - all processors are peers - no master slave relation exists between processors asymmetric multiprocessors ( master slave model) - In which each processor is assigned a specific task - this scheme defines a master slave relationship Real time Systems ===== ======== - It is special purpose operating system - It is used when rigid time requirements have been placed on the operation of a processor or the flow of data - real time system has well defined, fixed time constraints, processing must be done within the defined constraints else the system fails they can be classified as Soft and Hard ----------------------------------------- HARD ===== Guarantees that critical tasks be completed on time delay in system must be bounded secondary storage of any kind is minimal(limited) or missing most advanced feature of OS will not be supported(ex: virtual memory) None of the existing General purpose ...

Kernel space ??????????????

following is some convincing answer i got from text regarding kernel and users space Kernel space ============ "On modern systems with protected memory management units, the kernel typically resides in an elevated system state compared to normal user applications. This includes a protected memory space and full access to the hardware. This system state and memory space is collectively referred to as kernel-space". Conversely, user applications execute in user-space. They see a subset of the machine’s available resources and are unable to perform certain system functions, directly access hardware, or otherwise misbehave (without consequences, such as their death, anyhow). When executing the kernel, the system is in kernel-space executing in kernel mode, as opposed to normal user execution in user-space executing in user mode. Applications running on the system communicate with the kernel via system calls

Linux useful links

Linux git source tree --------------------- http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=tree;hb=HEAD It is very nice and we can browse the source code online. gone are the days we need to download and browse with Cscope :-) Linux Image down load ------------------------ Linux kernel archives (we can down load the stable Linux source code) http://www.kernel.org/

To get hardware details (Linux commands)

To know about the hardware our system has lspci lspci -v (more details) lspci -vv (whatever system know about ) 2) USB ---------- lsusb lsusb -v (more details) 3) to know disk connected ---------------------- fdisk fdisk -l hardware check at run time --------------------------- kudzu - runs at boot time, to detect and configure new h/w ddcprobe - if above fails, user must be root(only available on x86 or x86_64) BIOS data gadhering ---------------------- most BIOSes are SMBIOS (system management BIOS) or DMI (desktop management interface) - biosdecode - dmidecode (o/p these are not 100% accurate) - ownership - vpddecode Listing and configuring Kernel modules -------------------------------------------- - modinfo - modprobe (used for loading module manually) HAL(hardware abstraction layer) --------------------------------- HAL daemon run when the system is running to detect new hardware The HAL daemon collects information about the device from the kernel as well as other resource...

Linux questions ....!!!!

1) why Linux scheduler is called O(1) 2) how non contiguous memory is allocated by Linux 3) how to write/add system calls to Linux 4) explain difference b/w fork() and clone() 5) explain DMA

cases of context switch

system calls and library functions differs in terms of invoking. in Unix based operating system, system calls generate the exception(trap), and invoking system calls will lead to context switch, in case the current process running is not most eligible process to run. where as in case of library function no context switch will be made so executing library function is faster than the system calls. what are all the reasons for context switch of the process following are the cases when context switch can occur 1. if process wants go for sleep 2. process do exit 3. while returning from the system call and it is not most eligible process to run 4. when it returns from the interrupt and it is not most eligible process to continue