StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

The Difference between Kernel Mode and User Mode - Assignment Example

Cite this document
Summary
The paper "The Difference between Kernel Mode and User Mode" explains why the difference is important to an operating system and why the process table is needed in a timesharing system. The author also identifies the three main states that a process can be in…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER94.2% of users find it useful

Extract of sample "The Difference between Kernel Mode and User Mode"

Name: Course: Tutor: Date: Operating systems General 1. The difference between kernel mode and user mode? Why the difference important to an operating system? In Kernel mode, the running program code has maximum and free access to the underlying hardware. It can run any central processing unit instruction and make reference to any address in memory. Kernel mode is mostly dedicated to low-level, trustworthy operating system functions. In case of any crash in kernel mode it is usually vital since they halt the entire computer. User-mode, on the other hand running codes is unable of directly accessing hardware or making addresses to memory. User mode executing codes must reserve to system APIs to gain access to hardware or storage. Crashes in this mode are always recoverable since there is protection afforded by this type of isolation. The reason for this distinction is such that the kernel can track system critical resources and safeguard each user from other users. 2. Multiprogramming Multiprogramming is a type of consequent processing whereby many programs are run concurrently on a single processor. Since there is a single processor, unique programs cannot be executed. However, part of a program is executed by the operating system, then part of another henceforth. It is also the giving of computer resources to many concurrent application, task or user. 3. Why the process table is needed in a timesharing system? And if the process table also needed in personal computer systems in which only one process exists, that process taking over the entire machine until it is finished? The process table is actually essential to monitor the programs that the computer is executing. It is also needed to keep the status of a process that currently is under suspension, blocked or ready. Though many present computers execute multiple programs concurrently and processes do not take over the whole machine until they are completed. It is not essential in personal computer systems in which single processes exist since the single process has ultimate power over the system and hence no need for tracking. Processes 4. The three main states that a process can be in? And the meaning of each one briefly. The major three states a process can be are first running state which is when a process has the central processing unit and executes personal instructions of a program. Second is a blocked state which occurs when a process is blocked or prevented waiting for a certain resource, information or certain happening. Third is a ready state which occurs when a program is set to execute on the central processing unit. 5. The fundamental difference between a process and a thread Processes contain their own address spaces, must use IPC to exchange data with child processes, have personal replica of the parent process data segment, and need replication of the parent processes. While threads on the other hand share spaces of addresses with its parent process, have direct access to its processes data segments, exchange data directly with its processes other threads and almost have no overhead. 6. Round-robin schedulers normally maintain a list of all run able processes, with each process occurring exactly once in the list. What would happen if a process occurred twice in the list? Can you think of any reason for allowing this? If at any point a process appears than once in the list created by round-robin, then it receives two separate turns for each list pass. The main reason of permitting this is to implement a priority primitive system because the more it appears on the list the greater the time percentage the central processing unit will take on that process. Memory management 7. The difference between a physical address and a virtual address Physical address is the addresses destined to a physical memory point in the primary storage while a virtual address is the address of anything that resides in virtual memory. Data kept at a virtual address may reside in the primary or secondary storage. Alternatively, real storage makes use of physical addresses which are the elements that memory chips react to on the bus. While virtual addresses are logical addresses that reference to an address space of a process. 8. Consider a swapping system in which memory consists of the following hole sizes in memory order: 10 KB, 4 KB, 20 KB, 18 KB, 7 KB, 9 KB, 12 KB, and 15 KB. Which hole is taken for successive segment requests of a. 12 KB b. 10 KB c. 9 KB for first fit? Now repeat the question for best fit, worse fit, and next fit. For first fit: for the sequence of request 12KB, 2KB and 13KB, the policy will choose: 20KB hole for 10KB request we would have after this allocation holes (10,4,2,18,7,9,12,15). 10KB hole for 9KB request we would then have holes (8, 4, 2, 18, 7, 9, 12, 15). And 12KB hole for 10KB request we would then have the holes (8, 4, 2, 5, 7, 9, 12, 15). Best fit: 12KB hole (10, 4, 20, 0, 7, 9, 12, and 15). 4KB hole (10, 2, 20, 7, 9, 12, and 15). 15KB hole (10, 2, 20, 7, 9, 12, and 2). Worst fit: 20KB (10, 4, 2, 18, 7, 9, 12, 15). 12KB (10, 4, 2, 16, 7, 9, 12, 15.) 16KB (10, 4, 2, 3, 7, 9, 12, 15.) 9. A computer with a 32-bit address uses a two-level page table. Virtual addresses are split into a 9-bit top-level field, an 11-bit second-level page table field, and an offset. How large are the pages and how many are there in the address space? Offset = 32 – 9 – 11 = 12 bits Page size = 2^12 B = 4 KB Total number of pages possible = 2^9 * 2^11 = 2^20 I/O 10. What DMA is and why it is used. It is a component of present computers and microprocessors that permit some hardware subsystems bound within the computer to gain system memory access for writing and reading separately from the CPU. It is majorly applied in intra-cheap data exchange. Print spooling make able to a user to continue working while the printer does its job. If an application provides data directly to a printer, the computer must wait until that job is completed before it can enable the user to move on. If the text is large or graphic is complicated, the user may be forced to wait for a long time. 11. Why output files for the printer are normally spooled on disk before being printed The main purpose of spooling output files for the printer before being printed is to be able to allow the user to continue working on the machine while the printer performs its tasks. If it were that applications give data directly to the printer, the user will be delayed from using the computer since the computer must be patient for the tasks to be completed hence compelling users to wait for longer periods. 12. An alternative to interrupts is polling. Are there any circumstances you can think have in which polling is a better choice? Polling can be a better choice in tiny dedicated systems that are not executing multiple processes. Polling is of great importance where the expectation is that only little patience is expected. This can occur in device drivers, some low rated software’s where synchronization is imminent and short time intervals. File systems 13. Some operating systems provide a system call rename to give a file a new name. Is there any difference at all between using this call to rename a file, and just copying the file to a new file with the new name, followed by deleting the old one? Of course there is a difference, the rename call does not alter the creation identity, or the latest modification time, creating a new file may result it to obtain the current time as that of modification and creation. The copy will also not be a success if the disk is full or write protected. 14. NTFS uses Unicode for naming files. Unicode supports 16-bit characters. Give an advantage of Unicode file naming over ASCII file naming. Unicode defines lots of characters and maps each of them a distinct number, the Unicode code, from which it can be easily referenced. The details of how these codes are kept on disk or in computer storage is an issue of encoding. The main advantage of Unicode for file naming is that it permits easier communication and great interoperability than ASCII and any other character set. 15. Systems that support sequential files always have an operation to rewind files. Do systems that support random access files need an operation to rewind files? There is no need for an operation to rewind files. Random access of files does not require rewind operation from the fact that if you want to read the file again you can do so by just accessing byte 0. Works Cited Andrew, Tanenbaum and WoodHull S Albert. Operating systems: Design and implementation. Upple Saddle River: Prentice Hall, cop, 2009. Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(Theoretical Questions Example | Topics and Well Written Essays - 1519 words, n.d.)
Theoretical Questions Example | Topics and Well Written Essays - 1519 words. https://studentshare.org/logic-programming/2047011-theoretical-questions
(Theoretical Questions Example | Topics and Well Written Essays - 1519 Words)
Theoretical Questions Example | Topics and Well Written Essays - 1519 Words. https://studentshare.org/logic-programming/2047011-theoretical-questions.
“Theoretical Questions Example | Topics and Well Written Essays - 1519 Words”. https://studentshare.org/logic-programming/2047011-theoretical-questions.
  • Cited: 0 times

