Operating Systems Study Guide

Ace your homework & exams now with Quizwiz!

Define volatile as described in the text and explain what it refers to.

Volatile means that the information will be lost quickly or the state will change quickly. In reference to the text, volatile is explain in regards to main memory storage being volatile. The main memory storage is volatile because the data is lost when power is turned off. A fix for this problem is to provide secondary storage via a magnetic disk , which will retain data whether the power is on or off.

Many operating systems such as MS-Dos,do not have a well defined structured and started as small, simple, and limited systems that grew beyond their original scope. These are called

monolithic operating systems.

Designed to treat foregound and background processes differently

multi-level queue

Thrashing

occurs when a process spends more time paging, then executing

External Fragmentation

occurs when processes are broken into little pieces and when there is enough total memory space to satisfy a request but the available spaces are not contiguous, storage is fragmented into a large number of small holes.

Best algorithm to ensure a good response time for tasks

round robin

In systems that support virtual memory, virtual memory is...

separated from logical memory

Optimal algorithm for reducing wait times

shortest job first

Best fit

the dynamic storage allocation algorithm which results in the smallest leftover hole in memory

For security , most modern dual mode operating systems perform action in one of two modes, These are called ..

user mode and system mode.

Consider a logical address with a page size of 8kb. How many bits must be used to represent the page offset in logical address?

13kb

Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what is the number of page faults for the given reference string?

8 if not in queue, then a fault happens, if in queue then a page fault does not happen

What is the purpose of the command interpreter?

A command interpreter is supposed to get and execute the next user specified command. Some examples of a command are create, delete, list, print and execute. The reason why the command interpreter is seperate from the kernel is so programmers can add new commands to the system and the command interpreter program will not have to be changed.

discuss what a context switch is and what exactly happens when a context switch occurs. How does the operating system magically stops a process mid-execution to make room for others and yet still have the ability to come back later and pick up right where that original process left off? How (i.e. in what structure) is all the information that describes that process stored?

A context switch is when a state save of a current process occurs and a state restore of another process happens right after. The mechanics of a context switch is possible because the kernel saves the context of the old process in a program control block. After saving the old process, the kernel loads the saved context of new process that is next to be executed. The context switching is possible because the multiple sets of registers available to save the state of a process. There are far more processes available then registers and the system just copies the register data to memory.

list and explain the various states that a process goes through from creation to desctruction. Does it visit each state only once, or are there states that it cycles through repeatedly?

A process can be in five different states. The first state is the new state in which a process is being created. The next state is the running state which is when instructions on the process are executed. A third state is the waiting state. The waiting state occurs when a process is waiting for another process like input or output to complete. A fourth state is ready which means the process is waiting for assignment to a processor. The final state is terminated which means the process has completed its function and is done. A process can be in a ready and waiting states which means that they visit state more than once.

Internal Fragmentation

A process needs a certain amount of memory and is allocated the memory with a small hole left over the usage of resources to keep track of the hole could be more than the hole itself which is not worth the loss in performance.The memory is broken into fixed sized pieces to avoid the preceeding scenario from occuring, and a process gets allocated more memory then needed where the extra memory is referred to the internal fragmentation or unused memory in a partition.

Safe State

A situation where a system can complee its execution while not in safe state is if there are three processes that require a certain amount of resources but at the time they request a resource only need a base minimum amount of resources. In the system are three processes with two only need three resources while the third proces could use 5 resources but currently only needs two and the system has eight resourcesto give it can fulfill the requirements while in a unsafe state. The last process will use the available resources and as long as the process does not ask for more resources then the system currently has; the system will not enter into a deadlocked state.

What is a system call and what is its purpose?

A system call is the request from an application for the operating system to perform some action. Services could be new processes created or communicating with kernal services like a process scheduler.

Define volatile.

A volatile storage device loses its contents when power is turned off or otherwise lost.

What is an operating system?

An operating system is software that manages computer hardware and resources, and serves as a platform to run applications that can interface with users. This allows users to work with applications to complete tasks, while the operating system takes care of the hardware and resource management aspect. Operating systems can also range in complexity. Simple operating systems only take care of hardware, resource managements and applications. Users then take care of everything else. Ideal operating systems incorporate file and disk management systems as well. The best operating systems seek to minimize effort on the users part in completing tasks ranging from managing files to browsing the web to graphical user interfaces. The user interface also changes depending on the type of computer the user is working with. It could be a desktop computer, mobile device, or even a calculator. Thus all operating systems are unique depending on their hardware, and the type of user experience they offer.

