All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
engineering
computer engineering
Questions and Answers of
Computer Engineering
Microprocessor chips often do not include floating-point operations in their hardware instruction set. Floating-point instructions must then be implemented either by using software functions or via
Assume it takes an average of 2.5 clock cycles to execute an instruction in a one address machine language (that is, each individual instruction can reference at most one memory location). Estimate
Maintaining a system clock that can be read by any user program requires only that the operating system read a physical device (keeping physical time) and then write the time into a globally readable
C++ type hierarchies could be used to define device drivers by encoding standard operations for all devices in a base class and then refining the behavior for various devices with derived classes.
Using C-like pseudo code, describe a device driver, interrupt handler, and device status table to implement the following:a. get-block (device, buffer)b. put-block (device, buffer)Because this
Conventional high-level programming languages rely on sequential semantics for their operation. In particular, when programmers write a code segment such as.read (io-port, &buffer, length);x = f
Describe a new read function, xRead ( ) , along with other functions that could enable one to write programs in a high –level language such that the application can continue processing after the
Serial asynchronous communication ports are widely used in contemporary computers to connect a terminal (keyboard and display) or a printer to the computer. The signaling protocol typically employs 1
Consider the performance specifications for a contemporary desktop computer given in Section 4.6. What component is likely to be the performance bottleneck in such a computer? Why?
The Itsy computer incorporates a two-axis accelerometer that is intended to measure movement of the entire machine. This device reports the change in orientation of the entire computer in two
Suppose a computer with a pipelined functional unit contains a 4-stage pipe, with the time for each stage to execute being 50 μs. What is the maximum number of instructions that can be executed by
Provide the detailed steps involved in performing an output operation in a system that uses interrupts. Use the explanation of the input instruction in Section 5.1 as a pattern for your answer.
Suppose three processer, p1, p2, and p3, are attempting to use a machine with interrupt-driven I/O concurrently. Suppose p1 has tcompute = 20 and tdevice = 50, p2 has tcompute = 30 and tdevice =10,
Refer to hardware double buffering (Figure below) and explain the effect of buffering on the runtime of the process if the process is I/O-bound and requests characters at a much higher rate than the
Should magnetic disk controllers include hardware buffers? Explain your answer.
System designers distinguish between the physical blocks read by the driver and the logical blocks presented to the application process. Explain how this distinction might be useful on a system that
Suppose that a driver is configured with 8 disk block buffers. What is the best possible read performance improvement of a program that uses this driver (compared to one that uses no buffering)? What
One of the ways magnetic disk drive manufacturers increase the capacity of a disk is by adding more surfaces. Does this change the device driver interface for the device? If not, why not?
Is it necessary for an operating system to have a driver-kernel interface in a system that does not use reconfigurable device drivers? Explain your answer.
Explain why a serial communications port that manages a terminal keyboard does not normally use the same optimization techniques as a serial communications port that manages a printer.
Identify some optimization techniques you would consider for a device driver for a magnetic tape drive. Justify each technique.
Suppose the read/write head is at track 97, moving toward track 199 (the highest numbered track on the disk) and the disk request queue contains read/write requests for sectors on tracks 84, 155,
Construct a scenario in which a disk optimization algorithm other than SSTF requires fewer steps to satisfy all requests for disk I/O. Use a 300-track disk with a maximum 100-track traversal time for
Overlapped execution semantics for read and write functions were defined in Section 5.2. How could you implement this in a conventional C program (using the stdio library)?
Section 5.5 describes CD-ROM devices. Notice that a CD-ROM recording track is a single helix coiling from the inside to the outside instead of a set of concentric rings like a magnetic disk. How can
Explain why all processes in a thread block when any one of them blocks in a user space thread implementation. Why is this not true in a kernel thread implementation?
Does the hardware process described in Section 6.2 have a process descriptor? Does the initial process have a process descriptor? Explain your answers.
Each process is created with an address space that defines access to every memory-mapped resource in the process. Explain how a process can refer to objects that are not in its address space (for
Many operating systems allocate a static array of process descriptors, meaning that there is a fixed, maximum number of processes that can exist in the OS. Provide some arguments for why the kernel
Below is a list of fields from a classic process descriptors. In a modern process model with threads and processes, say whether each field should be implemented in the process or thread descriptor.a.
When a new process moves from the ready state to the running state ( in Figure), each register in the CPU must be set either to initial values or to the values the process had when it was last
Suppose an OS was designed so that processes could be in any of the following states:a. Running: Currently using the CPU.b. Ready: Waiting for the CPU.c. Blocked for Interrupt: Waiting for an
Suppose a process is defined to behave as described in Figure. Design and implement a resource manager for reusable resources. When multiple processes are blocked on a resource and one or more units
During processor multiplexing using interrupts and the interval timer, the processor receives a timer interrupt when the interrupt request flag (interruptRequest) is set to TRUE by the interval timer
Suppose a new process in a system arrives at an average of six processes per minute and each such process requires an average of 8 seconds of service time. Estimate the fraction of time the CPU is
Assume you have the following jobs to execute with one processor, with the jobs arriving in the order listed here: a. Suppose a system uses FCFS scheduling. Create a Gantt chart illustrating the
Using the process load in the previous problem, suppose a system uses SJN schedulinga. Create a Gantt chart illustrating the execution of these processes.b. What is the turnaround time for process
Suppose a system uses priority scheduling (under the following process load), where a small integer means a high priority. a. Create a Gantt chart illustrating the execution of these processes. b.
Assume you have the following jobs to execute with one processor: Suppose a system uses RR scheduling with a quantum of 15. a. Create a Gantt chart illustrating the execution of these processes. b.
Assume you have the following jobs to execute with one processor: Suppose a system uses preemptive SJN scheduling. Create a Gantt chart illustrating the execution of these processes.
Assume the context switch time is five time units with RR scheduling.a. Create a Gantt chart illustrating the execution of these processes.b. What is the turnaround time for the processes p3?c. What
Assume you have the following jobs to execute with one processor: The jobs are assumed to arrive at the same time. Using priority scheduling, do the following: a. Create a Gantt chart illustrating
What is the effect of increasing the time quantum to an arbitrarily large number for RR scheduling?
Linux Version 2.2 supports kernel threads, so its scheduler operates on threads instead of processes. Do you think it would be necessary to completely redesign the Version 2.0 (or Version 1.0
The BSD UNIX priority values actually range from 0 through 127, rather than from 0 through 31 (corresponding to the run queue number). Speculate why the designers decided not to incorporate 128 run
Suppose processes P0 and P1 share variable V2, processes P1 and P2 share variable V0, and processes P2 and P3 share variable V1.a. Show how the processes can use enableInterrupt ( ) and
Enabling and disabling interrupts to prevent timer interrupts from invoking the scheduler is one way to implement semaphores. This technique can influence I/O scheduler is one way to implement
The following solution is alleged to be a solution to the critical section problem. Argue for its correctness or show a case in which it fails.shared int turn;shared boolean flag[2];proc(int i)
Dijkstra posed each of the following solutions as a potential software solution to the critical section problem and then explained why they failed [Dijkstra, 1968]. Provide your explanation about why
In the solution to the bounded buffer problem (Figure), consider the ordering of the first two P operations in the producer and the consumer. Suppose the order of the p(full) and the p(mutex)
Assume the writepending semaphore was omitted from Figure. Describe a simple sequence of reader and writer activity that causes the solution to fail for the second readers-writerspolicy.
Two processes, P1 and P2, have been designed so that P2 prints a byre stream produced by P1. Write a skeleton for the procedures executed by P1 and P2 to illustrate how they synchronize with one
The following is alleged to be a solution to the critical section problem. Argue for its correctness or show a case in which it fails.shared int turn; /*
In Chapters 4 and 5, you learned how device driver software synchronizes its behavior with device controller hardware (using the busy and done flags in the controller’s status register). In the
The sleepy Barber problem [Dijkstra, 1968]. A barbershop is designed so that there is a private room that contains the barber chair and an adjoining waiting room with a sliding door that contains N
Provide a scenario in which a process executing the V procedure in Figure will detect when s. value is less than or equal to 0 and s. hold is TRUE.
Suppose a machine’s instruction set includes an instruction names swap that operates as follows (as an indivisible instruction):swap (boolean *a, Boolean *b){boolean t;t = *a;*a =*b;*b = t;}Show
Semaphores are not implemented in older versions of UNIX, but processes with stdout of one process dirtected into stdin must synchronize their operation in a manner similar to that required in
Suppose processes P0 and P1 share variable V2, processes P1 and P2 share variable V0, and processes P2 and P3 share variable V1. In addition, P0, P1, and P2 run concurrently. Write a code fragment
Suppose process P0 uses variables V0 and V1 at the same time, process P1 uses variables V1 and V2 at the same time, and process P2 uses variables V2 and V0 at the same time. Further,
Construct a monitor that implements semaphores. This will demonstrate that a monitor can be used any place a semaphore can be used.
Suppose that you had created an OS facility that implemented monitors, but not condition variables. Show how to implement condition variables using Dijkstra semaphores.
Create a pseudo code solution for problem 4 using POSIX semaphores.
Create a pseudocode solution for problem 4 using Windows synchronization primitives.Suppose that you had created an OS facility that implemented monitors, but not condition variables. Show hoe to
The sleepy Barber Problem. A barbershop is designed so that there is a private room that contains the barber chair and an adjoining waiting room with a sliding door that contains N chairs (see Figure
Give an example of a concurrent application in which a sender process could use an asynchronous rather than a synchronous send ( ) operation. Provide another scenario in which the sender should use a
Explain why a concurrent application written using non-blocking message receive ( ) operations could require less real time to execute than if it were written using blocking receive ( ) operations.
Programmer-scheduled thread packages allow the programmer to control when each thread is executed and when it must wait. Calls to the thread package (executed by a thread) allow the programmer to
The Mach C threads and POSIX C threads libraries incorporate thread creation operations to create a new thread within a process’s address space. Read the documentation on either package and compare
Construct a C/C++ program for a UNIX environment to use the trapezoidal rule to approximate the integral ofƒ(x) = 1/(x+1)for the interval [0,2]. In quadrature (numerical integration), the value of
Solve the quadrature problem in the previous exercise using your local (C or POSIX) threads library. You will have to read online documentation for the thread package on your host OS, where you will
Draw a model like the one shown in Figure, for each of the following situations. Indicate whether or not there is deadlock in the situation. Assume that there is only one unit of each resource
Provide a scenario in which two threads in different processes are deadlocked, and another scenario in which two threads in the same process are deadlocked. Try to use instances of concrete (real)
Suppose three people are in a line waiting for a department store to open for “the big sale.” When the door opens, all three rush the door, bur the door is not big though for all of them to pass
In a music CD warehouse, sometimes orders become deadlocked because two different orders want the last two different CDs. For example, two people might simultaneously order “More Themes for Young
Reconsider the state diagram in Figure below. Suppose that instead of one resource type with two units of the resource, suppose the two processes shared two resource types with one unit of each type.
Identify safe, unsafe, and deadlock states in the state diagram shown in Figurebelow.
Assume a system with four resource types, C = , and the maximum claim table shown in Figure below. The resource allocator is considering allocating resources according to the table shown in Figure.
Reconsider the state-transition diagram in Figure. Describe, in words or with a diagram, a similar state-transition diagram for a system with three processes and a single resource type with two units
Based on what you studied in this chapter, explain how to change the code fragment in Figure so that deadlock cannotoccur.
Using the prevention strategy for invalidating the circular wait (Section 10.3), suggest a heuristic for avoiding the nested monitor call problem explained in Section 9.2.
A system is composed of four processes, {P1, P2, P3, P4}, and three types of serially reusable resources, {R1, R2, R3}. The number of units of the resources are C = <3, 2, 2>.a. Process P1
A system is composed of four process, {P1, P2, P3, P4}, and three types of consumable resources, {R1, R2, R3}. There is one unit each of R1 and R3 available.a. P1 request one unit of R1 and one unit
A system is composed of four processes, {P1, P2, P3, P4}, two types of serially reusable resources, {S1, S2}, and two types of consumable resources, {C1, C2}. S1 has two units and S2 has three units.
What is the distinction between a process address space and the primate memory addresses?
Redraw Figure using the names of the Linux/UNIX system tools used to prepare a set of C program modules-filel.c,file2.c, and file3.c- for execution. Explicitly label stdio and the C library, libc. a,
In Linux/UNIX, is it possible for the link editor to combine relocatable object modules created from compilers for different programming languages? Explain why or why not.
A memory manager for a variable-sized region strategy has a free list of blocks size 600, 400, 1000, 2200, 1600, and 1050 bytes.a. What block will be selected to honor a request for 1603 bytes using
A memory manager can sort the free list according to any criteria it chooses.a. How would the free list be organized for the best-fit policy?b. How would the free list be organized for the worst-fit
A certain OS supports four different address spaces for each process, called Sa, Sb, Sc, and Sd. Suppose the memory manager loads the four address spaces into physical memory as shown: What is the
Suppose a variant of UNIX provides a system call that returns a pointer to a block of memory in the system address space capable of being read from and written to by any process. Explain how a UNIX
If the operating system kept swap images-direct images of the program as it is stored in primary memory for execution – the images would have to be relocated when they were loaded back into primary
If a computer system does not have relocation hardware yet it implements swapping, then the memory manager will have to use a loader to recomputed the executable image from the absolute image. Would
Consider the code sequence shown in Figure below for a machine with the arrangement of segment relocation registers shown in Figure. Assuming the code segment register is loaded with 0100 when the
Figure is the simplified process state diagram with running, ready, and blocked states. Modify the diagram so that it includes new states to represent when a process is swapped out. Show the
Suppose a system has a disk with 2KB disk blocks and the average access time on a block is 20 milliseconds. A process holding 40KB of memory changes from the running state to the blocked state due to
Construct a C/C++ program for a UNIX environment to use the trapezoidal rule to approximate the integral off(x) = 1/(x + 1)for the interval [0, 2]. Construct your solution so that you compute the
Why are the page size, the number of pages in the virtual address space, and the number of page frames in the physical address space all a power of 2 in binary machine?
Suppose a paging system has 2g+h virtual addresses and uses 2h+k locations in primary memory for integers g, h, and k. Write an expression for the implied page size of the system. How many
Suppose the page size in a computing environment is 1KB. Give the page number and the offset for the following:a. 899 (a decimal number)b. 23456 (a decimal number)c. 0x3F244 (a hexadecimal number)d.
Showing 400 - 500
of 586
1
2
3
4
5
6