HW SW Final

Ace your homework & exams now with Quizwiz!

What actions does the operating system take when a program issues the open and close operations for a file that is to be read from disk?

------------------------------------------------- Open: ------------------------------------------------- 1. The operating system issues a system call (open operation), providing a path to a file. 2. The process accesses the kernel 3. The kernel uses the given path name to locate the file. 4. Given sufficient access to the file, the kernel then obtains a reference to the actual file data, beyond just the directory path name. 5. When the kernel has all needed information it puts the file in the open state. 6. The kernel then returns the handle to the process. ------------------------------------------------- Create: ------------------------------------------------- 1. The operating system issues a system call (Create Operation), providing a path to the disk location where the file is meant to be created. 2. The process accesses the kernel. 3. The kernel uses the given path name to locate the space on the disk where the file is to be created. 4. The kernel uses the locations reference information and stores it in the appropriate allocation tables. 5. The kernel puts the file in the open state. 6. The kernel then returns the handle to the process. ------------------------------------------------- Close: ------------------------------------------------- 1. The operating system issues a close operation with a given path to a file. 2. The process accesses the kernel 3. The kernel uses the given file information and path name to locate the file that is in the open state. 4. The kernel then stores the file back where it was originally opened from on the disk. 5. The kernel puts the file in the closed state. 6. The kernel then returns the handle to the process.

Explain what actions the memory management unit and operating system take during a page fault

1. The page table is checked for the memory reference. That page is not currently in memory which causes a page fault. 2. The OS memory manager locates the desired page on auxiliary storage and loads it into the free memory frame. 3. The page table is reset and the instruction is restarted. Excessive page faults can cause other applications to slow down or suffer, eventually leading to insufficient RAM from excessive faults.

Convert the following four unsigned binary numbers to decimal and show your work: 10111 10101 01010 111111 001111

10111 = 23 10101=21 01010=10 111111=63 001111=15

Form the two's complement of the following binary numbers 11111111 01111110 01111100 11111110

11111111=00000001 01111110=10000010 01111100=10000100 11111110=00000010

Given a disk where each track has 2,048 sectors and a block holds 512 bytes, how much data can be accessed without moving the disk heads. (what is the capacity of one cylinder?)

2,048 * 512 1,048,576 bytes

Convert 245 and 24 to binary. Using the subtraction rule, compute 24 - 245 in binary.

24 = 11000 245 = 11110101 11000-11110101 = 00100011

A particular computer has a memory address register that holds 31 bits. What is the maximum size memory this computer can have?

2^31= 2,147,483,648

Convert the following three hexadecimal numbers to both binary and decimal. 3e 3e0 3e00.

3e = 0011 1110 = 62 3e0=0011 1110 0000 = 992 3e00= 0011 1110 0000 0000 = 15,872

