An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions. The purpose of the lexical analyzer is to partition the input text, delivering a sequence of comments and basic symbols.
Comments are character sequences to be ignored, while basic symbols are character sequences that correspond to terminal symbols of the grammar defining the phrase structure of the input. Paging is solution to external fragmentation problem which is to permit the logical address space of a process to be noncontiguous, thus allowing a process to be allocating physical memory wherever the latter is available. Switching the CPU to another process requires saving the state of the old process and loading the saved state for the new process.
This task is known as a context switch. Context-switch time is pure overhead, because the system does no useful work while switching. Its speed varies from machine to machine, depending on the memory speed, the number of registers which must be copied, the existed of special instructions such as a single instruction to load or store all registers.
Distribute the computation among several physical processors. Main memory: — only large storage media that the CPU can access directly. Secondary storage: — extension of main memory that provides large nonvolatile storage capacity.
Deadlock is a situation where a group of processes are all blocked and none of them can become unblocked until one of the other becomes unblocked. The simplest deadlock is two processes each of which is waiting for a message from the other. Throughput — number of processes that complete their execution per time unit Turnaround time — amount of time to execute a particular process Waiting time — amount of time a process has been waiting in the ready queue Response time — amount of time it takes from when a request was submitted until the first response is produced, not output for time-sharing environment.
Micro-Kernel: A micro-kernel is a minimal operating system that performs only the essential functions of an operating system. All other operating system functions are performed by system processes.
Monolithic: A monolithic operating system is one where all operating system code is in a single executable image and all operating system code runs in system mode. Multi programming: Multiprogramming is the technique of running several programs at a time using timesharing.
It allows a computer to do several things at the same time. Multiprogramming creates logical parallelism. The concept of multiprogramming is that the operating system keeps several jobs in memory simultaneously. So the main idea here is that the CPU is never idle. Multi tasking: Multitasking is the logical extension of multiprogramming. The concept of multitasking is quite similar to multiprogramming but difference is that the switching between jobs occurs so frequently that the users can interact with each program while it is running.
This concept is also known as time-sharing systems. A time-shared operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of time-shared system. Multi threading: 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 tasks for example 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. The 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. This 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.
So to get the advantages like responsiveness, Resource sharing economy and utilization of multiprocessor architectures multithreading concept can be used. Consider any system where people use some kind of resources and compete for them. The non-computer examples for preemptive scheduling the traffic on the single lane road if there is emergency or there is an ambulance on the road the other vehicles give path to the vehicles that are in need.
The example for preemptive scheduling is people standing in queue for tickets. Starvation: Starvation is a resource management problem where a process does not get the resources it needs for a long time because the resources are being allocated to other processes.
Aging: Aging is a technique to avoid starvation in a scheduling system. It works by adding an aging factor to the priority of each request. Hard real-time systems — required to complete a critical task within a guaranteed amount of time. Soft real-time computing — requires that critical processes receive priority over less fortunate ones. Ensure that the system will never enter a deadlock state. When Pj is finished, Pi can obtain needed resources, execute, return allocated resources, and terminate.
Priority of the process. How long process has computed, and how much longer to completion. Resources the process has used. Resources process needs to complete. How many processes will need to be terminated? Is process interactive or batch? Logical address — generated by the CPU; also referred to as virtual address.
Physical address — address seen by the memory unit. Address binding of instructions and data to memory addresses can happen at three different stages Compile time: If memory location known a priori, absolute code can be generated; must recompile code if starting location changes. Load time: Must generate relocatable code if memory location is not known at compile time. Execution time: Binding delayed until run time if the process can be moved during its execution from one memory segment to another.
Need hardware support for address maps e. Hardware device that maps virtual to physical address. In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory. Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request. External Fragmentation: External Fragmentation 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 external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks.
Demand Paging: Demand paging is the paging policy that a page is not read into memory until it is requested, that is, until there is a page fault on the page.
Page fault interrupt: A page fault interrupt occurs when a memory reference is made to a page that is not in memory. The present bit in the page table entry will be found to be off by the virtual memory hardware and it will signal an interrupt. Segments can be of different lengths, so it is harder to find a place for a segment in memory than a page.
With segmented virtual memory, we get the benefits of virtual memory but we still have to do dynamic storage allocation of physical memory. In order to avoid this, it is possible to combine segmentation and paging into a two-level virtual memory system.
Each segment descriptor points to page table for that segment. This give some of the advantages of paging easy placement with some of the advantages of segments logical division of the program. Under what circumstances do page faults occur? Describe the actions taken by the operating system when a page fault occurs?
A page fault occurs when an access to a page that has not been brought into main memory takes place. The operating system verifies the memory access, aborting the program if it is invalid.
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? Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page fault. The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming.
Your email address will not be published. What are the various components of a computer system? The hardware The operating system The application programs The users. Real-time operating systems 6. They can share the network resources,communicate with each other What is SCSI? Small computer systems interface. What is a sector? Smallest addressable portion of a disk.
Command interpreter system Protection What is a layered approach and what is its advantage? What is micro kernel approach and site its advantages? What are a virtual machines and site their advantages? User processes Terminated Device queue Java threads are created and managed by the java virtual machine, they do not easily fall under the category of either user or kernel thread…… What is resource allocation graph?
What are deadlock prevention techniques? They should be sharable. But some resources such as printers must be mutually exclusive. Hold and wait : To avoid this condition we have to ensure that if a process is requesting for a resource it should not hold any resources. No preemption : If a process is holding some resources and requests another resource that cannot be immediately allocated to it that is the process must wait , then all the resources currently being held are preempted released autonomously.
Circular wait : the way to ensure that this condition never holds is to impose a total ordering of all the resource types, and to require that each process requests resources in an increasing order of enumeration.
What is a safe state and a safe sequence? A sequence of processes is a safe sequence for the current allocation state if, for each Pi, the resources that the Pi can still request can be satisfied by the currently available resources plus the resources held by all the Pj, with j What are the deadlock avoidance algorithms? Resource request algorithm What are the basic functions of an operating system?
Processor:- A processor is the part a computer system that executes instructions. Some people call these instructions assembler language and others use the term assembly language.
Typically, a programmer writes language statements in a language such as Pascal or C one line at a time using an editor. The file that is created contains what are called the source statements.
The programmer then runs the appropriate language compiler, specifying the name of the file that contains the source statements. What is a Real-Time System? A real time operating system is an operating system that can run real time processes successfully What is the difference between Hard and Soft real-time systems? As in hard real time systems kernel delays need to be bounded What is virtual memory? This is done by time-sharing, the physical memory and storage parts of the memory one disk when they are not actively being used What is cache memory?
As the microprocessor processes data, it looks first in the cache memory and if it finds the data there from a previous reading of data , it does not have to do the more time-consuming reading of data Differentiate between Complier and Interpreter? What are different tasks of Lexical Analysis? Comments are character sequences to be ignored, while basic symbols are character sequences that correspond to terminal symbols of the grammar defining the phrase structure of the input Why paging is used?
What is Context Switch? Distributed Systems? Difference between Primary storage and secondary storage? What is CPU Scheduler? UNIX commands, however, are stand-alone programs; they may incorporate both system calls and library functions in their programming.
Long format refers to additional information that is associated with the file, such as ownership, permissions, data and filesize. The output of the first command serves as input the next command, and so on. A superuser is a special type user who has open access to all files and commands on a system. Every process is uniquely identified by a process identifier. It is possible to view details and status regarding a process by using the ps command.
A directory, being a special type of file, follows the same naming convention as that of files. Letters and numbers are used, along with characters like underscore and dot characters. The root account is very important, and with abusive usage, can easily lead to system damage. When using the cat command to display file contents, large data that does not fit on the screen would scroll off without pausing, therefore making it difficult to view.
On the other hand, using the more command is more appropriate in such cases because it will display file contents one screen page at a time. Parsing is the process of breaking up of a command line into words. This is made possible by using delimiters and spaces. In the event that tabs or multiple spaces are part of the command, these are eventually replaced by a single space.
Pid is short for Process ID. It is used primarily to identify every process that runs on the UNIX system, whether it runs on the foreground or runs at the background. Every pid is considered unique. Wild-card characters are used to setup a list of files for processing, instead of having it specified one at a time.
You are commenting using your WordPress. You are commenting using your Google account. You are commenting using your Twitter account. You are commenting using your Facebook account. This so-called Free software movement allows several advantages, such as the freedom to run programs for any purpose and freedom to study and modify a program to your needs. It also allows you to redistribute copies of software to other people, as well as the freedom to improve software and have it released for the public.
The root account is like a systems administrator account and allows you full control of the system. Here you can create and maintain user accounts, assigning different permissions for each account. It is the default account every time you install Linux. This interface allows the user to type declarative commands to instruct the computer to perform operations. CLI offers greater flexibility. However, other users who are already accustomed to using GUI find it difficult to remember commands including attributes that come with it.
GUI, or Graphical User Interface, make use of images and icons that users click and manipulate as a way of communicating with the computer. Instead of having to remember and type commands, the use of graphical elements makes it easier to interact with the system, as well as adding more attraction through images, icons, and colors. To open the default shell which is where the command prompt can be found , press Ctrl-Alt-F1. This will provide a command line interface CLI from which you can run commands as needed.
You should see a line starting something like Mem: , etc. This is the total memory Linux thinks it has available to use. The preferred size for a swap partition is twice the amount of physical memory available on the system. If this is not possible, then the minimum size should be the same as the amount of memory installed. Symbolic links act similarly to shortcuts in Windows. Such links point to programs, files or directories. It also allows you instant access to it without having to go directly to the entire pathname.
Yes, it does. Just like Windows, you can use this key combination to perform a system restart. In Linux, each drive and device have different designations. Assuming you are the system administrator or the owner of a file or directory, you can grant permission using the chmod command. TXT, which is assigned to groups and others. Linux assigns numbers at the end of the drive identifier. Hard links point directly to the physical file on disk, and not on the pathname.
This means that if you rename or move the original file, the link will not break since the link is for the file itself, not the path where the file is located. Any filename can have a maximum of characters. This limit does not include the path name, so therefore the entire pathname and filename could well exceed characters.
In general, filenames that are preceded by a dot are hidden files. These files can be configuration files that hold important data or setup info. Setting these files as hidden makes it less likely to be accidentally deleted. This serves as an alternative to minimizing and maximizing different windows on the current desktop.
Using virtual desktops can clear the desktop when you can open one or more programs. To share a program across different virtual desktops, in the upper left-hand corner of a program window look for an icon that looks like a pushpin. This empty directory name serves as the nameless base of the Linux file system. This serves as an attachment for all other directories, files, drives, and devices. Daemons are services that provide several functions that may not be available under the base operating system.
0コメント