CHECK THESE SAMPLES OF The Difference between Kernel Mode and User Mode

Contrasting the Structure of Teosinte with That of Corn

? One difference between the Tripartite and Teosinte theories is that while the former proposes that maize came from the hybridization between wild maize and a species of Tripsacum, the latter contends that teosinte is the progenitor of maize.... Although the domestication of wheat occurred at particularly the same time, the difference lies in the fact that while corn domestication involved the production of more rows, the domestication of wheat involved “an increase in grain size and the development of nonshattering seed” (Eckardt)....
3 Pages (750 words) Essay

Introduction to computing

To understand how this works, it is necessary to understand the difference between the shell and the kernel embedded in the operating system as well as the main features of graphic user interfaces as opposed to command line or human/computer interfaces, ending with a look at some of the more common programs such as Unix, Linux and Windows Vista.... This software governs everything from how the computer stores and interprets data to how it is analyzed and accessed and eventually displayed on the screen for user input....
12 Pages (3000 words) Essay

Characteristics of the Term Multitasking and Its Types

Prior to the introduction of multitasking, the early programs used to run in batch mode on computers, i.... It enabled the programmers/users to run multiple tasks at the same time, by allowing two or more programs complete access to the system, in the batch mode.... user interference was not allowed or possible while the batch was running, since two programs could not run simultaneously.... The paper "The Term Multitasking " discusses that the drawback of the microkernel system include the performance appraisal taken when module loads take place, as well as the safety hazards of interpreting specific codes from a file and loading it into the kernel....
5 Pages (1250 words) Essay

Dependent and Independent Variables

average kernel weight/ear of corn differences, respectively, for zero, low, and high ECB infestation.... Since the BT variety has higher average kernel.... By comparing the two tables for BT and Non-BT kernel weight/ear According to plant-genetics experts, the benefits of using genetically modified crops primarily include disease and pest resistance, an improved ability to weather environmental stresses, and improved product quality (Smith and Parr, 2005, p....
3 Pages (750 words) Lab Report

Kernels of Different Operating Systems

The paper "Kernels of Different Operating Systems" discusses that in an operating system a kernel is a most important element, which allows an operating system to perform different critical tasks.... In this scenario, kernel is the most important element of an operating system.... In this scenario, the kernel is the "core" or innermost important part of any OS (operating system).... In fact, an operating system uses the capabilities of the kernel to offer a wide variety of callable routines that facilitate other applications to display text, access files, and graphics, get input from a mouse or keyboard, and some other similar routines and tasks....
12 Pages (3000 words) Coursework

Comparison of Kernels of Different Operating Systems

he kernel is the most significant element of an OS and is composed of two fractions, user space (un-privileged operating mode) as well as kernel space (privileged operating mode).... The early idea of the monolithic kernel and normal kernel offers the entire fundamental system services similar to file system, memory management, I/O communication and interrupt handling in the privileged operating system mode.... The paper "Comparison of Kernels of Different Operating Systems" has tried to highlight some of the fundamental aspects regarding the Windows, Apple, Linux and FreeBSD based kernel Design....
12 Pages (3000 words) Coursework

Systems Programming

This paper ''Systems Programming'' tells that It must be stressed that this Paper will not be discussing the various features of the graphical user interfaces (GUIs) of these four operating systems, and these GUIs will only be referred to when discussing a particular feature in terms of a specific user command or use case.... One thing that any user will notice immediately with Windows 8 is that the 'boot up' will be significantly faster - perhaps as much as one-third....
11 Pages (2750 words) Essay

Comparison of Operating System Kernels

While programs are related to the virtual mode, the kernel is also concerned with the physical mode and physical operations as well.... kernel is one of the important parts of the operating system and it can be termed as the core unit and heart of operating system.... It is the operating system that holds the kernel within itself.... kernel is a series of instructions, processes and programs that are joined together, grouped into large entity to perform the tasks....
11 Pages (2750 words) Essay
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us