Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 3.4, Problem 1QE
Explanation of Solution
Drawback to controlling access to the resource:
- The resource can be used once in a process at a time.
- The resource is allocated in a strictly alternating fashion. After the process has used and relinquished the resource, the othe...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Software engineering case study homework (PLAGIARISM WILL BE DETECTED !!!)
Please provide an upload link for the file
This case study is about a simplified Payphone coin system.1. The minimum price of a communication is 10 ryals.2. After the introduction of the currency, the user has 2 minutes to dial his number (this time iscounted by a time counter).3. The line can be free or busy.4. The Payphone consumes money as soon as the called person picks up and at each time unitgenerated by the counter.5. You can add pieces of money at any time.6. At the time of the hang-up, the balance of the currency introduced (the rest of the money) isreturned.
Required work:From this statement, you are asked to:1. Establish the use case diagram of this statement.2. Construct a sequence diagram that describes the nominal scenario of Payphoning use case inthis statement.
Write a C program that gets a source file name from a user. If the file does not exist, it will generate a proper error and exits.If the file exists, it also gets the name of two more files from the user, say destination1 and destination2. These files don’t need to exist as they are files that need to be written to.
If the files cannot be opened for writing, a proper error will be generated.
The program then reads the source file line by line. It will copy every line that has a digit in it to destination 2 and lines that have no digit in them to destination 1. Feel free to use ctype’s isdigit() function to identify digit characters.
Example:
If source file is:Hi My name is VeriaHello My name is John. How can I help you?I have a problem with my giga bit internet. The speed should be around 1000 but it’s just 200
Sure! I can help with that.
Can I have your number in case we get disconnected?
Sure! My number’s 647-123-1234
First file (destination 1) should be
Hi My name is Veria
Hello…
Develop a shopping solution that has both client side and server side.
Server-side
⚫ A console application should be enough, it prints each response to the output window before
sending back to the client-side(s).
•
When it first runs, at least five pre-defined products with random quantities (1-3) should be
initialized. Which means products should be the same every time the server starts, and the
quantities for each product should be randomized.
At least 3 accounts should be created, each account has an account number and user's name.
• When the server is active, it should store ordering information to variable(s) (e.g., dictionaries,
lists). The server does not have to store the ordering information to the local system, so once
you shutdown the server, all information can be disposed.
• Server should send back appropriate response depending on the client's command. (Protocol
below)
• The handler code should be separated from the user interface (i.e., in a separate class - similar
to…
Chapter 3 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Ch. 3.1 - Identify examples of queues. In each case,...Ch. 3.1 - Which of the following activities require...Ch. 3.1 - Prob. 3QECh. 3.1 - Prob. 4QECh. 3.2 - Prob. 1QECh. 3.2 - What is the difference between application...Ch. 3.2 - Prob. 3QECh. 3.2 - Prob. 4QECh. 3.3 - Summarize the difference between a program and a...Ch. 3.3 - Summarize the steps performed by the CPU when an...
Ch. 3.3 - Prob. 3QECh. 3.3 - If each time slice in a multiprogramming system is...Ch. 3.3 - Prob. 5QECh. 3.4 - Prob. 1QECh. 3.4 - Suppose a two-lane road converges to one lane to...Ch. 3.4 - Prob. 3QECh. 3.4 - Prob. 4QECh. 3.5 - Prob. 1QECh. 3.5 - Prob. 2QECh. 3.5 - If a process in a multiprogramming system could...Ch. 3 - List four activities of a typical operating...Ch. 3 - Summarize the distinction between batch processing...Ch. 3 - Prob. 3CRPCh. 3 - Prob. 4CRPCh. 3 - What is a multitasking operating system?Ch. 3 - Prob. 6CRPCh. 3 - On the basis of a computer system with which you...Ch. 3 - a. What is the role of the user interface of an...Ch. 3 - What directory structure is described by the path...Ch. 3 - Define the term process as it is used in the...Ch. 3 - Prob. 11CRPCh. 3 - What is the difference between a process that is...Ch. 3 - What is the difference between virtual memory and...Ch. 3 - Suppose a computer contained 512MB (MiB) of main...Ch. 3 - What complications could arise in a...Ch. 3 - What is the distinction between application...Ch. 3 - Prob. 17CRPCh. 3 - Summarize the booting process.Ch. 3 - Why is the booting process necessary?Ch. 3 - If you have a PC, record the sequence activities...Ch. 3 - Suppose a multiprogramming operating system...Ch. 3 - Prob. 22CRPCh. 3 - Prob. 23CRPCh. 3 - Prob. 24CRPCh. 3 - Prob. 25CRPCh. 3 - Would greater throughput be achieved by a system...Ch. 3 - Prob. 27CRPCh. 3 - What information is contained in the state of a...Ch. 3 - Identify a situation in a multiprogramming system...Ch. 3 - List in chronological order the major events that...Ch. 3 - Prob. 31CRPCh. 3 - Prob. 32CRPCh. 3 - Explain an important use for the test-and-set...Ch. 3 - Prob. 34CRPCh. 3 - Prob. 35CRPCh. 3 - Prob. 36CRPCh. 3 - Prob. 37CRPCh. 3 - Each of two robot arms is programmed to lift...Ch. 3 - Prob. 39CRPCh. 3 - Prob. 40CRPCh. 3 - Prob. 41CRPCh. 3 - Prob. 42CRPCh. 3 - Prob. 43CRPCh. 3 - Prob. 44CRPCh. 3 - Prob. 45CRPCh. 3 - Prob. 46CRPCh. 3 - Prob. 47CRPCh. 3 - Prob. 48CRPCh. 3 - Prob. 49CRPCh. 3 - Prob. 50CRPCh. 3 - Prob. 51CRPCh. 3 - Prob. 52CRPCh. 3 - How is the window manager related to the operating...Ch. 3 - Prob. 54CRPCh. 3 - Prob. 55CRPCh. 3 - Suppose you are using a multiuser operating system...Ch. 3 - Prob. 2SICh. 3 - Prob. 3SICh. 3 - Prob. 4SICh. 3 - Prob. 5SI
Knowledge Booster
Similar questions
- In this project you are to design a process queue that is responsible for handling the process requests coming from different users. You have to take into consideration that users have different levels of privileges and priorities. Each user has an identification number and a password, in addition to process priorities. One good idea is to design the queue using an array or pointers while preserving the first-in first-out concept of the queue. For every process request received, the program should check the privileges of that request and whether it can be moved forward in the queue to be served by the operating system prior to serving the other requests. Using the programming language of your choice (preferably C+), write the process queue that would handle the user request. The program must allow for requests coming from different users or from one user.arrow_forwardModify your code so that before the game begins, the player is asked whether they wish to enter their guesses manually, or to automatically guess based on pre-supplied guesses in a file. If the first option is chosen, then the game should progress in the same fashion as in the tasks above. If the second option is chosen, then the following actions should be taken: Firstly, the player should be asked to enter a filename. If the player enters an invalid filename, they should be re-prompted until they enter the name of a file that actually exists. This file should then be read and interpreted as a text file, where each line contains a separate guess. For example, a sample file input.txt may contain the following text: 1234 4321 5830 8437 1489 3271 2530 You may assume that each line of the file contains a valid guess. Once the file has been read, then the game should proceed as normal. However, when the player would be prompted to enter a guess, the next guess in the list of pre-supplied…arrow_forwardThe correct statements are: The initial configuration of a DFSM is (s, w). The initial configuration of a DPDA is (s, w, €). The initial configuration of a DTM is (s, Bw). (Note: B indicates a blank symbol) For DFSM, (q, €) where q € A is an accepting configuration. For DPDA, (q, €, €) where q € A is an accepting configuration.arrow_forward
- A dentist office is currently using paper files to manage all office activities. To make their work easier, the office decided to build a software system to manage those activities instead of using their old paper-way methods. The office patients can take their appointments either by phone or by walking in person to the office lobby. In either way, the receptionist schedules an appointment for the patient with the desired date and time. The system shall not allow scheduling appointments with the same doctor for a duration of less than 30 minutes. Of course, the system shall accept appointments for a specific doctor if the doctor is working on that time. This means that the system shall keep track of each doctor working schedule. The office receptionist enters doctors working schedule in the form of working days for each week. For example, a doctor work schedule can be on Monday, Wednesday, and Thursday from 9:00 am until 4:00 pm for all weeks until June 01, 2021. Now, the office…arrow_forwardEXCERSICES 1. Use the template below to write a C-program that creates two processes: "Process A" (the process with which the program starts execution) and "Process B" (A's child). The Process A forks Process B. To identify which process writes the output, each process puts its id at the beginning of each line (see the sample output). Each process performs the following operations. Process A: After spawning Process B, it waits for Process B to terminate. After Process B's termination, it will write your home directory (use HOME environment variable) and its process ID, and terminates. Process B: After being spawned from Process A, it sleeps for three seconds (using sleep(). Then, it writes process IDs of itself and Process A immediately. After that, executes ps command (using system library) and terminates. Sample output: -/a.out 9181:1 am the parent, I will create child process 9182:1 am the child, I will sleep for 3 seconds 9182:My parent pid is 9181 9182:the ps command PID TTY TIME…arrow_forwardThere are 45 students in a class, and the averages of these students are kept in a "sequential process file". You are asked to write a program like this:When the program is run for the first time, it checks whether the "notes.txt" file exists, if there is no file, it creates the file and writes it in the form of "ID POINT" for 45 students with IDs from 1 to 45 and with score values of 0. So the initial state of the file will be as follows.1 02 03 0...44 045 0If the file already exists, the existing file should be opened and the point values in the file should be used. The program will then receive the ID and SCORE from the user and change the grade given to the student with the relevant ID to the current average. If the ID is entered as 0, the program will terminate and the current average values will be written to the file.You can check if the file exists as follows.bool file_varmi(string filename){Ifstream f(name)Return f.good()}Note: It is sufficient for each student to write…arrow_forward
- For each of the following isolation levels, give an example of a schedule that respects the specified level of isolation but is not serializable: a. Read uncommitted b. Read committed c. Repeatable readarrow_forwardb) Create the following path expressions. There can be only 4 instances of B at any given time, concurrently to this the processes A and C work maximally one instance in mutual exclusion. 4:(B), 1: (A; C) The process C has to be executed before th concurrent processes A and B. C:(A, B) Process A can be executed, after the process B or C have been finished. B and C can be active with two incarnations. 2: (B, C); Aarrow_forwardusing c++ In this assignment you are going to implement your own version of university library system,Thesystem will have two different sides , the first one is to help the librarian to do his job and the other side for admin to manage every one permissions in the system , so You should provide the following features in your system: Admin view o Add/remove Studentso Add/remove librarian o Add/remove other admins Librarian viewo Add/Delete bookso Issue/Return bookso View bookso View Issued bookso Log in /log outo Search for the book(id/name) Simple backend for your system , You could use a file each row should represent itemo Books File should be something like:Id , Book Name, Author Name, Available quantity, Issued Quantity1,Oliver Twist, Charles Dickens,98,2In the previous the first row was the name of each column , you can do that or handle it in your code , id =1 , Book Name =Oliver Twist ..Etc. Tables neededo Books Id Book Name Author Name Available quantity Issued…arrow_forward
- implementation of Caesar Cipher Using Python Write Code: You are required to implement the Caesar Cipher encryption/decryption algorithm in Python. Remember to implement the algorithm in such a way that it takes a file as input, encrypts it and store in the current directory. This encrypted file must checkable. The implementation must have a decryption procedure which takes the encrypted file from the current directory, decrypts it and store it with some specific name in the current directory. The name should be different from the original file so that it can be verified.arrow_forwardConsider the following scenario: A school wants to automate their attendance taking. Attendance will be taken via a web interface. Each teacher can log in to the system and see a list of classes they are teaching. The teacher can choose one of those classes and be presented with a list of students who are enrolled in that class. The teacher can then set the attendance status of the students (present/absent) and submit the form, which should update the attendance record of the class for that time. Students can log in and check their attendance record on a per class basis. Only the assigned-teacher or the principal can give attendance for a class. In case the assignedteacher is absent, the principal must first assign another teacher for the class for that particular day. The temporary-assigned-teacher can then take attendance for the class, only for that day. The system must record this event for cases of attendance record dispute. A teacher may be the assigned teacher of more than one…arrow_forwardMutual Exclusion: Select all of the following statements that are true. The Peterson Algorithm does not rely on the mechanism of busy waiting. The Peterson Algorithm is a purely software-based solution to the mutual exclusion problem. The only way to guarantee the atomicity of operations is to disable interrupts. Mutex Locks are an API offered by operating systems to protect critical sections. In order to enter a critical section protected by Mutex Locks, the release() operation must be executed first. The test_and_set instruction is atomic.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks ColeC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning