Operating System, Question Bank Answers #1 well solved
What is an OS? What are the important functions performed by an Operating System Operating System is interface between user and hardware. Its important functions are memory management, processor management device management, file management security, control over system performance, job accounting, error detecting, coordination between user and hardware OS functions Memory management- keep track of memory addresses, allocate and deallocate memory address for process or file from disk when needed Processor management - keep track of processor or processors and allocating and deallocating processes to it when it is needed, set fixed time to process and program called for this job is traffic controller Device management - keep track of all devices connected to kernel, and a program called for this job is I/O contoller. Security - by means of password and other techniques prevent unauthorized access to the programs and data Control over system Performance - recording delays between request for a service and respond from the system Job accounting - keeping time and resources used by various jobs and users Error detecting - production of dumps, traces, error messages, and other debugging and error detecting aids Coordination between user and hardware - coordination and assignment of compiler, interpreters, assemblers and other software to the various users of computer system List the types of operating Systems 1. Batch operating system; 2. Time sharing; 3. Distributed; 4. Network; 5. Real time Explain OS types Batch operating system - programs are written into punch cards and put into system and system executes them sequentially. Time-sharing - CPU switches between processes frequently, so that multiple users at various terminals can use computer at the same time. This is done by multitasking and multiprogramming. Distributed - Data processing shared among computers and processors accordingly. And it enables the system. Network - runs on a server and manages data, users, security that are connected to it. OS services 1. Program execution; 2. I/O operations; 3. File System Manipulation; 4. Communication; 5. Error detection; 6. Resource allocation; 7. Protection OS properties Batch processing - jobs submitted to kernel and done sequentially; multi-tasking - Multiple users use the system simultaneously; multi-programming - multiple programs in memory; real time system - dedicated, embedded system and it must guarantee response to the request in fixed period of time; distributed environment - multiple independent CPUs or processors in computer system where computation logics are distributed among them; spooling - simultaneous peripheral operations on line. Process Process is a program in execution Process Life Cycle Start → Ready → Running → Waiting → Terminated Process Control Block Process Control Block - keeps all information needed to keep track of process; It keeps process ID, Parent process ID, privilige level of process, state of process, priority, user name, name of executable First version of Unix was created in ... in 1969 Bell Labs Full form of Unix Unics (uniplexed information and computing service) ... developed the self -contained Linux kernel from scratch with the major design goal of UNIX Compatibility. Linus Torvalds List important features of Linux Operating System portable, open source, multi-user, multiprogramming, hierarchical file system, shell, security, Linux advantages over commercial competitors Linux is free, fully customizable in all its components, runs on low-end, cheap hardware platform, powerful, high standard for source code quality, kernel can be very small and compact, highly compatible with many common operating systems, well supported 3-letter numbering scheme used in Linux. the most significant number defines the version number, if the middle number after first period is even it is deferred as stable version, if it is odd then called as development kernel. The last numbers after second period defines a release number and if it is odd development and if it is even stable release number. Linux System Architecture hardware layer - where all peripheral devices are connected; kernel layer - core component of OS, interacts directly with hardware and provides low level service to high level layer; shell layer - interface to kernel, hiding kernel's functions from users; utilities - utility programs that provide the user with most of the functionalities of OS kernel kernel is core component of OS, responsible for all major activities of OS, consists of various modules and directly interact with hardware Linux file system Linux file system is upside down tree structure, root directory denoted by / , files are deferred as leafs and directories as nodes, every directory has root, except parent directory. Shell Shell program that provides text-only interface for linux and other unix-like OS. It is interface between user and system and it also hides details of kernel operations at least 4 types of shell on unix bourne shell, korn shell, c shell, bash shell, tee c shell Fill form BASH Bourne Again Shell 3 types of supported users in Linux owner - owner of file or app, group - groups that own file or app, others - all other users who are not owner and not in group bu has acess to system. chmod command used to change access rights bootstrapping This is the procedure to bring at least a portion of software into main memory and having the processor execute it. All steps in System Startup 1. After reset asserted, CS and IP registers are set with fixed value 0xfffffff0 that maps the address of BIOS program in ROM. 2. Processor executes from that address. 3. BIOS starts its execution and executes 4 tasks 4. BIOS runs Power-On-Self-Test, which checks whether all hardware devices connected to system is working properly 5. BIOS initialize all hardware devices 6. BIOS searches for operating system to boot 7. If found valid device, copies contents of first sector from hard disk (master boot record) into RAM, starting from physical address 0x00007c00, jumps to that address and executes. 8. In that address OS boot loader is executed. Boot loader loads in 2 stage as program is to big to fit into mbr in hard disk. It is loaded starting from 0x00007c00, moves itself to 0x00096a00, sets real mode stack (from 0x to 0xff) loads second part of boot loader starting from 0x00096c00. Program reads map of available operating systems from disk and prompts user to choose OS. Then either boot loader copies first boot sector of corresponding OS to RAM, or directly copy kernel image into RAM. 9. Assume that kernel image must be booted. Boot loader invoke BIOS procedure to display "Loading" message. 10. Boot loader put initial portion of kernal image 512 bytes starting from 0x 11. Then puts setup() function starting from 0x and setup() executes 12. setup() function switches cpu from real mode to protected mode and set up provisional layots for ram physical structure. 13. jumps to first startup_32() function which decompresses kernel image, invokes second startup_32() function 14. second startup_32() (process 0 or swapper)function initialize gdt, idt tables and values of gdtr and idtr, initialize segment registers with their final values, fills bss segment of the kernel with zeros. set up provisionals page tables, put global page directory address into cr3 register and enables paging by setting PG in the cr0 register, invokes start_kernel() (process 1 - init) which completes initialization of Linux 15. at the end login prompt appears.
Written for
- Institution
- Operating System
- Course
- Operating System
Document information
- Uploaded on
- October 22, 2022
- Number of pages
- 15
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
- processor manag
-
what is an os what are the important functions performed by an operating system operating system is interface between user and hardware its important functions are memory management
Also available in package deal