Kernel Hardening by Recovering Kernel Stack Frame in Linux Operating System

Size: px
Start display at page:

Download "Kernel Hardening by Recovering Kernel Stack Frame in Linux Operating System"

Transcription

1 Kernel Hardening by Recovering Kernel Stack Frame in Linux Operating System Kernel Hardening by Recovering Kernel Stack Frame in Linux Operating System Department of Computer engineering, Dong-eui University doi: /ijact.vol1.issue1.9 Abstract The kernel hardening function is necessary in terms of kernel stability to reduce the system error or panic due to the kernel code error that is made by program developer. But, the traditional kernel hardening method is difficult to implement and consuming high cost. The suggested kernel hardening function that makes high availability system by changing the panic() function of inside kernel code guarantees normal system operation by recovering the incorrect address of the kernel stack frame. We experimented the kernel hardening function at the network module of the Linux by forcing panic code and confirmed the proposed design mechanism of kernel hardening is working well by this experiment. Keywords Linux O.S, Kernel Hardening, Stack Recovery 1.Introduction The Linux O.S is open source so that it can be changed kernel source code. Therefore, the Linux kernel source code is available as an Embedded system. An enterprise uses the Linux O.S as a web server, file server, and DB server. However, many people can change the kernel source code [1, 2, 3] that makes error status. It will halt system abnormally and corrupting data [13, 14]. The Unix O.S has generally hierarchical structure as HW, kernel, and application program. Each layer occurs several kinds of fault. Therefore, independent fault management module must be supported [2, 5]. The kernel hardening is a properly good mechanism against a panic in a kernel fault. The kernel hardening reduces error code through testing kernel code appropriate or not[1, 3, 5, 6, 11, 12]. This feature guarantees reliable system as making high reliable system by not stopping error case. The previous kernel hardening mechanism provides fault tolerance. The fault tolerance provides system availability by supporting dual resources in several resources. Therefore, the fault tolerance requires much cost and difficulty to implementation. But, the suggesting kernel hardening is simple mechanism that makes easy implementation in O.S. This paper proposes kernel hardening for a recoverable error in the Linux O.S. When a panic occurs in kernel, the wrong address is kept into the register. The suggesting kernel hardening recoveries a wrong address to a normal address of the stack frame. The kernel hardening module decides recovery or not. If a wrong address is recoverable, the module recoveries a normal address. Otherwise, the module proceeds existing procedure. This corrects a portion of a kernel including the panic() function within a kernel, and etc. Therefore, it can enhance system availability with the low cost. For the experiment of the mode of proposing in the network module. It provoked with panic phenomenon. The operation of being restored the stack value in which it becomes wrong with the normal value was confirmed. In chapter 2, the research related to the kernel hardening is looked into. The kernel hardening function of proposing in chapter 3 is introduced. In chapter 4, the kernel hardening function of being proposed at the network module is implemented and the result of experimenting is explained. Finally, in chapter 5, it concludes. Table 1. The kernel hardening of the CGE version. 1) Code reviews The part in which an error is generated through the code review technique is looked for. 2) Panic Removal After inspecting the Standard Linux Code, it determines whether the process will be or ordered with kill if a system is ordered with abort or not. 3) Fault Injection Testing It inspects whether to there be no whether there is the capability in which a kernel can be restored about an error in case of being Software or not. 2. Related Studies 64

2 International Journal of Advancements in Computing Technology Volume 1, Number 1, September 2009 MontaVista commercially sells the kernel hardening function is built in Linux operation system of the CGE (Carrier Grade Edition) version in which [9]. CGE of MontaVista classifies the kernel hardening function like Table 1 as 3 branch areas. If the kernel hardening of MontaVista entries into the panic routine when the specific process came in into the panic routine after reappraising a code, a system is normally implemented. Presently, if it is the process in which the process gives an affect to a system, the panic() function is performed and it becomes system with pause. If the Linux operation system kernel code is the case by the wrong of a user including the error of a programmer, and etc., a system is not stopped and only the process presently a kill and a system is normally implemented. And of MontaVista includes a review toward the kernel panic of all condition [4, 10] that the system error is generated by the determination toward the conformance of a system. Therefore, the availability function of a canal is weak, on the other hands, the terms of management about the canal problem is the strong operating system [2, 5, 14]. 3. Implementation the Kernel Hardening If "panic" is generated within the Linux kernel, the existing Linux kernel becomes the state where a system cannot make the operation in which it is any more normal. In case "panic" is generated, by restoring registry values in which the kernel hardening function proposed in this paper is abnormal in the kernel stack in-frame in which "panic" is generated to the normal value a kernel is normally operable. In an in-kernel, if "panic" is generated, in case of being the address type, the address in which it becomes wrong is stored to the cr2 register. By restoring this address the normal kernel action is possible. In this way, by being restored the kernel stack frame about the calculation in which it becomes wrong the normal operation develops as possible. The kernel hardening function of implementing in the Linux operation system was implemented in the network module. Recently, the stable kernel action in which we use of the Linux network function is required Therefore, the kernel hardening function proposed in this paper was implemented in the ip_rcv() function of the ip_input.c kernel source code in order to guarantee the stable kernel service of the network function within the Linux kernel. 3.1 Developing Hardening in the panic() Process. The kernel hardening function of implementing in the Linux operation system was developed in the network module. Recently, the stable kernel action of the Linux network function is required. Therefore, the kernel hardening function proposed in this paper was implemented in the ip_rcv() function of the ip_input.c kernel source code in order to guarantee the stable kernel service of the network function within the Linux kernel. In case a user performs the ping instruction, and etc., it is the operated function. In order to find the pathway in which it approaches in the telnet connection, in order to be generated with a kernel with panic by firstly using Loopback, the function like the next Figure 1. was inserted in the linux/net/ipv4/ip_input.c. static int harden_count; // The arbitrary static parameter value the situation before a panic becomes is confirmed. harden_count++; printk("ip_rcv() -> %d\n", harden_count); if(harden_count > 150) { aa = ; printk("aa=%d", *aa); // The page fault is compulsively generated by the reference about the page region in which it becomes wrong and a panic is caused. else { printk("harden_count=%d\n", harden_count); Figure 1. The function within the ip rcv() for the force panic occurence. A panic is compulsively generated like Figure 1. within the ip rcv() function. The stack information is outputted around the /linux/kernel/panic.c source code so that a panic can seek out the generated process with the reverse order. In the function within a fault.c, the good area, the bad area, no context, and the printk door toward each part of the do sigbus were chopped and we confirmed. The good area, the bad area, no context, and the do sigbus. ( good_area : ) The part handles the faulty address generated in the process address field. ( bad_area : ) The part handles the faulty address generated in the process address outside. ( no_context : ) The part is an interrupt or is the part in which it manages the exception in which it is generated when the kernel Sseure practices. ( do_sigbus : ) The part places the semaphore in which it obtains. It includes the address in which it causes an error in the cr2 field in the thread structure of the process. In (no context :) part within the do page fault() function, Figure 2. is the final step of the panic processing. 65

