Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 3

Ch-1//Os-A program that acts as an intermediary between a user of a computer and the computer hardware.

/bootstrap program is loaded at power-up or reboot -Typically stored in ROM or EPROM, generally known as firmware/Initializates all aspects of
system/Loads operating system kernel and starts execution //inturupt-Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines./ Interrupt architecture must
save the address of the interrupted instruction./ Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt./ A trap is a software-generated interrupt caused either by an error or a user request./ An operating
system is interrupt driven.//inturrupt handlaing- The operating system preserves the state of the CPU by storing registers and the program counter./ Determines which type of interrupt has occurred:1.polling2.vectored interrupt system/Separate segments
of code determine what action should be taken for each type of interrupt.//multiprogramming-want to run to many program together. Multiprogramming needed for efficiency. Single user cannot keep CPU and I/O devices busy at all
times.Multiprogramming organizes jobs (code and data) so CPU always has one to execute.A subset of total jobs in system is kept in memory./multitasjing-is logical extensionin which cpu switch jobs so frequently that users can interact with each job while
it is running, creating interactive computing. Response time should be < 1 second.//os operations-Interrupt driven by hardware.Software error or request creates exception or trap.Division by zero, request for operating system service.Other process
problems include infinite loop, processes modifying each other or the operating system.Dual-mode operation allows OS to protect itself and other system components/User mode and kernel mode /Mode bit provided by hardware,Provides ability to
distinguish when system is running user code or kernel code.Some instructions designated as privileged, only executable in kernel mode.System call changes mode to kernel, return from call resets it to user.//register,cach,mainmemory,disk backup
cach,mainmemory,disk,cd or tape compile compiler,hardware,os,os// cp

Ch-2// Moves as much from the kernel into “user” space/Communication takes place between user modules using message passing/Benefits:Easier to extend a microkernel.Easier to port the operating system to new architectures.More reliable (less code
is running in kernel mode).More secure/Detriments:Performance overhead of user space to kernel space communication.//vm- A virtual machine takes the layered approach to its logical conclusion.It treats hardware and the operating system kernel as
though they were all hardware/A virtual machine provides an interface identical to the underlying bare hardware./The operating system creates the illusion of multiple processes, each executing on its own processor with its own (virtual) memory. // The
resources of the physical computer are shared to create the virtual machines/CPU scheduling can create the appearance that users have their own processor/Spooling and a file system can provide virtual card readers and virtual line printers/A normal user
time-sharing terminal serves as the virtual machine operator’s console// The virtual-machine concept provides complete protection of system resources since each virtual machine is isolated from all other virtual machines. This isolation, however, permits
no direct sharing of resources./A virtual-machine system is a perfect vehicle for operating-systems research and development.System development is done on the virtual machine, instead of on a physical machine and so does not disrupt normal system
operation./The virtual machine concept is difficult to implement due to the effort required to provide an exact duplicate to the underlying machine.

Ch-3// As a process executes, it changes state-new: The process is being created/running: Instructions are being executed-waiting: The process is waiting for some event to occurready: The process is waiting to be assigned to a processor.terminated:
The process has finished execution //state diagram--new to ready(admitted)/ready to running(scheduler dispatch)/running to ready(interrupt)/running to wait(i/o or event wait)/wait to ready(i/o or event compleatiom)/running to terminated(exit)
//årocess control block (pcb)- Process state,Program counter,CPU registers,CPU scheduling information,Memory-management information,Accounting information,I/O status information// Long-term scheduler (or job scheduler) – selects which processes
should be brought into the ready queue,Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU. Short-term scheduler is invoked very frequently (milliseconds) (must be fast). Long-term scheduler is
invoked very infrequently (seconds, minutes) (may be slow). The long-term scheduler controls the degree of multiprogramming.//context switch-- When CPU switches to another process, the system must save the state of the old process and load the
saved state for the new process/Context-switch time is overhead; the system does no useful work while switching/Time dependent on hardware support// Parent process create children processes, which, in turn create other processes, forming a tree of
processes/Resource sharing-1.Parent and children share all resources 2.Children share subset of parent’s resources 3.Parent and child share no resources/Execution-1.Parent and children execute concurrently 2.Parent waits until children terminate/Address
space-Child duplicate of parent.Child has a program loaded into it.

Ch-4//thread pool- Create a number of threads in a pool where they await work.Advantages:1.Usually slightly faster to service a request with an existing thread than create a new thread.2 .Allows the number of threads in the application(s) to be bound to
the size of the pool.//thread cancellation- Terminating a thread before it has finished.Two general approaches:1.Asynchronous cancellation terminates the target thread immediately2.Deferred cancellation allows the target thread to periodically check if
it should be cancelled.//multi thearding benefits- Responsiveness, Resource Sharing, Economy, Utilization of MP Architectures/user thread-the user level thread are implemented by user and the kernel is not awar of the existance of these threads.it
handles them as they were single threaded processes.advantge-userlevel thread are easier and faster than kernel level thread.user level thread can run on any os .there are no kernel mode pricileges required for thread switchin in user level./disadvantage-
multithreadug application in user level thread cannot use multiprocessing to their advantage.theentire process is blocked if one user-level thread performs blocking operation.//krnel level thread-kernel level threas are handled by the operating system
directly and the thread management is done by the kernel./advantage-multiple thread of the same process can be scheduled on different processors in kernel level thread.if a kernel level thread is blocked another thread of the same process can be
scheduled by the kernel./disadvantage-a model switch to kernel mode is required to transfer control from one thread to another in a process.kernel levelhtreads ar slower tocreat as well as manage compare to user level.//thread model-many to one =
many user level thread are all mapped onto a single kernel thread ./advantage-kernel simpler /disadvantage-when thread make as blocking system call,the entire process will be block.only one thread can acess he kernel at a time,so multiple thread are
unable to run in parallel on multiprocessors.//one to one- each user level thread maps to kernel thread./advantage-it support multithreads to execute in patallel on microprocessors./disadvantage-creating user thread requires the corresponding kernel
thread./limit on how many thread can be created.//many to many-allows many user level threas to be mapped to many kernel levelthreads./advantage-user can create any number of thr threads.kernel threads can run in parallel on a multiprocessor
machine.blocking the kernel system call does not block the rntire process.processes can be split across the multi processors./disadvantage-complex kernel //two level model-similer to many tomany except that is allows a user thread to be bounf to kernel
thread .

Ch-5//
Ch-7//deadlock handling-1.never enter deadlock state.2.recover.3.ignore and pretend never happened/deadlock prevention- Mutual Exclusion – not required for sharable resources; must hold for nonsharable resources./ Hold and Wait – must guarantee
that whenever a process requests a resource, it does not hold any other resources./ No Preemption –If a process that is holding some resources requests another resource that cannot be immediately allocated to it, then all resources currently being held
are released.Preempted resources are added to the list of resources for which the process is waiting./ Circular Wait – impose a total ordering of all resource types, and require that each process requests resources in an increasing order of
enumeration.//deadlock avoidance-1.declare max resource required.2.dynamically examine resource allocated sate(ras).3.Ras-available allocted and maximum demand.//gcc fork.c / (./a,out) /javac filename.java/java filename //

//Codes and ppt-

You might also like