How does a computer boot?

BIOS controls the initial startup and could be routed to say a floppy, a flash disk, etc. After looking at a short guide on the matter, I still understand very little, but I can sort of follow along. (Note, I am more of a software person AFTER an OS has loaded) First step after power button: DOS: First, the BIOS essentially sets up the system for load. It then begins to search for boot devices, like I specified earlier. Assuming it finds one, it then loads the boot code into a master boot record and transfer controls to it then begins to run the "DOS Boot Process" which is just a load sequence. This load sequence verifies that the files "IO.SYS", "MSDOS.SYS" and "COMMAND.COM" exist otherwise it errors out (Keep in mind, the system has booted though, the operating system files were just missing). If the files are found, they are loaded into memory and then transferred control. Then you can enjoy your wonderful DOS environment (assuming you love command line) In PCs the DOS component is just the start. They control the loading and execution of more routines as the boot process progresses.

CPU utilization

CPU utilization- means that CPU will be busy as possible or using the CPU processing efficiently. The utilization can be 0-100.

List any three of the ive process related activities an O.S is responsible for performing.

Create and delete use and system processes Scheduling Suspend and resume processes

What is a Process Control Block?

Every process in a operating system is represented by a process control block which has information about a process. The block contains info such as:process state, program counter, cpu register, memory management information,cpu scheduling information. The block helps the system by providing information for any process which helps the operating system manage the process. The process control block is stored in the stack by the kernel. According to wikipedia, "Since PCB contains critical information for the process, it must be kept in an area of memory protected from normal user access. In some operating systems the PCB is placed in the beginning of the kernel stack of the process since that is a convenient protected location." I assumed it was just on the stack but from the description above , may be dependent on the operating system.

A old-style punchcard computer system.

First-Come, First-Served would be the best algorithm for a punch card system: each process will get executed in the order they arrived and although the waiting time for a process may be long, every process will be executed eventually.

How do you do a page number and offset?

If 1Kb size a. 2375 Page number 2375 /1024=2 Offset 2375%1024=327

What is processor affinity?

If a process has been running on a specific processor and is using a cache for that processor but needs to be migrated to another processor then the contents of memory in cache must be moved as well. The time it takes to move the information form one process to another another and trying to keep the process on the same processor is known as processor affinity. There are two types of processor affinity, they are known as hard affinity and soft affinity. Soft affinity is when a processor has a policy to keep a process on the same processor but does not gurantee it will happen. Hard affinity is when a process is specified a processsor to run on .

Define kernal mode and user mode.

Kernal mode is used when the operating system is in control of the system. The user mode is when an application takes control of the computer and a user is using a program. The kernal mode is important because it protects the user from making mistakes and allows the operating system to manage the computer with privileged instructions.

List any two CPU scheduling algorithms that are particularly for real time systems and then explain why.

Real time systems require a fast response to processes that require the CPU. One scheduling algorithm good for a real time system is rate monotonic scheduling. The rate monotonic scheduling uses static priority policy with preemption. This algorithm is useful because if a lower priority process is running and a higher priority process needs to run, the higher priority process will preempt the lower priority process. When a task is periodic it will be assigned a priority inverse to its period. The shorter the period then the higher the priority and if a period is longer, the lower the priority. A higher priority is assigned to tasks that require the CPU more often, ensuring a fast response to processes that need a fast response time. Another scheduling algorithm good for real time system is earliest deadline first because it assigns priorities according to deadline. If deadline is earlier it receives a higher priority and vice versa.

Response time

Response time is a measure used moreso for interactive systems when a process submits a request and is waiting until the first response is produced. The time is a measure of how long it takes to start responding and not to output a response.

The version of Unix that runs on Sun Microsystems is called

Solaris

What is the CPU/ IO burst cycle? Why is it important in scheduling?

The CPU and I/O burst cycle is when a process alternates between two different states. The process may wait on input or output or on the cpu to execute instructions the process needs. The process will continue between the different states until a final CPU burst and the process requests termination. Processes can lean towards CPU bound or I/O bound which means they require more of the CPU or more I/O. The cycle helps the CPU scheduler schedule each process and ensure the CPU is utilized efficiently by choosing the appropriate CPU schedule algorithm needed.