3 Kernel Hardening by Recovering Kernel Stack Frame in Linux Operating System if (address < PAGE_SIZE) printk(kern_alert "Unable to handle kernel NULL pointer dereference"); else printk(kern_alert "Unable to handle kernel paging request"); printk(" at virtual address %08lx\n",address); asm ("movl %%cr3,%0" : "=r" (page)); printk(kern_alert "current->tss.cr3 = %08lx, %%cr3 = %08lx\n", tsk->tss.cr3, page); page = ((unsigned long *) va(page))[address >> 22]; printk(kern_alert "*pde = %08lx\n", page); if (page & 1) { page &= PAGE_MASK; address &= 0x003ff000; page = ((unsigned long *) va(page))[address >> PAGE_SHIFT]; printk(kern_alert "*pte = %08lx\n", page); die("oops", regs, error_code); do_exit(sigkill); Figure 2. The end system arrangement step within the panic(). In no context part, Figure 2. shows the final step of the panic processing. This part is the final process stage of the panic processing. Figure 3. is the part in which it actually calls out no context. ()) if (in_interrupt() mm == &init_mm) //printk("in_interrupt()=%d",in_interrupt //printk("address = %x \m", address); goto no_context; Figure 3. The operation of no context part in the panic(). Figure 3. the part is shown in the panic situation where it produces and it moves by no context part. It can confirm to be the condition that a teeth goes to no context part with the value of in interruput(). If the address value is outputted between the if statement in which it goes to no context in order to confirm this since we gave 10+10, that is, 20 which is decimal address value to the char pointer aa, we can confirm that the hexadecimal number 0x14 is outputted. We can confirm to be the address value in which this value sets up in a pointer. 3.2 The Kernel Hardening Development in the Network Module. By using the recovery function of the kernel stack to the network module, this paper develops the kernel hardening function. Figure 4. in, the call progress at the ip_input.c, that is the network module for embodying in this paper, is shown. Figure 4. The kernel stack rehabilitation process in the ip_rcv() function among the network module. The panic in which we arbitrarily produce is the phenomenon that it occurs by the reference about the memory area except the area in which the kernel area processes. The first working was progressed so that the process could find the pathway in which a panic goes through the do page fault() function of the./arch/i386/mm/fault.c. By determining the area about the address as the occurence of the exceptional case this goes through the Page Fault Exception Handler in which it processes. It is the function in which it passes in the part in which no context level of the do page fault() function causes a panic. In this function, the interrupt handling routine of in interrupt() function is gone through. In the do page fault() function, the following assembly command is practiced. asm ("movl %%cr2,%0)":"=r" (address)); In this assembly command, the address has the address in which immediately, we set up and it becomes wrong. As to this address, there is a related with the cr2 register. Moreover, when a panic was generated, the process of confirming stack values is needed. This is the process of confirming when the 66