A hard disk has four surfaces (that's top and bottom of two platters). Each track has 2,048 sectors and there are 131,072 (217) tracks per surface. A block holds 512 bytes. The disk is not "zoned." What is the total capacity of this disk?

4 surfaces * 131,072 tracks * 2,048 sectors/blocks * 512 bytes 549,755,813,888 bytes ~549.76 GB

Convert the following decimal decimal numbers to binary using the division by two method 96 31 32 284 100

96=1100000 31=11111 32=100000 284=100011100 100=1100100

The process dispatcher of an operating system keeps running, ready and waiting queues . Describe what happens with respect to those queues when a running program requests an I-O operation from the operating system, while the I-O operation is in progress, and when the I-O operation completes.

A running program could move from running to ready only in the case of the OS using a preemptive scheduler such as Round Robin. A running program in the running queue could request an I/O operation, it would then move to the waiting queue until that I/O operation is performed. When the I/O operation for which the process was waiting gets completed the process then moves from the waiting queue to the running queue to continue

Explain in detail what is meant by the working set of a process Describe what happens if the size of the working set is greater than the available main memory (RAM)

A working set is the number of pages that meets the requirements of locality of a program Thrashing: when every frame of memory is in use, and programs are allocated just enough pages to meet their minimum requirement.

tell why the ARP protocol is needed

ARP is important because it is used for mapping IP addresses to physical machine's MAC addresses. This is needed because of the varying size of addresses between IP, Ethernet LAN, and other network devices. Without ARP a node could not communicate with another without knowing its MAC address.

Explain what the ARP protocol does and how it works.

ARP provides the MAC address of the node with a known IP address. If a node wants to communicate and it knows the destination's IP address but not the MAC address, the node sends a broadcast message containing the destination's IP address. The destination with that IP address replies, giving its MAC address. The original node then saves the IP and Mac address translation in an ARP table.

the difference between an amplifier and a repeater for transmitting data over distances.

Amplifies amplify the data in the signal, but also amplify any noise in the signal. Amplifiers just increase whatever input they receive. Repeaters first decode the input signal and extract only the data. They then regenerate and resend that data in mint condition.

Name and briefly describe the three characteristics of a sine wave signal that can be modulated to allow the signal to carry information.

Amplitude: The height or power of the sine wave. Phase: The position of a point in time on a sine waveform cycle. Frequency is the number of cycles per second or the number of times the sine wave is repeated per second.

What is an Ethernet collision? Explain the process by which Ethernet recovers from a collision.

An Ethernet collision is when channels of traffic are waiting on a third channel to send messages. When that third channel is done, the first two channels send messages at the same time causing a collision and both messages are loss. To recover from this both channels wait a random amount of time. One channel waits less and sends its message first and the other waits on it to finish.

Explain what a privileged instruction is and why they are needed.

An instruction that only the operating system can execute when in a specific mode. needed to allow the operating system to perform certain operations that other applications should not be allowed to perform.

Explain what it means to bootstrap a computer. In your answer, describe the steps executed by the hardware and software in bootstrapping a computer that is initially turned off.

Bootstrapping is responsible for being the first thing to work when you turn on your computer in order to load your operating system. Steps: 1. Execution begins with bootstrap loader that is stored in the ROM 2. It then looks for the OS program loader in a fixed location. 3. Next it loads the master boot record in the RAM 4. Then it transfers control to the starting location of the MBR 5. The MBR then loads the OS

Explain why programmed I-O is seldom used for general I-O operations?

CPU can't do anything while I-O is in process.

Explain how collisions are avoided in modern Ethernet network design

Collisions are avoided by dividing the network into many smaller collision domains. This is done through the use of hubs and switches in order to unsaturated the network and decrease the potential of collisions.

Explain how RAID can protect against disk hardware failure.

Data stored redundantly on multiple disks This is done by striping or duplicating data across several disks If one disk were to fail, the data can be recovered and the redundancy restored by rebuilding the array

Buses can carry three kinds of signals. What are they?

Data, Addresses, Control signals

Explain how frequency division multiplexing can be used to carry two or more independent information streams on one communication medium.

Each data stream I sent to its own modulator and has its own carrier frequency. Then all of the data streams are combined into a frequencies multiplexed data stream which contains the full spectrum of the combined streams. The streams are then separated, each going through their own filter in order to output separately

Advantages of Fiber optic cable

Fiber cables use light to carry signals and light waves have a much higher frequency. This higher frequency means a higher bandwidth. This increases the transmission capacity of a network greatly

Name and briefly describe three different uses for interrupts.

Freeing CPU from waiting for events Providing control for external input Notifying that an external event has occurred Allocating CPU time

A pipelined computer completes instructions more quickly by having more than one instruction at a time "in the pipeline." Explain what problem branch instructions cause with instruction pipelining. Describe one approach to overcoming this problem.

In branch instructions only one instruction is being completed at time. This causes issues when instructions have different numbers of steps. Solutions: using separate pipelines reordering instructions requiring that the following instruction not be dependent on the branch.

Explain why a hardware timer that can generate interrupts is necessary to support concurrent processing

In concurrent processing multiple processors execute instructions simultaneously. Tasks are broken down into subtask that are then assigned to different processors that are running at the same time. Because of all of this simultaneous execution, interrupts are necessary in order to halt certain processors while others are still executing.

Breaking messages to be sent over a communication facility into packets introduces overhead, a disadvantage. Name and briefly describe three advantages of packet-switched communications.

Increases channel efficiency because data is segmented into packets. Packers from several sources can share a single channel. They are an alternative to dedicating a channel for the entire length of the message

In a call instruction, it is necessary to save the program counter. Explain how the saved program counter is later used.

It can be used to retrieve whatever was stored at that program counter number

The IP protocol (and UDP) are called "connectionless" and "unreliable." Describe what those two words mean in the context of data communications.

It means that the protocol provides no indication of delivery.

What effect does larger disk sizes have on the reliability of RAID arrays? (Hint: What happens when a disk fails? How are data from the failed disk recovered, and how long does that take?

Larger drives = longer failed rebuild time longer rebuild time= greater chance of catastrophe

Cache memory is faster than main memory, but also much smaller. In general, cache memory is not large enough to hold all of an executing program. Explain how cache memory is able to speed up the execution of programs.

Locality of reference most memory references in cache memory are confined to a small region at any given time. This allows for a program to access this small amount of data that is close together very quickly.

Explain the relationship between the memory address register, the memory data register, and memory itself.

Memory itself is storage/writing of data in a specific location to be read. The memory address register is the location in the memory to read or write. The memory data register is the data that is transferred to or from memory.

What does it mean to "mount" or "unmount" a storage device? Explain why unmounting a device is necessary in the Windows operating system.

Mounting: makes it accessible by the compute . A mount is a physical location in the partition used as a root filesystem. Unmounting: the opposite of mounting. It takes a mounted device and makes it inaccessible by the computers to avoid corrupting files. necessary in Windows because to remove the device without unmounting risks pending I/O operations not hitting the disk leading to data loss and corruption

Explain why a computer instruction that operates on registers is faster than the same operation using data from main memory.

Registers are faster because they are directly on the CPU. Memory is slower because memory is physically away from the CPU and a bus must be used to retrieve data from memory.

List the steps a cache controller and memory take in the event of a cache miss

Send the address and read operation to the next level of the hierarchy. Wait for the data to arrive Update the cache entry with data, rewrite the tag, turn the valid bit on, clean the dirty data Resend the memory address until you get a hit

When a cache hit to a cache on the CPU chip occurs on a memory write the cache will be updated, but the main memory will not be unless the designers of the memory subsystem have taken steps to do so. What effect does a mismatch between cache and main memory have on a computer with two or more CPU chips?

The CPU would look for the data that is mismatched on the L2 cache and if not then found would continue on to the other caches if present. This allows it to still be quicker than using main memory.

DMA I-O frees the CPU to do other work while an I-O operation is pending. Using DMA I-O requires more complex controller hardware and more complex bus. In addition, there is an operational penalty/disadvantage that shows up while a DMA I-O operation is in progress. Explain what it is.

The I-O module steals cycles on the memory bus from the CPU, causing the CPU to wait anyway.

A file has filled its initial allocation on disk, and more data must be written. If the organization of the file system is non-contiguous (discontiguous) and linked, what steps must the operating system take to allow more data to be written?

The OS would need to add the new data and then add a link to the previous cluster pointing to the new data.

Explain how an Ethernet switch determines to which port to forward an incoming packet.

The switch learns by listening to traffic which devices are on which ports. If a device has been recognized previously the switch directs the packet to that port. Packets for unknown destinations are sent to all ports. The reply will tell the switch which port has the addressed device.

A modern CPU has a bit that can place the CPU in the system state or the application state. Briefly describe the difference between "system state" and "application state."

The system state is the core system that holds back ups and valuable core data such as a copy of the operating system and data needed for bootstrapping. The application state is the state that system primarily runs in for day to day tasks and navigating the OS

RISC computers generally execute more instructions per second than CISC computers. Describe the penalty or trade-off paid when adopting the RISC architecture.

There are few kinds of instructions used More statements are needed = less flexible

Distinguish between Type I and Type II virtualization

Type I: • The hypervisor runs directly on the hardware. • The hypervisor instantiates two or more VMs by abstracting the hardware interfaces. • Used mainly on servers Type II: • The VM manager runs as an application of some other Operating System. • Used mostly on clients.

Explain what a software interrupt is. Name and briefly describe one important application of software interrupts.

When software instructions causes the CPU to alter its normal flow of instruction execution. It can free the CPU form waiting for events and provide control for external input. This could be used to communicate with the operating system i.e. requesting for input/output.

John von Neumann

consultant working on the ENIAC project, one of the first computers invented proposed a computer system and architecture that is the basis of what we still use in present day Neumann's proposed architecture included several of the following parts: A CPU including ALU, memory, and CU. The control unit executed instructions that were read from the memory

Moving a file to a different directory on the same disk does not require making a new copy of the data in the file. Explain why not. What does happen when a file is moved from one directory to another on the same disk?

does not need to make a new copy of the data because the data is already on the disk, only the path has changed, or rather how the data could later be retrieved in the different directory has changed. When moved to another directory the data will get a new relative pathname, but will keep the same pathname beyond that since it is on the same disk.

What is the spectrum of a signal? What is the relationship between the spectrum of a signal and the bandwidth of a channel?

spectrum= The frequencies that make up a signal The bandwidth of a channel = range of frequencies that are passed by the channel with only a small amount of attenuation. To reproduce a signal faithfully the spectrum of the signal must fall within the bandwidth of the channel, and the bandwidth of the channel must be wide enough to pass all of the frequencies of the signals

Nyquist sampling theorem

the sampling rate of a component must be at least twice the highest frequency


Related study sets

Lesson 17: Real Estate Careers and The real estate license law

View Set

Semester 6, Exam 4, SGQ ENT/Laser (Wolford 2016B)

View Set

Relative Dating of Rock Layers by Principles

View Set

English I Honors: AQC Method of Annotation, Essay Writing and Thesis Statement (Mrs. Caceres)

View Set

Parkinson's Disease Practice Questions

View Set

Physics Chapter 22 mastering physics

View Set

Business Finance Final Exam (Chapter 8)

View Set

Chapter 18: Inferences about Means

View Set

Korean War Lesson Plan Guiding Answers

View Set