What Is Paging? Why Paging Is Used?: Resource Allocator and Manager
What Is Paging? Why Paging Is Used?: Resource Allocator and Manager
- Operating system controls and coordinates the use of the hardware among the various applications programs for various uses. Operating system acts as resource allocator and manager. Since there are many possibly conflicting requests for resources the operating system must decide which requests are allocated resources to operating the computer system efficiently and fairly. Also operating system is control program which controls the user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices.
airplane. Often used as a control device in a dedicated application such as controlling scientific e!periments$ medical imaging systems$ industrial control systems$ and some display systems. 3eal-(ime systems may be either hard or soft real-time. Hard real#time9 Secondary storage limited or absent$ data stored in short term memory$ or read-only memory 43O:5$ ;onflicts with time-sharing systems$ not supported by general-purpose operating systems. Soft real#time9 <imited utility in industrial control of robotics$ =seful in applications 4multimedia$ virtual reality5 requiring advanced operating-system features. >. What is the difference between Hard and Soft real#time systems? - A hard real-time system guarantees that critical tas&s complete on time. (his goal requires that all delays in the system be bounded from the retrieval of the stored data to the time that it ta&es the operating system to finish any request made of it. A soft real time system where a critical real-time tas& gets priority over other tas&s and retains that priority until it completes. As in hard real time systems &ernel delays need to be bounded ?. What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem? (hrashing is caused by under allocation of the minimum number of pages required by a process$ forcing it to continuously page fault. (he system can detect thrashing by evaluating the level of ; = utili"ation as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming. 1@. What is multi tasking, multi programming, multi threading? - $ulti programming9 :ultiprogramming is the technique of running several programs at a time using timesharing. It allows a computer to do several things at the same time. :ultiprogramming creates logical parallelism. (he concept of multiprogramming is that the operating system &eeps several 8obs in memory simultaneously. (he operating system selects a 8ob from the 8ob pool and starts e!ecuting a 8ob$ when that 8ob needs to wait for any i/o operations the ; = is switched to another 8ob. So the main idea here is that the ; = is never idle. $ulti tasking9 :ultitas&ing is the logical e!tension of multiprogramming .(he concept of multitas&ing is quite similar to multiprogramming but difference is that the switching between 8obs occurs so frequently that the users can interact with each program while it is running. (his concept is also &nown as time-sharing systems. A time-shared operating system uses ; = scheduling and multiprogramming to provide each user with a small portion of time-shared system. $ulti threading9 An application typically is implemented as a separate process with several threads of control. In some situations a single application may be required to perform several similar tas&s for e!ample a web server accepts client requests for web pages$ images$ sound$ and so forth. A busy web server may have several of clients concurrently accessing it. If the web server ran as a traditional single-threaded process$ it would be able to service only one client at a time. (he amount of time that a client might have to wait for its request to be serviced could be enormous. So it is efficient to have one process that contains multiple threads to serve the same purpose. (his approach would multithread the web-server process$ the server would create a separate thread that would listen for client requests when a
request was made rather than creating another process it would create another thread to service the request. (o get the advantages li&e responsiveness$ 3esource sharing economy and utili"ation of multiprocessor architectures multithreading concept can be used. 11. What is hard disk and what is its purpose? - Aard dis& is the secondary storage device$ which holds the data in bul&$ and it holds the data on the magnetic medium of the dis&.Aard dis&s have a hard platter that holds the magnetic medium$ the magnetic medium can be easily erased and rewritten$ and a typical des&top machine will have a hard dis& with a capacity of between 1@ and )@ gigabytes. Bata is stored onto the dis& in the form of files. 1%. What is fragmentation? Different types of fragmentation? - Cragmentation occurs in a dynamic memory allocation system when many of the free bloc&s are too small to satisfy any request. %&ternal 'ragmentation9 D!ternal Cragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much e!ternal fragmentation occurs$ the amount of usable memory is drastically reduced. (otal memory space e!ists to satisfy a request$ but it is not contiguous. (nternal 'ragmentation9 Internal fragmentation is the space wasted inside of allocated memory bloc&s because of restriction on the allowed si"es of allocated bloc&s. Allocated memory may be slightly larger than requested memoryE this si"e difference is memory internal to a partition$ but not being used 1'. What is D")$? (n which form does it store data? - B3A: is not the best$ but itFs cheap$ does the 8ob$ and is available almost everywhere you loo&. B3A: data resides in a cell made of a capacitor and a transistor. (he capacitor tends to lose data unless itFs recharged every couple of milliseconds$ and this recharging tends to slow down the performance of B3A: compared to speedier 3A: types. 1). What is Dispatcher? - Bispatcher module gives control of the ; = to the process selected by the short-term schedulerE this involves9 Switching conte!t$ Switching to user mode$ Gumping to the proper location in the user program to restart that program$ dispatch latency ,-./0.12 time it ta&es for the dispatcher to stop one process and start another running. 1+. What is CP* Scheduler? - Selects from among the processes in memory that are ready to e!ecute$ and allocates the ; = to one of them. ; = scheduling decisions may ta&e place when a process9 1.Switches from running to waiting state. %.Switches from running to ready state. '.Switches from waiting to ready. ).(erminates. Scheduling under 1 and ) is non-preemptive. All other scheduling is preemptive. 16. What is Conte&t Switch? - Switching the ; = to another process requires saving the state of the old process and loading the saved state for the new process. (his tas& is &nown as a conte!t switch. ;onte!t-switch time is pure overhead$ because the system does no useful wor& while switching. Its speed varies from machine to machine$ depending on the memory speed$ the number of registers which must be copied$ the e!isted of special instructions4such as a single instruction to load or store all registers5. 17. What is cache memory? - ;ache memory is random access memory 43A:5 that a computer microprocessor can access more quic&ly than it can access regular
3A:. As the microprocessor processes data$ it loo&s first in the cache memory and if it finds the data there 4from a previous reading of data5$ it does not have to do the more time-consuming reading of data from larger memory. 1>. What is a Safe State and what is its use in deadlock a oidance? - #hen a process requests an available resource$ system must decide if immediate allocation leaves the system in a safe state. System is in safe state if there e!ists a safe sequence of all processes. Beadloc& Avoidance9 ensure that a system will never enter an unsafe state. 1?. What is a "eal#!ime System? - A real time process is a process that must respond to the events within a certain time period. A real time operating system is an operating system that can run real time processes successfully
:emory management (he &ernel has full access to the systemHs memory and must allow processes to access safely this memory as they require it. Bevice management (o perform useful functions$ processes need access to the peripherals connected to the computer$ which are controlled by the &ernel through device drivers System calls (o actually perform useful wor&$ a process must be able to access the services provided by the &ernel.
(ypes of Iernel9
:onolithic &ernels Dvery part which is to be accessed by most programs which cannot be put in a library is in the &ernel space9 Bevice drivers Scheduler :emory handling Cile systems Jetwor& stac&s :icro&ernls In :icro&ernels$ parts which really require to be in a privileged mode are in &ernel space9 -Inter- rocess ;ommunication$ -Kasic scheduling -Kasic memory handling -Kasic I/O primitives
What is a semaphore?
)nswer A semaphore is a variable. (here are % types of semaphores9 Kinary semaphores ;ounting semaphores Kinary semaphores have % methods associated with it. 4up$ down / loc&$ unloc&5 Kinary semaphores can ta&e only % values 4@/15. (hey are used to acquire loc&s. #hen a resource is available$ the process in charge set the semaphore to 1 else @. ;ounting Semaphore may have value to be greater than one$ typically used to allocate resources from a pool of identical resources.
Difference between +!'S and ')!,The differences are as follows: NTFS: - Allows the access local to Windows 2000, Windows 2003, Windows NT with service pack 4 and later versions may et access for some file! - "a#im$m partition si%e is 2T& and more! - "a#im$m si%e of file is $pto '(T& - )ile and folder encryption is possi*le! FAT 32: Allows the access local to Windows +,, Windows +-, Windows "., Windows 2000, Windows #p on local partition! - "a#im$m partition si%e is 2T& - "a#im$m si%e of file is $pto 4/& - )ile and folder encryption is not possi*le!
012341
What is difference between a PROCEDURE & FUNCTION?
C=J;(IOJ9 -It must have return type. -It mainly used for calculation purpose. -It is part of </SL< bloc&.4that is return value to bloc& for e!ection of remaining code5 3O;DB=3D9 -It may or may not return value.
-It is mainly to perform a tas&. -It is a complete </SL< bloc&. -It is used to perform B:< operation.
State the difference between imp icit and e!p icit c"rs#r$s%
)ns. Implicit ;ursor are declared and used by the oracle internally. whereas the e!plicit cursors are declared and used by the user. more over implicitly cursors are no need to declare oracle creates and process and closes autometically. the e!plicit cursor should be declared and closed by the user.
State the ad&anta'e and disad&anta'e #f C"rs#r?
Advantage9 In pl/sql if you want perform some actions more than one records you should user these cursors only. bye using these cursors you process the query records. you can easily move the records and you can e!it from procedure when you required by using cursor attributes. Bisadvantage9 using implicit/e!plicit cursors are depended by sutiation. if the result set is les than +@ or 1@@ records it is better to go for implicit cursors. if the result set is large then you should use e!licit cursors. other wise it will put burdon on cpu.
3O#IB - Ae!a decimal number each and every row having unique.=sed in searching 3O#J=: - It is a integer number also unique for sorting Jormally (O J Analysys. Other sudo ;olumn are JDM(*A<$;=33*A< Of sequence are some e!amples
What is difference between ) ROWT*PE and T*PE RECORD ?
N 3O#(O D is to be used whenever query returns a entire row of a table or view. (O D rec 3D;O3B is to be used whenever query returns columns of different table or views and variables. D.g. (O D rPemp is 3D;O3B 4eno emp.empnoN type$ename emp ename Ntype 5E ePrec empN 3O#(O D