4 International Journal of Advancements in Computing Technology Volume 1, Number 1, September 2009 program is performed even about executing any kind of routine through values piled up in a stack. Right line, the stack value is traced when a panic arose. This is put through the stack value where there was through an option in the system panic to see with symbol, that is the UNIX command called "nm -n" this, and it can know the route in which a panic is generated. The later process generated with the panic this. An interrupt is generated in the address in which it becomes wrong within the Linux kernel. The die() function is called out from no context part of the do page fault() function if an interrupt is generated. In the die() function, the show register() function is called out. The show register() function calls out the show stack() function. In this show stack() function, the cr2 register value of a problem can be confirmed. The address of a stack can confirm the part in which it is like the address through as to we, with a teeth. It is restored this address with the normal value. If it is restored the mis path call progress within a stack with the normal process, the normal system operation is possible. The next Figure 5. shows the source code of the show stack() function. int show_stack(unsigned long * esp) { unsigned long *stack; int i; unsigned long address; SS1: if(esp==null) SS2: esp=(unsigned long*)&esp; SS3: stack = esp; SS4: asm ("movl %%cr2,%0":"=r" (address)); SS5: for(i=0; i < kstack_depth_to_print; i++) { SS6: if (((long) stack & (THREAD_SIZE-1)) == 0) SS7: break; SS8: if (i && ((i % 8) == 0)) SS9: printk("\n "); SS10: if(*stack == address) { SS11: *stack = kmalloc(8, GFP_KERNEL); SS12: printk("change Value of Stack addr = SS13: 0x%x!!!!!!!!!!!!!!!\n", *stack); SS14: return 1; SS15: SS16: printk("addr %08lx : ", stack); SS17: printk("%08lx ", *stack++); SS18: SS19: printk("\n"); SS20: return 0; Figure 5. The show stack() function source code. In the Linux kernel, Figure 5. shows the show stack() function for implementing the hardening function through the recovery of the kernel stack. In Figure 5., the address information in which it enters into the cr2 register is stored the address variable in (SS4 sentence). The address variable is the variable in which a panic puts in the generated value. In case there is the value in which it coincides with the address parameter value among the value in a stack, if this value is changed to the normal value, the operation of the Linux kernel is normally made. The e-process is the process to the SS15 sentence in the SS10 sentence of Figure Experiment The system environment for implementing the kernel hardening function in the Linux operation system the Intel CPU 450MHz processor and RAM used 128Mbyte. And the system, that is 256KByte, the mainboard cache used the operating system of Linux RedHat 9.0 base. The Linux kernel version used Moreover, the GNU tool was used for the program development. The that we develop from chapter 3 content of the show stack() function was actually used and an experiment was carried out. This experiment is the experiment for confirming whether the content that it develops from this paper is normally operated or not. It is the show stack() function called in the ip_rcv() function like Figure 6.. ip_rcv() { show_stack(sp); /* The aa value confirmation. */. Figure 6. The experiment in which we use the show stack() function. As follows, the structure of the register stored in a stack for the system call is defined in the asmi386/ptrace.h header file. struct pt_regs{ long ebx,ecx,edx,esi,edi,ebp,eax; int xds, xes,orig_eax,eip,xds,eflags,esp,xss; Figure 7. The information data structure of being stored in a stack. 67

5 Kernel Hardening by Recovering Kernel Stack Frame in Linux Operating System In this paper, by using the value of the esp register, the kernel hardening is implemented. The Ju So-gap in which the specific local variable has Charyedaero enters into Staek if we use through the show stack() function. The address of the local variable at the ip_rcv() is looked into. The location of the stack in which the local variable called the aa in which it generates the page fault has is looked for. A kernel is performed in order to makes induce the panic in which it is compulsory in an in-kernel for the actual experiment. A system is caused a panic by the address in which the aa has. It normally again comes back till a fault.c by assigning the address (memory) in which it is normal about the new aa variable. asm ("movl %%esp,%0":"=r" (sp)); printk(" iph=0x%x, &bb=0x%x, aa=0x%x, sp=0x%x\n", iph, &bb, aa, sp); show_stack(sp); asm ("popl %%eax\n\t": : ); asm ("movl %%eax,%0":"=r" (check)); asm ("movl %%esp,%0":"=r" (sp)); printk(" check=0x%x, sp=0x%x\n", check, sp); asm ("pushl %%eax\n\t": : ); Figure 8. It is normally restored the abnormal address. Figure 8. Ikeonaes the esp register value with a variable called a sp. And by using the show stack (sp) function, the stack recovery is attempted. Next, the normal stack information is arranged. By doing like Figure 8 it is restored the value of the abnormal stack with the normal stack value. This is the procedure of confirming the kernel hardening function through the recovery about the proposed in this paper. As to, the fault tolerance system is simply developed. 5. Conclusions The phenomenon that a system is stopped due to the calculation in which it becomes wrong in the Linux operation system kernel or the program in which it becomes wrong occurs. It can be said to be this kind of a phenomenon the system panic. In case a panic is generated in the Linux kernel, it is very important that the normal system operation becomes by restoring the address value in which it is normal about a panic due to the address in which it becomes wrong. In case "panic" is generated, by restoring registry values in which the kernel hardening function proposed in this paper is abnormal in the kernel stack in-frame in which "panic" is generated to the normal value the normal operation is possible. In an in-kernel, if "panic" is generated, in case of being the address type, the address in which it becomes wrong is stored to the cr2 register. By this address can be restored, restoring the normal operation is possible. The kernel hardening function of implementing in Linux O.S was implemented in the network module. The compulsory panic induction situation is comprised of the network module. It is restored in case a panic was generated. This paper designs the kernel hardening function that it is restored about the error in which it is recoverable in the Linux operation system. Many users use the Linux operation system and the function proposed in this paper will much more be able to stabilize the Linux kernel. And as to, the task that implements the proposed in this paper in the Linux kernel and that it modularizes is needed. An use is possible to be easy with time of time when a user wants through the modularization of the kernel hardening function. 6. References [1] G.B.Adams III, and H.J.Siegel, The Extra Stage Cube: A Fault-Tolerant Interconnection Network for Supersystems, pp IEEE Trans. on Comput. Vol. C-31, No.5 May [2] Beck, Linux Kernel Programming, pp. 2-5, ADDISON WESLEY,2002. [3] Jeffery Oldham & Alex Samuel, Advanced Linux Programming, pp , Mark Mitchell, [4] John Mehaffey, Montavista Linux Carrier GradeEdition[WHITE PAPER], Montavista Software Inc., April 8, [5] Tim Udalll, "kernel Hardening Guidelines", Sequoia, [6] SILBERSCHATZ&GALVIN&GAGNE, Operating System Concepts(6th), JOHNWILEY&SONGS INC [7] Ivan Buetler, Compass Security Hardening Solaris", SunMicro System, [8] John Mehaffey, "MontaVista Linux Carrier Grade Edition Version 2.1: The Foundation for Next-Generation Carrier Grade Applications", Montavista Software Inc., [9] Michael Beck,Mirko Dziadzka,Ulrich Kunitz and Harald Bohme, Linux Kernel Internals, Addison-Wesley,1997. [10] The Linux Online, [11] Gary Nutt, Kernel Projects for Linux, Addison Wesley Longman, [12] A.Rubini&J.Corbet, Linux Device Driver(2nd), O'Relly, [13] BOVET & CESATI, OREILLY, Understanding the Linux Kernel, pp , [14] gn/designfault.html,

6 International Journal of Advancements in Computing Technology Volume 1, Number 1, September 2009 Seung-Ju, Jang received a B.Sc. degree in Computer Science and Statistics, and M.Sc. degree, and his Ph.D. in Computer Engineering, all from Busan National University, in 1985, 1991, and 1996, respectively. He is a member of IEEE and ACM. He has been Professor in the Department of Computer Engineering at Dongeui University since He was a member of ETRI(Electronic and Telecommunication Research Institute) in Daejon, Korea, from 1987 to 1996, and developed the National Administration Multiprocessor Minicomputer during those years. His current research interests include fault-tolerant computing systems, distributed systems in the UNIX Operating Systems, multimedia operating systems, embedded system, security system, and parallel algorithms. 69

Design of the Journaling File System for Performance Enhancement

Design of the Journaling File System for Performance Enhancement 22 Design of the Journaling File System for Performance Enhancement Seung-Ju, Jang Dong-Eui University, Dept. of Computer Engineering Summary In this paper, I developed for the purpose of ensuring stability

More information

Design of the Remote Management System in the Windows Operating System

Design of the Remote Management System in the Windows Operating System 38 Design of the Management System in the Windows Operating System Seung-Ju Jang Dong-Eui University, Dept. of Computer Engineering Summary In this paper, I designed the remote management system on the

More information

CSE 306/506 Operating Systems Process Address Space. YoungMin Kwon

CSE 306/506 Operating Systems Process Address Space. YoungMin Kwon CSE 306/506 Operating Systems Process Address Space YoungMin Kwon Process s Address Space Memory allocation for user processes On request, a right to use a new range of linear address is given to the process

More information

Protection and System Calls. Otto J. Anshus

Protection and System Calls. Otto J. Anshus Protection and System Calls Otto J. Anshus Protection Issues CPU protection Prevent a user from using the CPU for too long Throughput of jobs, and response time to events (incl. user interactive response

More information

CS 537 Lecture 2 - Processes

CS 537 Lecture 2 - Processes CS 537 Lecture 2 - Processes Michael Swift 1 Basic Structure Kernel is a big program that starts when you boot your program Has full access to physical hardware. User programs, utilities, services see

More information

Interrupts and System Calls

Interrupts and System Calls Interrupts and System Calls Open file hw1.txt App First lecture Ok, here s handle 4 App App Don Porter Libraries Libraries Libraries System Call Table (350 1200) Kernel User Supervisor Hardware 1 2-2 Today

More information

CS 318 Principles of Operating Systems

CS 318 Principles of Operating Systems CS 318 Principles of Operating Systems Fall 2017 Lecture 5: Thread Ryan Huang Administrivia HW1 solution released on Piazza resources Lab 0 grading - In progress - Cheating policy Lab 1 review session

More information

ICS143A: Principles of Operating Systems. Midterm recap, sample questions. Anton Burtsev February, 2017

ICS143A: Principles of Operating Systems. Midterm recap, sample questions. Anton Burtsev February, 2017 ICS143A: Principles of Operating Systems Midterm recap, sample questions Anton Burtsev February, 2017 Describe the x86 address translation pipeline (draw figure), explain stages. Address translation What

More information

BUFFER OVERFLOW. Jo, Heeseung

BUFFER OVERFLOW. Jo, Heeseung BUFFER OVERFLOW Jo, Heeseung IA-32/LINUX MEMORY LAYOUT Heap Runtime stack (8MB limit) Dynamically allocated storage When call malloc(), calloc(), new() DLLs (shared libraries) Data Text Dynamically linked

More information

COS 318: Operating Systems

COS 318: Operating Systems COS 318: Operating Systems OS Structures and System Calls Prof. Margaret Martonosi Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall11/cos318/ Outline Protection

More information

Buffer Overflow. Jo, Heeseung

Buffer Overflow. Jo, Heeseung Buffer Overflow Jo, Heeseung IA-32/Linux Memory Layout Heap Runtime stack (8MB limit) Dynamically allocated storage When call malloc(), calloc(), new() DLLs (shared libraries) Data Text Dynamically linked

More information

Processes (Intro) Yannis Smaragdakis, U. Athens

Processes (Intro) Yannis Smaragdakis, U. Athens Processes (Intro) Yannis Smaragdakis, U. Athens Process: CPU Virtualization Process = Program, instantiated has memory, code, current state What kind of memory do we have? registers + address space Let's

More information

seven Virtual Memory Introduction

seven Virtual Memory Introduction Virtual Memory seven Exercise Goal: You will study how Linux implements virtual memory. A general architecture-independent memory model is the basis of all Linux virtual memory implementations, though

More information

CSE 451 Autumn Final Solutions mean 77.53, median 79, stdev 12.03

CSE 451 Autumn Final Solutions mean 77.53, median 79, stdev 12.03 CSE 451 Autumn 2016 Final Solutions 15 10 5 0 0 10 20 30 40 50 60 70 80 90 100 mean 77.53, median 79, stdev 12.03 I. Warm-up (a) (15 points) Circle true or false for each statement (no need to justify

More information

Sistemi in Tempo Reale

Sistemi in Tempo Reale Laurea Specialistica in Ingegneria dell'automazione Sistemi in Tempo Reale Giuseppe Lipari Introduzione alla concorrenza Fundamentals Algorithm: It is the logical procedure to solve a certain problem It

More information

Toward (SOS) Self-stabilizing Operating System

Toward (SOS) Self-stabilizing Operating System Toward (SOS) Self-stabilizing Operating System Shlomi Dolev and Reuven Yagel, Ben-Gurion University, Israel Sep. 1st SAACS 04 Workshop, Zaragoza Outline Motivation: current operating systems do not stabilize!

More information

Midterm Exam #2 April 20, 2016 CS162 Operating Systems

Midterm Exam #2 April 20, 2016 CS162 Operating Systems University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2016 Anthony D. Joseph Midterm Exam #2 April 20, 2016 CS162 Operating Systems Your Name: SID AND 162 Login:

More information

Chapter 1 Introduction

Chapter 1 Introduction Chapter 1 Introduction Hsung-Pin Chang Department of Computer Science National Chung Hsing University Preference On the basis of 2.4.18 of the Linux kernel www.kernel.org Linux source code is contained

More information

Midterm Exam #2 Solutions April 20, 2016 CS162 Operating Systems

Midterm Exam #2 Solutions April 20, 2016 CS162 Operating Systems University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2016 Anthony D. Joseph Midterm Exam #2 Solutions April 20, 2016 CS162 Operating Systems Your Name: SID AND

More information

Process Time. Steven M. Bellovin January 25,

Process Time. Steven M. Bellovin January 25, Multiprogramming Computers don t really run multiple programs simultaneously; it just appears that way Each process runs to completion, but intermixed with other processes Process 1 6 ticks Process 2 Process

More information

Interrupts & System Calls

Interrupts & System Calls Interrupts & System Calls Nima Honarmand Previously on CSE306 Open file hw1.txt App Ok, here s handle App 4 App Libraries Libraries Libraries User System Call Table (350 1200) Supervisor Kernel Hardware

More information

by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha

by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha CS 111 Scribe Notes for 4/11/05 by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha Processes What is a process? A process is a running instance of a program. The Web browser you're using to

More information

CS , Fall 2004 Exam 1

CS , Fall 2004 Exam 1 Andrew login ID: Full Name: CS 15-213, Fall 2004 Exam 1 Tuesday October 12, 2004 Instructions: Make sure that your exam is not missing any sheets, then write your full name and Andrew login ID on the front.

More information

Buffer Overflow. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Buffer Overflow. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Buffer Overflow Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu IA-32/Linux Memory Layout Runtime stack (8MB limit) Heap Dynamically allocated storage

More information

Lecture 4: Threads; weaving control flow

Lecture 4: Threads; weaving control flow Lecture 4: Threads; weaving control flow CSE 120: Principles of Operating Systems Alex C. Snoeren HW 1 Due NOW Announcements Homework #1 due now Project 0 due tonight Project groups Please send project

More information

srfs kernel module Nir Tzachar September 25, 2003

srfs kernel module Nir Tzachar September 25, 2003 srfs kernel module Nir Tzachar September 25, 2003 1 Introduction 1.1 A distributed file system A distributed file system should appear to the user as a traditional file system. The user can create files,

More information

1.1 For Fun and Profit. 1.2 Common Techniques. My Preferred Techniques

1.1 For Fun and Profit. 1.2 Common Techniques. My Preferred Techniques 1 Bug Hunting Bug hunting is the process of finding bugs in software or hardware. In this book, however, the term bug hunting will be used specifically to describe the process of finding security-critical

More information

csci 297: Advanced Operating Systems

csci 297: Advanced Operating Systems csci 297: Advanced Operating Systems Professor Gabriel Parmer (aka. Gabe) gparmer@gwu.edu, office hours 10am 12 Tuesday (Tentative. Does this work for you?) Class: Tompkins 205, Monday 6:10 8:40 Acknowledgements:

More information

CSE 153 Design of Operating Systems Fall 18

CSE 153 Design of Operating Systems Fall 18 CSE 153 Design of Operating Systems Fall 18 Lecture 2: OS model and Architectural Support Last time/today l Historic evolution of Operating Systems (and computing!) l Today: We start our journey in exploring

More information

CSC 2405: Computer Systems II

CSC 2405: Computer Systems II CSC 2405: Computer Systems II Dr. Mirela Damian http://www.csc.villanova.edu/~mdamian/csc2405/ Spring 2016 Course Goals: Look under the hood Help you learn what happens under the hood of computer systems

More information

OS lpr. www. nfsd gcc emacs ls 1/27/09. Process Management. CS 537 Lecture 3: Processes. Example OS in operation. Why Processes? Simplicity + Speed

OS lpr. www. nfsd gcc emacs ls 1/27/09. Process Management. CS 537 Lecture 3: Processes. Example OS in operation. Why Processes? Simplicity + Speed Process Management CS 537 Lecture 3: Processes Michael Swift This lecture begins a series of topics on processes, threads, and synchronization Today: processes and process management what are the OS units

More information

Mechanisms for entering the system

Mechanisms for entering the system Mechanisms for entering the system Yolanda Becerra Fontal Juan José Costa Prats Facultat d'informàtica de Barcelona (FIB) Universitat Politècnica de Catalunya (UPC) BarcelonaTech 2017-2018 QP Content Introduction

More information

SYSTEM CALL IMPLEMENTATION. CS124 Operating Systems Fall , Lecture 14

SYSTEM CALL IMPLEMENTATION. CS124 Operating Systems Fall , Lecture 14 SYSTEM CALL IMPLEMENTATION CS124 Operating Systems Fall 2017-2018, Lecture 14 2 User Processes and System Calls Previously stated that user applications interact with the kernel via system calls Typically

More information

Question 4.2 2: (Solution, p 5) Suppose that the HYMN CPU begins with the following in memory. addr data (translation) LOAD 11110

Question 4.2 2: (Solution, p 5) Suppose that the HYMN CPU begins with the following in memory. addr data (translation) LOAD 11110 Questions 1 Question 4.1 1: (Solution, p 5) Define the fetch-execute cycle as it relates to a computer processing a program. Your definition should describe the primary purpose of each phase. Question

More information

Project #1 Exceptions and Simple System Calls

Project #1 Exceptions and Simple System Calls Project #1 Exceptions and Simple System Calls Introduction to Operating Systems Assigned: January 21, 2004 CSE421 Due: February 17, 2004 11:59:59 PM The first project is designed to further your understanding

More information

Multithreading Applications in Win32

Multithreading Applications in Win32 Copyright, 2006 Multimedia Lab., UOS Multithreading Applications in Win32 (Introduction to Operating Systems) SeongJongChoi chois@mmlab.net Multimedia Lab. Dept. of Electrical and Computer Eng. University

More information

CSE 120 Principles of Operating Systems

CSE 120 Principles of Operating Systems CSE 120 Principles of Operating Systems Fall 2016 Lecture 2: Architectural Support for Operating Systems Geoffrey M. Voelker Administrivia Project 0 Due 10/4, done individually Homework #1 Due 10/6 Project

More information

COS 318: Operating Systems

COS 318: Operating Systems COS 318: Operating Systems OS Structures and System Calls Jaswinder Pal Singh Computer Science Department Princeton University (http://www.cs.princeton.edu/courses/cos318/) Outline Protection mechanisms

More information

Homework / Exam. Return and Review Exam #1 Reading. Machine Projects. Labs. S&S Extracts , PIC Data Sheet. Start on mp3 (Due Class 19)

Homework / Exam. Return and Review Exam #1 Reading. Machine Projects. Labs. S&S Extracts , PIC Data Sheet. Start on mp3 (Due Class 19) Homework / Exam Return and Review Exam #1 Reading S&S Extracts 385-393, PIC Data Sheet Machine Projects Start on mp3 (Due Class 19) Labs Continue in labs with your assigned section 1 Interrupts An interrupt

More information

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst

Operating Systems CMPSCI 377 Spring Mark Corner University of Massachusetts Amherst Operating Systems CMPSCI 377 Spring 2017 Mark Corner University of Massachusetts Amherst Last Class: Intro to OS An operating system is the interface between the user and the architecture. User-level Applications

More information

Section 4: Threads and Context Switching

Section 4: Threads and Context Switching CS162 September 19-20, 2017 Contents 1 Warmup 2 1.1 Hello World............................................ 2 2 Vocabulary 2 3 Problems 3 3.1 Join................................................ 3 3.2

More information

CS 318 Principles of Operating Systems

CS 318 Principles of Operating Systems CS 318 Principles of Operating Systems Fall 2018 Lecture 5: Thread Ryan Huang Slides adapted from Geoff Voelker s and David Mazières lectures Administrivia Lab 0 grading in progress Lab 1 review session

More information

www nfsd emacs lpr Process Management CS 537 Lecture 4: Processes Example OS in operation Why Processes? Simplicity + Speed

www nfsd emacs lpr Process Management CS 537 Lecture 4: Processes Example OS in operation Why Processes? Simplicity + Speed Process Management CS 537 Lecture 4: Processes Michael Swift This lecture begins a series of topics on processes, threads, and synchronization Today: processes and process management what are the OS units

More information

W4118: interrupt and system call. Junfeng Yang

W4118: interrupt and system call. Junfeng Yang W4118: interrupt and system call Junfeng Yang Outline Motivation for protection Interrupt System call 2 Need for protection Kernel privileged, cannot trust user processes User processes may be malicious

More information

Chapter 3 Process Description and Control

Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles Chapter 3 Process Description and Control Seventh Edition By William Stallings Process Control Block Structure of Process Images in Virtual Memory How

More information

Process Control. Philipp Koehn. 23 April 2018

Process Control. Philipp Koehn. 23 April 2018 Process Control Philipp Koehn 23 April 2018 Control Flow 1 The CPU executes one instruction after another Typically, they are next to each other in memory (unless jumps, branches, and returns from subroutine)

More information

x86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT

x86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT x86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT kaashoek@mit.edu Outline Enforcing modularity with virtualization Virtualize processor and memory x86 mechanism for virtualization

More information

CSE 120 Principles of Operating Systems

CSE 120 Principles of Operating Systems CSE 120 Principles of Operating Systems Spring 2018 Lecture 2: Architectural Support for Operating Systems Geoffrey M. Voelker Administrivia Project 0 Due 4/9 11:59pm, done individually Homework #1 Due

More information

Software Based Fault Injection Framework For Storage Systems Vinod Eswaraprasad Smitha Jayaram Wipro Technologies

Software Based Fault Injection Framework For Storage Systems Vinod Eswaraprasad Smitha Jayaram Wipro Technologies Software Based Fault Injection Framework For Storage Systems Vinod Eswaraprasad Smitha Jayaram Wipro Technologies The agenda Reliability in Storage systems Types of errors/faults in distributed storage

More information

The Operating System (OS) MicroComputer Engineering OperatingSystem slide 1!

The Operating System (OS) MicroComputer Engineering OperatingSystem slide 1! The Operating System (OS) MicroComputer Engineering OperatingSystem slide 1! The Operating System (OS) P1:! Editor! P2: Compiler! P3:! Quake! Arena! Operating System! MIPS! At any one time the processor

More information

CSC369 Lecture 2. Larry Zhang, September 21, 2015

CSC369 Lecture 2. Larry Zhang, September 21, 2015 CSC369 Lecture 2 Larry Zhang, September 21, 2015 1 Volunteer note-taker needed by accessibility service see announcement on Piazza for details 2 Change to office hour to resolve conflict with CSC373 lecture

More information

CS 201. Exceptions and Processes. Gerson Robboy Portland State University

CS 201. Exceptions and Processes. Gerson Robboy Portland State University CS 201 Exceptions and Processes Gerson Robboy Portland State University Control Flow Computers Do One Thing From startup to shutdown, a CPU reads and executes (interprets) a sequence of instructions, one

More information

Hijacking the Linux Kernel

Hijacking the Linux Kernel Hijacking the Linux Kernel Boris Procházka, Tomáš Vojnar and Martin Drahanský FIT Brno University of Technology 22.10.2010 18:15 2005-12-31 Aurelius Hall Your Name Your Title Your Organization MEMICS (Line

More information

16 Sharing Main Memory Segmentation and Paging

16 Sharing Main Memory Segmentation and Paging Operating Systems 64 16 Sharing Main Memory Segmentation and Paging Readings for this topic: Anderson/Dahlin Chapter 8 9; Siberschatz/Galvin Chapter 8 9 Simple uniprogramming with a single segment per

More information

Is stack overflow still a problem?

Is stack overflow still a problem? Morris Worm (1998) Code Red (2001) Secure Programming Lecture 4: Memory Corruption II (Stack Overflows) David Aspinall, Informatics @ Edinburgh 31st January 2017 Memory corruption Buffer overflow remains

More information

COS 318: Operating Systems. Overview. Prof. Margaret Martonosi Computer Science Department Princeton University

COS 318: Operating Systems. Overview. Prof. Margaret Martonosi Computer Science Department Princeton University COS 318: Operating Systems Overview Prof. Margaret Martonosi Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall11/cos318/ Announcements Precepts: Tue (Tonight)!

More information

User Programs. Computer Systems Laboratory Sungkyunkwan University

User Programs. Computer Systems Laboratory Sungkyunkwan University Project 2: User Programs Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Supporting User Programs What should be done to run user programs? 1. Provide

More information

Traps and Faults. Review: Mode and Space

Traps and Faults. Review: Mode and Space Traps and Faults Review: Mode and Space A B C user mode data data kernel mode kernel space 1 Review: the Role of Events ACPUevent is an unnatural change in control flow. Like a procedure call, an event

More information

Instruction Set Architectures

Instruction Set Architectures Instruction Set Architectures ISAs Brief history of processors and architectures C, assembly, machine code Assembly basics: registers, operands, move instructions 1 What should the HW/SW interface contain?

More information

Part I. X86 architecture overview. Secure Operating System Design and Implementation x86 architecture. x86 processor modes. X86 architecture overview

Part I. X86 architecture overview. Secure Operating System Design and Implementation x86 architecture. x86 processor modes. X86 architecture overview X86 architecture overview Overview Secure Operating System Design and Implementation x86 architecture Jon A. Solworth Part I X86 architecture overview Dept. of Computer Science University of Illinois at

More information

Buffer overflow is still one of the most common vulnerabilities being discovered and exploited in commodity software.

Buffer overflow is still one of the most common vulnerabilities being discovered and exploited in commodity software. Outline Morris Worm (1998) Infamous attacks Secure Programming Lecture 4: Memory Corruption II (Stack Overflows) David Aspinall, Informatics @ Edinburgh 23rd January 2014 Recap Simple overflow exploit

More information

Using kgdb and the kgdb Internals

Using kgdb and the kgdb Internals Using kgdb and the kgdb Internals Jason Wessel jason.wessel@windriver.com Tom Rini trini@kernel.crashing.org Amit S. Kale amitkale@linsyssoft.com Using kgdb and the kgdb Internals by Jason Wessel by Tom

More information

CS 5460/6460 Operating Systems

CS 5460/6460 Operating Systems CS 5460/6460 Operating Systems Fall 2009 Instructor: Matthew Flatt Lecturer: Kevin Tew TAs: Bigyan Mukherjee, Amrish Kapoor 1 Join the Mailing List! Reminders Make sure you can log into the CADE machines

More information

Overhead Evaluation about Kprobes and Djprobe (Direct Jump Probe)

Overhead Evaluation about Kprobes and Djprobe (Direct Jump Probe) Overhead Evaluation about Kprobes and Djprobe (Direct Jump Probe) Masami Hiramatsu Hitachi, Ltd., SDL Jul. 13. 25 1. Abstract To implement flight recorder system, the overhead

More information

6.828: Using Virtual Memory. Adam Belay

6.828: Using Virtual Memory. Adam Belay 6.828: Using Virtual Memory Adam Belay abelay@mit.edu 1 Outline Cool things you can do with virtual memory: Lazy page allocation (homework) Better performance/efficiency E.g. One zero-filled page E.g.

More information

Operating System. Chapter 3. Process. Lynn Choi School of Electrical Engineering

Operating System. Chapter 3. Process. Lynn Choi School of Electrical Engineering Operating System Chapter 3. Process Lynn Choi School of Electrical Engineering Process Def: A process is an instance of a program in execution. One of the most profound ideas in computer science. Not the

More information

x86 architecture et similia

x86 architecture et similia x86 architecture et similia 1 FREELY INSPIRED FROM CLASS 6.828, MIT A full PC has: PC architecture 2 an x86 CPU with registers, execution unit, and memory management CPU chip pins include address and data

More information

Function Calls COS 217. Reading: Chapter 4 of Programming From the Ground Up (available online from the course Web site)

Function Calls COS 217. Reading: Chapter 4 of Programming From the Ground Up (available online from the course Web site) Function Calls COS 217 Reading: Chapter 4 of Programming From the Ground Up (available online from the course Web site) 1 Goals of Today s Lecture Finishing introduction to assembly language o EFLAGS register

More information

Sistemi Operativi. Lez. 16 Elementi del linguaggio Assembler AT&T

Sistemi Operativi. Lez. 16 Elementi del linguaggio Assembler AT&T Sistemi Operativi Lez. 16 Elementi del linguaggio Assembler AT&T Data Sizes Three main data sizes Byte (b): 1 byte Word (w): 2 bytes Long (l): 4 bytes Separate assembly-language instructions E.g., addb,

More information

COMPILING OBJECTS AND OTHER LANGUAGE IMPLEMENTATION ISSUES. Credit: Mostly Bryant & O Hallaron

COMPILING OBJECTS AND OTHER LANGUAGE IMPLEMENTATION ISSUES. Credit: Mostly Bryant & O Hallaron COMPILING OBJECTS AND OTHER LANGUAGE IMPLEMENTATION ISSUES Credit: Mostly Bryant & O Hallaron Word-Oriented Memory Organization Addresses Specify Byte Locations Address of first byte in word Addresses

More information

CMSC 313 Lecture 13 Project 4 Questions Reminder: Midterm Exam next Thursday 10/16 Virtual Memory

CMSC 313 Lecture 13 Project 4 Questions Reminder: Midterm Exam next Thursday 10/16 Virtual Memory CMSC 33 Lecture 3 Project 4 Questions Reminder: Midterm Exam next Thursday /6 Virtual Memory UMBC, CMSC33, Richard Chang CMSC 33, Computer Organization & Assembly Language Programming

More information

Design of Operating System

Design of Operating System Design of Operating System Architecture OS protection, modes/privileges User Mode, Kernel Mode https://blog.codinghorror.com/understanding-user-and-kernel-mode/ a register of flag to record what mode the

More information

Lecture 20. Java Exceptional Event Handling. Dr. Martin O Connor CA166

Lecture 20. Java Exceptional Event Handling. Dr. Martin O Connor CA166 Lecture 20 Java Exceptional Event Handling Dr. Martin O Connor CA166 www.computing.dcu.ie/~moconnor Topics What is an Exception? Exception Handler Catch or Specify Requirement Three Kinds of Exceptions

More information

Outline Background Jaluna-1 Presentation Jaluna-2 Presentation Overview Use Cases Architecture Features Copyright Jaluna SA. All rights reserved

Outline Background Jaluna-1 Presentation Jaluna-2 Presentation Overview Use Cases Architecture Features Copyright Jaluna SA. All rights reserved C5 Micro-Kernel: Real-Time Services for Embedded and Linux Systems Copyright 2003- Jaluna SA. All rights reserved. JL/TR-03-31.0.1 1 Outline Background Jaluna-1 Presentation Jaluna-2 Presentation Overview

More information

Section 4: Threads CS162. September 15, Warmup Hello World Vocabulary 2

Section 4: Threads CS162. September 15, Warmup Hello World Vocabulary 2 CS162 September 15, 2016 Contents 1 Warmup 2 1.1 Hello World............................................ 2 2 Vocabulary 2 3 Problems 3 3.1 Join................................................ 3 3.2 Stack

More information

The benefits and costs of writing a POSIX kernel in a high-level language

The benefits and costs of writing a POSIX kernel in a high-level language 1 / 38 The benefits and costs of writing a POSIX kernel in a high-level language Cody Cutler, M. Frans Kaashoek, Robert T. Morris MIT CSAIL Should we use high-level languages to build OS kernels? 2 / 38

More information

T Jarkko Turkulainen, F-Secure Corporation

T Jarkko Turkulainen, F-Secure Corporation T-110.6220 2010 Emulators and disassemblers Jarkko Turkulainen, F-Secure Corporation Agenda Disassemblers What is disassembly? What makes up an instruction? How disassemblers work Use of disassembly In

More information

EECS 482 Introduction to Operating Systems

EECS 482 Introduction to Operating Systems EECS 482 Introduction to Operating Systems Winter 2018 Baris Kasikci Slides by: Harsha V. Madhyastha Use of CVs in Project 1 Incorrect use of condition variables: while (cond) { } cv.signal() cv.wait()

More information

CSC369 Lecture 2. Larry Zhang

CSC369 Lecture 2. Larry Zhang CSC369 Lecture 2 Larry Zhang 1 Announcements Lecture slides Midterm timing issue Assignment 1 will be out soon! Start early, and ask questions. We will have bonus for groups that finish early. 2 Assignment

More information

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018 CSCE 311 - Operating Systems Interrupts, Exceptions, and Signals Qiang Zeng, Ph.D. Fall 2018 Previous Class Process state transition Ready, blocked, running Call Stack Execution Context Process switch

More information

CS 31: Introduction to Computer Systems : Threads & Synchronization April 16-18, 2019

CS 31: Introduction to Computer Systems : Threads & Synchronization April 16-18, 2019 CS 31: Introduction to Computer Systems 22-23: Threads & Synchronization April 16-18, 2019 Making Programs Run Faster We all like how fast computers are In the old days (1980 s - 2005): Algorithm too slow?

More information

Processes, Threads, SMP, and Microkernels

Processes, Threads, SMP, and Microkernels Processes, Threads, SMP, and Microkernels Slides are mainly taken from «Operating Systems: Internals and Design Principles, 6/E William Stallings (Chapter 4). Some materials and figures are obtained from

More information

C Compilation Model. Comp-206 : Introduction to Software Systems Lecture 9. Alexandre Denault Computer Science McGill University Fall 2006

C Compilation Model. Comp-206 : Introduction to Software Systems Lecture 9. Alexandre Denault Computer Science McGill University Fall 2006 C Compilation Model Comp-206 : Introduction to Software Systems Lecture 9 Alexandre Denault Computer Science McGill University Fall 2006 Midterm Date: Thursday, October 19th, 2006 Time: from 16h00 to 17h30

More information

RELEASE NOTES: GNURL78 v KPIT Technologies Limited is releasing the GNURL78 v15.02, a cross compiler tool for Renesas RL78 micro-controllers.

RELEASE NOTES: GNURL78 v KPIT Technologies Limited is releasing the GNURL78 v15.02, a cross compiler tool for Renesas RL78 micro-controllers. RELEASE NOTES: GNURL78 v15.02 30 th September 2015 KPIT Technologies Limited is releasing the GNURL78 v15.02, a cross compiler tool for Renesas RL78 micro-controllers. SALIENT FEATURES: 1. The GNURL78

More information

CSE 120 Principles of Operating Systems

CSE 120 Principles of Operating Systems CSE 120 Principles of Operating Systems Spring 2009 Lecture 4: Threads Geoffrey M. Voelker Announcements Homework #1 due now Project 0 due tonight Project 1 out April 9, 2009 CSE 120 Lecture 4 Threads

More information

Project 2-1 User Programs

Project 2-1 User Programs Project 2-1 User Programs Prof. Jin-Soo Kim ( jinsookim@skku.edu) T.A. Sejun Kwon (sejun000@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Supporting User Programs

More information

Concurrent programming: Introduction I

Concurrent programming: Introduction I Computer Architecture course Real-Time Operating Systems Concurrent programming: Introduction I Anna Lina Ruscelli - Scuola Superiore Sant Anna Contact info Email a.ruscelli@sssup.it Computer Architecture

More information

An Empirical Performance Study of Connection Oriented Time Warp Parallel Simulation

An Empirical Performance Study of Connection Oriented Time Warp Parallel Simulation 230 The International Arab Journal of Information Technology, Vol. 6, No. 3, July 2009 An Empirical Performance Study of Connection Oriented Time Warp Parallel Simulation Ali Al-Humaimidi and Hussam Ramadan

More information

Assembly Language: Function Calls

Assembly Language: Function Calls Assembly Language: Function Calls 1 Goals of this Lecture Help you learn: Function call problems: Calling and returning Passing parameters Storing local variables Handling registers without interference

More information

2006/7/22. NTT Data Intellilink Corporation Fernando Luis Vázquez Cao. Copyright(C)2006 NTT Data Intellilink Corporation

2006/7/22. NTT Data Intellilink Corporation Fernando Luis Vázquez Cao. Copyright(C)2006 NTT Data Intellilink Corporation Evaluating Linux Kernel Crash Dumping Mechanisms 2006/7/22 NTT Data Intellilink Corporation Fernando Luis Vázquez Cao 1 Who am I? LKDTT (Linux Kernel Dump Test Tool) maintainer MKDump (Mini Kernel Dump)

More information

20-EECE-4029 Operating Systems Fall, 2015 John Franco

20-EECE-4029 Operating Systems Fall, 2015 John Franco 20-EECE-4029 Operating Systems Fall, 2015 John Franco First Exam Question 1: Barrier name: a) Describe, in general terms, what a barrier is trying to do Undo some of the optimizations that processor hardware

More information

CS341 *** TURN OFF ALL CELLPHONES *** Practice NAME

CS341 *** TURN OFF ALL CELLPHONES *** Practice NAME CS341 *** TURN OFF ALL CELLPHONES *** Practice Final Exam B. Wilson NAME OPEN BOOK / OPEN NOTES: I GIVE PARTIAL CREDIT! SHOW ALL WORK! 1. Processor Architecture (20 points) a. In a Harvard architecture

More information

administrivia today start assembly probably won t finish all these slides Assignment 4 due tomorrow any questions?

administrivia today start assembly probably won t finish all these slides Assignment 4 due tomorrow any questions? administrivia today start assembly probably won t finish all these slides Assignment 4 due tomorrow any questions? exam on Wednesday today s material not on the exam 1 Assembly Assembly is programming

More information

Introduction Presentation A

Introduction Presentation A CSE 2421/5042: Systems I Low-Level Programming and Computer Organization Introduction Presentation A Read carefully: Bryant Chapter 1 Study: Reek Chapter 2 Skim: Reek Chapter 1 08/22/2018 Gojko Babić Some

More information

CS399 New Beginnings. Jonathan Walpole

CS399 New Beginnings. Jonathan Walpole CS399 New Beginnings Jonathan Walpole Memory Management Memory Management Memory a linear array of bytes - Holds O.S. and programs (processes) - Each cell (byte) is named by a unique memory address Recall,

More information

Chapter 4 Threads, SMP, and

Chapter 4 Threads, SMP, and Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 4 Threads, SMP, and Microkernels Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Roadmap Threads: Resource ownership

More information

CS5460: Operating Systems

CS5460: Operating Systems CS5460: Operating Systems Lecture 2: OS Hardware Interface (Chapter 2) Course web page: http://www.eng.utah.edu/~cs5460/ CADE lab: WEB L224 and L226 http://www.cade.utah.edu/ Projects will be on Linux

More information

Intro to Threads. Two approaches to concurrency. Threaded multifinger: - Asynchronous I/O (lab) - Threads (today s lecture)

Intro to Threads. Two approaches to concurrency. Threaded multifinger: - Asynchronous I/O (lab) - Threads (today s lecture) Intro to Threads Two approaches to concurrency - Asynchronous I/O (lab) - Threads (today s lecture) Threaded multifinger: - Run many copies of finger simultaneously for (int i = 1; i < argc; i++) thread_create

More information

Dep. Systems Requirements

Dep. Systems Requirements Dependable Systems Dep. Systems Requirements Availability the system is ready to be used immediately. A(t) = probability system is available for use at time t MTTF/(MTTF+MTTR) If MTTR can be kept small

More information

Assembly Language: Function Calls" Goals of this Lecture"

Assembly Language: Function Calls Goals of this Lecture Assembly Language: Function Calls" 1 Goals of this Lecture" Help you learn:" Function call problems:" Calling and returning" Passing parameters" Storing local variables" Handling registers without interference"

More information