...Operating system concepts(Seventh edition) 2008.3 solutions to the exercises Chapter 1 1.1 In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. a. What are two such problems? b. Can we ensure the same degree of security in a time-shared machine as in a dedicated machine? Explain your answer. Answer: a. Stealing or copying one’s programs or data; using system resources (CPU, memory, disk space, peripherals) without proper accounting. b. Probably not, since any protection scheme devised by humans can inevitably be broken by a human, and the more complex the scheme, the more difficult it is to feel confident of its correct implementation. 1.2 The issue of resource utilization shows up in different forms in different types of operating systems. List what resources must be managed carefully in the following settings: a. Mainframe or minicomputer systems b. Workstations connected to servers c. Handheld computers Answer: a. Mainframes:memory and CPU resources, storage, network bandwidth. b. Workstations: memory and CPU resouces c. Handheld computers: power consumption, memory resources. 1.3 Under what circumstances would a user be better off using a timesharing system rather than a PC or single-user workstation? Answer: When there are few other users, the task is large, and the hardware is fast, time-sharingmakes sense. The full power of the system can be brought to bear on the...
Words: 26526 - Pages: 107
...Who is the creater of CP/M? [Kildall] Who is the head of the Multics project. [Carbato] Which OS’s process scheduler reduces priority and increases quantum. [CTSS] Which one is the difference between a semaphore and monitor. [Last choice] If a system has 16 drives and each process can have 4 drives. What is the maximum number of n that the system is deadlock free. [5] Given the sequence below which processes will cause a page fault. (for FIFO – LRU) Write a loop that would create 10 child processes. (No more than 10). If a file is shared by two processes, can have read-only and the other read-write access. If yes how, if not what prevent it. What are some of the security features in UNIX or NT. How does NTFS directory system work. How does UNIX directory system work. Pick a Unix UNIX process scheduler and explain how (not why or when) it favors I/O bound processes to CPU bound processes. Explain and compare I/O software (programmed, interrupt, DMA). What is the problem with RAID4 and explain how RAID5 solves the problem. Disk arm scheduling algorithms readuce read time but what does Linux additionally do. How does Workingset Clock algorithm work. If seektime is 8msec and each track is 160KB. What is the access time to read 4KB. Couffman listed four requirements for a deadlock. Describe fourth one and how to prevent it. What are the advantages of inverted page tables. What is a soft link. Implement soft link and hard links...
Words: 278 - Pages: 2
...Fall 2011 COMP 3511 Homework Assignment #1 Solution Handout Date: Sept. 22, 2011 Due Date: Oct. 6, 2011 Name: ______________ ID: ___________________ E-Mail: _____________ COMP 3511 L __ Please read the following instructions carefully before answering the questions: You should finish the homework assignment individually. There are a total of 4 questions. When you write your answers, please try to be precise and concise. Fill in your name, student ID, email and Section number at the top of each page. Submissions without this information will be discarded. Please fill in your answers in the space provided, or you can type your answers in a Word file. Homework Collection: the hardcopy is required and the homework is collected at the collection box (#6, #7) or in class. (22 points) Please answer the following question in 2-3 sentences 1) (8 points) What is the benefit of Direct Memory Access (DMA)? Is interrupt still needed when a DMA is used? Can DMA operations possibly interfere with CPU operations? 1. Answer: This frees up the CPU during I/O operation, so the CPU can be better used; Or to improve the CPU utilization (3 points). Interrupt is still needed when the DMA operation is completed in order to inform the CPU (2 points). If a DMA and CPU access memory at the same time, it can interfere with each other (3 points). 2) (4 points) Why is it necessary to separate user mode and kernel mode? Answer: This provides some level of protection so that user programs...
Words: 1136 - Pages: 5
...Chapter 2 OPERATING SYSTEM CONCEPTS SYS-ED/ Computer Education Techniques, Inc. Solaris System Administration: Introduction Operating System Concepts Objectives You will learn: • Operating system components. • Solaris usage of processes. • File management and file systems. • Use of the Solaris Management Console. SYS-ED/COMPUTER EDUCATION TECHNIQUES, INC. (Solaris – System Admin: Intro - 6.5) Ch 2: Page i Solaris System Administration: Introduction 1 Operating System Concepts Operating System: Definition An operating system is the set of programs that controls a computer. The core of the operating system is the kernel. The kernel is a control program that functions in privileged state that allows all hardware instructions to be executed. It reacts to interrupts from external devices and to service requests and traps from processes. The kernel creates and terminates processes and responds to requests for service. Operating systems are resource managers. The main resource is computer hardware in the form of processors, storage, input/output devices, communication devices, and data. Operating system functions include: • Implementing the user interface. • Sharing hardware among users. • Allowing users to share data among themselves. • Preventing users from interfering with one another. • Scheduling resources among users. • Facilitating input/output. • Recovering from errors...
Words: 2421 - Pages: 10
...UNDERSTANDING THREADS Simply put, a thread is a program's path of execution. Most programs written today run as a single thread, causing problems when multiple events or actions need to occur at the same time. Let's say, for example, a program is not capable of drawing pictures while reading keystrokes. The program must give its full attention to the keyboard input lacking the ability to handle more than one event at a time. The ideal solution to this problem is the seamless execution of two or more sections of a program at the same time. Threads allow us to do this. A process is essentially a "heavy" unit of multitasking: as an approximation, think of it as an "application" (though it can include 'background' or 'system' processes such as your battery monitor, mouse and keyboard server, PDA synchronization tool etc). A thread, on the other hand, is a more "lightweight" unit. Threads are can be seen essentially sub processes. Informally, we can think of them as tasks that belong to a program and that can run "simultaneously". For them to run simultaneously, each of these two tasks will run in a separate thread. Depending on the number of CPUs available and the number of competing threads, some of those threads actually will run in parallel on different CPUs, whilst in other cases the illusion of simultaneous execution will be achieved by "juggling" threads in and out of the available CPUs. A part of the OS called the thread scheduler takes care of deciding...
Words: 1652 - Pages: 7
...Chris and Pat Smith, and Martin and Miller decided it was best to have a termination contact set in place to secure all partakers in their final decisions. They noted it was best for all to have precise, clear explanations all of all essential fundamentals for the termination of their business partnership. An acknowledgement of the effective termination date would need to be set, and all potential risks, if any, should be stated for all parties. The owners and the chefs would meet for a period of 30 minutes and try to dissolve their partnership. The owners and the chefs blame each other for the failure of At Your Service; however, all partakers should act as responsible, mature adults during the meeting. It would speed up the termination process; especially if all partakers can...
Words: 368 - Pages: 2
...Case Study Tresa Jellison HCS/483 November 12, 2012 Dr. Kaderie Case Study The basic IT implementation process is the whole process of setting up and running an IT based program for a company. It starts from the beginning to the end of the process and throughout the whole process even after the last step has been taken. You have the planning stage, and this will include what exactly what you are looking for and what you want the program to do and how it will operate. Who will be using this program and who will it be beneficial to. You will have to go and get bids or quotes from companies that can provide this type of service. Depending on what is being implemented you have to do weeks, months and even years of research to ensure that the program will benefit everyone involved and that time and money is not being wasted. A lot of the things that were done are this analysis did not follow the fundamentals of implementation. During the execution of the program there where many bugs that had to be fixed that could have been prevented if the right questions and queries where ran before going live. There should have been a trial or practice run before the whole system went live. And they should have not done it at all of the sites. Only a couple of the sites should have had the program and should have been using it to get the bugs out. There were way off budget and there were a lot of hidden details that should have been reported. At least this way there would have...
Words: 581 - Pages: 3
...Labs Lab 4.1: Using Linux Command-Line Basics What is the purpose? This lab demonstrates how to redirect data from a process and how to identify and kill a process. What are the steps? • Task 1: Redirecting and piping standard output Procedure 1. Obtain a list of files from the home directory, including the hidden files. Redirect the output to a file named Listing by using the ls -a > listing command. 2. Obtain a long list of files, including the hidden files, and append the output to the same file. 3. Use the cat listing | less command to view the file and pipe the output to less. 4. Use the cat command to view the file again. However, this time, pipe the output to lpr to print the file. 5. Redirect the output of ls to the special file /dev/null. What happens? It’s redirected to dev/null Why? It’s null. • Task 2: Putting tasks in the background and terminating the job Procedure 1. Use the tail –f command to view your listing file from the previous task. The –f option tells tail to follow changes; therefore, the file will continue to run this command until you cancel the command by pressing Ctrl+C. Put the file in the background using the tail -f listing & command. You may need to press Enter again to view the command prompt. 2. Put the process in the background and display the prompt again. Run the top command in the foreground. This will provide you a list of your top 20 processes by CPU usage. Put this list in the background and stop it by pressing...
Words: 780 - Pages: 4
...are compared. Process Management, File Management, Memory Management, and Security are going to be compared between Windows, Linux, UNIX, and Mac operating systems. Every operating system is different and is interesting to see how every piece of software has the same outcome but has different procedures in between. Process management is defined as how the OS manages multiple programs running at the same time. A thread is a feature of an OS that enables parallel processing within a single process. UNIX, Windows, and Mach are all multitasking systems that support both processes and threads. They can be compared in several respects with regard to the process management features. When executing a program on UNIX, the system creates an environment for that program. In this setting there is everything needed to execute that program. The OS tracks processes though a five digit number Recognized as the Process ID. Each process has its own unique PID. PID’s ultimately repeat because all the probable numbers are used, and the next PID repeats the system again. At any time, no two Processes with the same PID occur in the system, because it is the PID that UNIX uses to track its processes. Each UNIX process has two ID numbers. The PID or process ID, and PPID or Parent process ID. Each user process in the system has a PPID. Normally, when a child process is killed, the parent process is told by a SIGCHLD signal. Then the parent can do another task, or restart a new process as needed. When...
Words: 452 - Pages: 2
...When being ask a question in today’s society, the automatic answer or reaction in order find a solution would be through the use of technology. We as the people have grown dependent on the world of the Internet, the accessibility of our phones and uses of clocks. A thought that we find hard to comprehend is that just about thirty years ago some of these tools did not exist. How has technology affected our minds and the way we think or even process information? Can we say we have turned our brains into a living computer, or are so dependent on outside answers that we have stopped thinking for ourselves? Now and days we have entered a state of obliviousness on how little knowledge and wisdom we truly have. It is very interesting to think about on how technology especially the television could affect our attention span and the information that is being given to us. In Postman’s “Amusing Ourselves to Death” he states a precise point “the average length of a shot on network television is only 3.5 seconds, so that the eye never rests, always has something to see” (86). This statement alone shows and proves on how peoples attention span is constantly shifting and changing focus to see what else is there is to see or what is next to come. As the Internet becoming more useful to people, written stories or narratives are becoming more extinct. In the article “The Transition to Digital Journalism” the author Paul Grabowicz’s stated, “Younger people in particular are said...
Words: 1235 - Pages: 5
...SYSTEM Thread of execution is the smallest sequence of programmed instructions that can be managed independently by an operating system scheduler. The scheduler itself is a light-weight process. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process. Multiple threads can exist within the same process and share resources such as memory, while different processes do not share these resources. In particular, the threads of a process share its code and its context . On a single processor, multithreading is generally implemented by time-division multiplexing (as in multitasking): the processor switches between different threads. This context switching generally happens frequently enough that the user perceives the threads or tasks as running at the same time. On a multiprocessor or multi-core system, threads can be truly concurrent, with every processor or core executing a separate thread simultaneously. Many modern operating systems directly support both time-sliced and multiprocessor threading with a process scheduler. The kernel of an operating system allows programmers to manipulate threads via the system call interface. Some implementations are called a kernel thread, whereas a lightweight process (LWP) is a specific type of kernel thread that shares the same state and information. Threads are created like normal tasks, with the exception that the clone() system call...
Words: 993 - Pages: 4
...COMP3361 Operating Systems I Mid-term Review and Study Guide Basic Concepts: What is an operating system? A program that acts as an intermediary between a user of a computer and the computer hardware - basic functions? 1.) OS is a resource allocator 2.) manages all resources 3.) decides between conflicting requests for efficient and fair resource use 4.) OS is a control program 5.) controls execution of programs to prevent errors and improper use of the computer 6.) a program running at all times on the computer, usually called the kernel 7.)everything else is either a a.) system program: associated with the OS but not part of the kernel b.) application program: not associated with the OS user/kernel modes of operation? 1.) The operating system must ensure correct operation of the computer system. To prevent user programs from interfering with the proper operation of the system, the hardware has two modes: user mode and kernel mode. Various instructions (such as I/0 instructions and halt instructions) are privileged and can be executed only in kernel mode. 2.) Kernel Mode In Kernel mode, the executing code has complete and unrestricted access to the underlying hardware. It can execute any CPU instruction and reference any memory address. Kernel mode is generally reserved for the lowest-level, most trusted functions of the operating system. Crashes in kernel mode are catastrophic; they will halt the entire PC. 3.) User Mode In User mode...
Words: 2427 - Pages: 10
... 5 | donothing | 588,054 | 6 | mas001 | 472,296 | Exhibit 1 : OVERALL TEAM STANDING Decisions Made A summary of the rationale behind the key decisions made would perhaps best explain the results we achieved. . Decision 1 Day | Parameter | Value | 54 | station 1 machine count | 2 | When the exercise started, we decided that when the lead time hit 1 day, we would buy one station 1 machine based on our analysis that station 1 takes the longest time which is 0.221 hrs simulation time per batch. (Exhibit 2: Average time per batch of each station). As day 7 and day 8 have 0 job arrivals, we used day 1-6 figures to calculate the average time for each station to process 1 batch of job arrivals. Base on the average time taken to process 1 batch of job arrivals, we were able to figure out how many batches each machine can handle. day | number of jobs arriving each day | utilization of station 1, averaged over each day | utilization of station 2, averaged over each day | utilization of station 3, averaged over each day | 1 | 2 | 0.433 | 0.079 | 0.019 | 2 | 2 | 0.272 | 0.158 | 0.108 | 3 | 1 | 0.398 | 0.106 | 0.165 | 4 | 0 | 0 | 0.052 | 0 | 5 | 2 | 0.33 | 0.079 | 0.06 | 6...
Words: 1324 - Pages: 6
...children are constantly disobedient, acting out at school or in public places, it makes the parent look bad and feel bad. At times, an anxious child likes to stick things in his or her pockets that do not belong to him or her or the child do not like to share things, when the time is appropriate. When out of control a child tends to talk back often trying to push the parent’s limits. After being loud, out of control and defiant continuously after being warned about a problem or punished in a less severe way repeatedly before actually being spanked, If the child still does not want to be obedient after the necessary steps have been taken then they should receive a more severe discipline such as a spanking. The process of spanking is a very agonizing and tormenting process. The child would suffer first by being forced to listen to a long lecture, instead of just receiving the spanking. Knowing what was coming after the speech brought a lot of fear and anxiety. It felt as if his or her stomach started cramping and his or her heart's would stop pumping at any moment during the lecture. As the time approached for the spanking, fear and nervousness grew rapidly .The...
Words: 588 - Pages: 3
...OPNET Modeler核心函数 目录 1. 核心函数简介 3 1.1 命名规则 3 1.2 参数类型 3 1.2.1 Animation Entity 4 1.2.2 Boolean 4 1.2.3 Compcode 4 1.2.4.Distribution 4 1.2.5 Event Handle 4 1.2.6 Statistic Handle 4 1.2.7 ICI 4 1.2.8 List 5 1.2.9 Object ID 5 1.2.10 Packet 5 1.2.11 Memory Object Type 5 1.2.12 Log Handle 5 1.2.13 Procedure 5 1.2.14 Process Handle 5 1.2.15 Sar Buffer Handle 5 1.2.16 Vartype 6 1.3 多线程安全 7 2. 基本核心函数 7 2.1 内部模型访问函数集 7 2.2 分布函数集 10 2.3 进程函数集 12 2.4 事件函数集 15 2.5 仿真函数集 16 2.6 鉴定函数集 17 2.7 拓扑函数集 18 2.8 接口控制信息函数集 23 2.9 中断函数集 26 2.10 包函数集 31 2.11 子队列函数集 38 2.12 统计量函数集 40 1. 核心函数简介 1.1 命名规则 OPNET中的核心函数具有非常标准的命名规则,以增强函数在C/C++代码中的可视性,避免名称与非OPNET函或变量冲突。以下列出了一些简单的命名规则: 名称均采用op_作为前缀,以标识其为OPNET仿真内核提供的核心函数。 函数名的第二部分为函数集名,用小写字母表示,通常是函数所处理对象的名称缩写,如pk、ici、stat等。 函数名的第三部分是子函数集名,对核心函数进一步进行了分类,如核心函数op_pk_nfd_set()中的nfd。 核心函数主要用于对对象的操作。在函数名中,对象总是出现在动作之前,比如名称中的attr_set和subq_flush就将对象(attribute和subqueue)放在动作(set和flush)之前。 1.2 参数类型 大部分核心函数的参数和返回值都是标准的C/C++数据类型,如int、double、char*。除此之外,在仿真数据结构中还通过C/C++的typedef语句定义了许多参数和返回值作为特殊的OPNET数据类型。尽管用户通过核心函数来操作OPNET数据类型,可能对每个数据类型的基本内容都越来越熟悉,但用户并不需要关心数据类型确切的内部结构,因为OPNET仿真数据结构的内容因软件版本的不同而有所改变。表1-1列举了部分特殊的数据类型。 表1-1 OPNET中部分特殊数据类型 |基本数据类型 |声明示例 ...
Words: 4240 - Pages: 17