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

Operating System Concepts - Assignment Example

Cite this document
Summary
The present assignment entitled "Operating System Concepts" dwells on the concept of a user-level thread library. As the author puts it, a user-level thread library provides support for thread creation, scheduling, and management with no support from the kernel…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER92.3% of users find it useful
Operating System Concepts
Read Text Preview

Extract of sample "Operating System Concepts"

 Operating Systems Assignment 1. (20 points) If the operating system has a user-level thread library what, if any, issues must be addressed to support concurrent programming? Provide a detailed answer. A user-level thread library provides support for thread creation, scheduling and management with no support from the kernel. Supporting concurrent programming is paramount in a user level thread library. Yet, to do concurrent programming is not easy as various operations interleave among threads making the execution of program un-deterministic. To support concurrent computation, at user level thread, we must address the following issues thus: 1. Scheduling of threads: Usually it's done by default scheduling which user-level thread library does. Usually four approaches are used by multi processors Load Sharing, Gang Scheduling, dedicated processor assignment and Load Sharing. For concurrent programming I support Gang Scheduling as a set of related threads are scheduled to run on the same time. 2. Methods and Object Synchronization (mutual exclusion): One process should be able to use only one resource at a time. The request by other process should be delayed till the resource has been released. 3. Deadlock prevention: Deadlock can be prevented by using different schemes or by avoiding the necessary conditions (mutual exclusion, hold and wait, no preemption and circular wait (Stalling, 274)) which hold true for it. The different schemes are: requesting all resources at once Preemption Resource ordering 2. (20 points) Given that the first three necessary conditions for a deadlock are in place, provide detailed comments on the feasibility of the following strategy and the potential outcomes based upon its application. All processes are given unique priorities. When more than one process is waiting for a resource and the resource becomes available, allocate the resource to the waiting process with the highest priority. The first three conditions for the deadlock are: Mutual exclusion: It holds for non shareable resources. Shareable resources do not need mutual exclusion but all resources cannot be shareable, hence the condition holds. Hold and Wait: To make sure that hold-and-wait condition never occurs, we make sure that a process which requests resource does not hold any. No Preemption: There cannot be preemption of resource that has already been allocated. Now, in the given scenario all processes have their unique priority. Let us assume there are two resources R1 and R2 and process P1 has higher property than P2. Consider P1 holds R1 and P2 holds R2 and P2 is requesting for R1. Now, if P1 requests for R2 it will not get the resource even if it has the higher priority, because resources are non preemptive. So deadlock is still possible in this condition. 3. (20 points) Given a four level hierarchical storage system consisting of: cache, primary storage, secondary storage, and tertiary storage. Assume the following: programs may be executed on any of the four levels; each level consists of the same amount of real storage and the range of addresses on each level is identical. The speed at which programs are run is grouped from slowest (tertiary storage) to fastest (cache), where each layer is 10 times faster than the previous lower layer. There exists one CPU in this system, which may run one program at a time. Should information be allowed to move from any level to any level or should transfers only occur from adjacent levels? Explain in detail. If we allow transfer from any level to any level then it requires direct interconnection between each level. This will be too complex and so is not a recommended approach. Another way to transfer data is centralized approach. Means every level must be connected to one central level (for e.g. primary storage). So in this data can be transferred from any level to any level by routing through the central level. This will require less interconnection. The last approach is transfer of data b/w adjacent levels. But due to serial connection there will be more delay in the transfer. 4. (20 points) Gopher Gallery consists of a shopping mall and a cart ride that covers the 150 acre habitat. There are m visitors and n single-person vehicles. Visitors stroll around the mall at their leisure, then line up for the cart ride. When a cart is available, it allows the single passenger to climb aboard and drives around the habitat for a random amount of time. If the n carts are all taken, then a future rider waits; if a vehicle is available but no one is waiting, then the vehicle waits. The solution to this problem must synchronize visitor tasks and vehicle tasks using semaphores. Below is a potential solution. Correct any issues with this code, if any exist. Explain your position in detail. Visitor() { vehicleAvailable.wait(); vehicleTaken.signal(); vehicleFilled.wait(); visitorReleased.wait(); } Vehicle() { while(True) { vehicleAvailable.signal(); vehicleTaken.wait(); vehicleFilled.signal(); Drive through habitat for some arbitrary amount of time; vehicleReleased.signal(); } } First, we should analyse the vehicle part. The semaphore first transmits the signal of availability. When it's been taken the semaphore value is decreased due to wait condition. The signal operation will again increment the value on release. Now, the visitor will be receiving a signal if the cart is available. The value will be increased (for other visitors) when it's taken and the wait condition will again decrease semaphore value on release. The given solution is correct. But there is an unnecessary semaphore “vhicleFilled”. This semaphore can be removed from the code without affecting the results. 5. (20 points) Given the following statements, justify which are true and which are false: a. Timesharing systems normally use non-preemptive CPU scheduling. (False) CPU scheduling decisions may take place when a process switches from running to ready state or switches from waiting to ready which is preemptive scheduling. b. Response times are less predictable in preemptive vs. nonpreemptive systems. (False) It's more a function of scheduling algorithm. c. Shortest remaining time first always has a lower response time than Shortest Job First.( True) If we assume that SJF is non preemptive d. Since Shortest Job First gives preference to short jobs, it is useful in timesharing systems. ( False) it may cause starvation. Works Cited Silbershatz, G. G. (2004). Operating System Concepts. Wiley. Stalling, W. (2001). Operating System. Prentice Hall. Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Operating System Concepts Assignment Example | Topics and Well Written Essays - 1000 words”, n.d.)
