80 likes | 182 Views
CS30002: Operating Systems. ANIRUDDHA GUPTA 11CS10004 CLASS DATE : 13/01/2014. Booting Sequence. Booting Sequence. BIOS (Basic Input/Output System): Checks system integrity Loads and executes the boot Loader MBR (Master Boot Record): Knows whereis the OS and loads it
E N D
CS30002: Operating Systems ANIRUDDHA GUPTA 11CS10004 CLASS DATE : 13/01/2014
Booting Sequence • BIOS (Basic Input/Output System): • Checks system integrity • Loads and executes the boot Loader • MBR (Master Boot Record): • Knows whereis the OS and loads it • Occupies the first sector of the disk • Specifies the disk block numbers where second stage boot loader resides • MBR is not stored in the BIOS chip because it is a memory critical system and BIOS may not have enough memory to store the information in MBR • GRUB (Grand Unified Boot Loader): • Knows where and how many OS the machine has • Gives option to choose which OS kernel to load
Execution of Operating System • Interrupt driven • Until an interrupt comes, OS remains idle • User program invokes OS code by generating interrupts, system calls • to perform some task reserved for OS • accessing I/O devices (read/write file) • On any software interrupt, it calls the appropriate ISR depending upon the interrupt number. The ISR is chosen from interrupt vector (ISR-Interrupt Service routine). • All ISRs are stored in the kernel.
Operating System Operations • Must distinguish between • user level code and OS code • user mode and kernel mode • Mode bit provided by hardware • provides ability to distinguish when system is running user code or kernel code • system call changes mode to kernel, returns from call, resets when it is over. • Some instructions designated as privileged only executable in kernel mode.
Operating System Operations • Some instructions designated as privileged, only executable in kernel mode.
Operating System Operations • Switching between user mode and kernel mode is done by ISR • Shell and system calls provide an interface between OS and user (system calls => functions) gives us access to the modules of OS.