The LINUX operating system.

The Multi-level scheduling algorithm would be most appropriate for an operating system because of the distinction made between background processes and foreground processes. The different queues used may have a different scheduling algorithm running based on the type needed for the type of process. The foreground queue used for for foreground processes may be using a round robin algorithm and the background queue may be using a first come first serve algorithm.

automated shipping and boxing fulfillment

The multi-level feedback queue is perfect for a shipping fulfillment boxing system because of the many different queues and ability to allow processes to move to different queues. For instance, if a shipping order came with high priority or fast shipping , the shipment could be moved to a higher level queue and processed faster. For regular processes that may have been in a lower priority queue they can be moved to a higher queue to prevent starvation which is good for regular shipments that may be waiting for their turn to be processed. The difference between the MFQ and MLFQ is the MLFQ allows processes to move to different queues. The processes can be moved based on whether their CPU burst takes too much time(moved to lower priority queue) or if a process waits too long and needs to move to a higher priority queue. The MLQ seperates processes using background or foreground type and does not allow lower level queues to execute unless higher level queues have already executed. The MLFQ would not work properly for different priorities because if the scheduler assigns a process an incorrect priority (I/O bound process taking longer than CPU bound) when the actual reason the process takes long is because the process is waiting on physical input; then a priority could be assigned incorrectly and cause a bottleneck in the entire automated system.

discuss the scheduling aspect of the operating system. How does the scheduler handle the multiple processes that need to execute on the CPU. How does the scheduler transition processes between different states?

The scheduler handles multiple processes by sending processes to a disk which are stored then using different scheduler types depending on the type of process. There is a short term scheduler and long term scheduler. The short term scheduler executes quickly on processes while the long term scheduler executes a lot less than the short term scheduler. The scheduler transitions between processes in different states by having a queue on disk and selecting the appropriate scheduler for the appropriate process.

Explain the shortest time remaining algorithm

The shortest time remaining algorithm is a preemptive version of the short job next algorithm. The process with a small amount of time remaining is selected to execute. The algorithm will associate the length of the CPU burst for each process. Once the CPU is available , the process with the smallest next CPU burst gets assigned to the CPU. If there are two processes with the smallest CPU burst each, then the first come, first serve scheduling algorithm is used to determine which process is executed next.

An Android or Apple phone or tablet.

The tablet or smart phone should use a combination of multi-level feedback queue and first come first serve. The multi-level feedback queue will allow processes to have different queues based on foreground or background processes but also allow a process to move between the queue. The processes moving between queues is based on whether the process will use too much CPU time and if so, will be placed in a lower level queue. This is beneficial because the more I/O bound and interactive processes will be in the higher priority queue which is extremely important in a tablet or smart phone because the user should never have to wait for the system to catch up to their input.

Turnaround

The turnaround time is the interval from when a process starts to when a process is completed. The time is basically the amount of time needed to execute a process. The time is specifically measured by the sum of periods spent waiting to get into memroy, waiting in ready queue, executing on CPU and doing input or output.

Waiting time

The waiting time is the sum of periods a process spends waiting in the ready queue to be executed.

What are three major activities of an operating system in regards to memory management?

Three major activities of an operating system for memory management are: Keeping track of which parts of memory are being used and who is using them. Deciding which processes and data to move into and out of memory Allocating and deallocating memory space as needed

True or False A page fault must be preceded by a TLB miss.

True

Throughput

a measure to gauge the amount of work being done by the CPU. This is measured by the number of processes completed per time unit.

Copy-on-write

allows the parent and child processes to initially share the same pages but when either process modifies a page, a copy of the shared page is created.

A collection of physically seperate, possibly heterogenous, computer systems that are networked to provide users with access to various resources is called a

distributed system

Define real time embedded system

embedded systems are the most prevalent form of computers. They tend to have very specific tasks, run on primitive hardware and have operating systems taht provide limited features. A real time system is used when rigid time requirements are placed on a processor.

Simplest allgorithm to implement

first come first serve

Beladys anomaly states that...

for some page replacement algorithms, the page-fault rate may increase as the number of allocated frames increases


Related study sets

Fundamentals of Sleep Technology (Exam 1 Study Guide)

View Set

Anatomy and Physiology Test 2: FINAL

View Set

Temperate Fruits: apples, pears, peaches, and pomegranates (2)

View Set