Operating System Concepts Assignment Example | Topics and Well Written Essays - 1000 words. Retrieved from https://studentshare.org/information-technology/1722034-operating-system-computer-science-programming-background-required
(Operating System Concepts Assignment Example | Topics and Well Written Essays - 1000 Words)
Operating System Concepts Assignment Example | Topics and Well Written Essays - 1000 Words. https://studentshare.org/information-technology/1722034-operating-system-computer-science-programming-background-required.
“Operating System Concepts Assignment Example | Topics and Well Written Essays - 1000 Words”, n.d. https://studentshare.org/information-technology/1722034-operating-system-computer-science-programming-background-required.
  • Cited: 0 times

CHECK THESE SAMPLES OF Operating System Concepts

Building a Hackintosh

One of the reasons why people use different OS is because of the security that they find in using one type of the operating system.... People have a belief that the operating system they chose to use has a big probability of providing protection and security to the files which have been stored in the computer (Chaubal 117).... They believe a certain operating system can be able to protect information that has been put in place by the users and thus view it as advantage of using the operating system instead of the others which have been built to serve the same purpose....
6 Pages (1500 words) Essay

Process Control Block

Process control block (PCB) is an integral data structure because each PCB contains the processing information required by the operating system.... Simply put, it is where the operating system stores all pertinent information in a specific process.... Since the fundamental task of any OS is the management of processes, PCBs are accessed and amended by every module in the operating system - these are the elements that are in control of allocation of resources, synchronization, memory management, scheduling, system monitoring and interruption processing (Stallings, 2004). … A process is an executed program....
4 Pages (1000 words) Essay

The Development Of The Computer Technology

Any type of dynamic storage allocation system imposes both CPU and memory costs.... The costs often strongly affect the performance of the system and pass directly to the purchaser of the hardware as well as to software project schedules.... This essay "The Development Of The Computer Technology" discusses the jobs or programs which are to be executed by the Central Processing Unit (CPU) are kept in a job pool or process pool… The virtual memory would further impress the development of larger and complex applications to make sure that various operations are performed with the impression of making the right choice for memory utilization and CPU resources the various complexities make sure that all the techniques for using memory effectively are identified and made sure to use the various shared resources by itself....
3 Pages (750 words) Essay

IDS Policy Parameters and Network Intrusion

Operating System Concepts (7th Edition).... These could comprise user shell commands, process system calls, as well as network packet headers or contents.... In a complicated type of action, a system might clearly redirect an intruder's action to a trap.... The main goal behind this policy implementation is to protect the system from the outer assaults on the corporate network.... Preventing un-authorized system entrance 3....
2 Pages (500 words) Essay

Operating System Concepts: The Fragmentation of the Network Packet

Operating System Concepts (7th Edition).... The developers and designers of the network don't have the choice to decide some greatest packet size they would generally want like there are a variety of aspects… uld be considered like that operating system, hardware, following a number of (inter)national quality standards, protocols, need to minimize error tempted in transmissions to a number of degree and need to stop one packet from holding the communication channel for a long FRAGMENTATION Fragmentation Affiliation Fragmentation In this age of technology every network requires a number of utmost sizes onits network transmission packets....
2 Pages (500 words) Essay

Operating Systems, Process Concept, and State

The operating system provides schedulers for managing the selection of processes and queues.... Process Control BlockThe operating system maintains a Process Control Block (PCB) for every process.... hellip; In a time-shared computer system the CPU activities are termed are programs.... The paper "operating Systems, Process Concept, and State" summarizes the programs loaded into memory are termed as processes, the latter passes through various queues during the course of its lifetime....
5 Pages (1250 words) Research Paper

Windows Upgrade Report

Operating System Concepts, 6ED, WINDOWS XP, 7,8.... There is a clear separation between the operating system and the application programs in Windows XP.... There is a clear separation between the operating system and the application programs in Windows XP.... As a result applications which could get into the peripheral openly in the earlier versions could now run through the operating system sequentially to get to the peripherals....
2 Pages (500 words) Essay

Client-Server Communications Technology

This paper “Client-Server Communications Technology” discusses the connection and connectionless client-server communications in detail.... The main aim of this research is to rationalize the main network communication protocols in terms of connection and connectionless oriented communication systems....
7 Pages (1750 words) Research Paper
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