assignment_base - INTRODUCTION TO L A T E X Homework 1 Nafn...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: INTRODUCTION TO L A T E X Homework 1 Nafn Nafnsson January 24, 2012 Problem 1. Give a grammar that can be used to derive all binary strings of even length, and no other. Show how it can derive the empty string and the string 0111. Can you argue that you can derive any binary string with the stated property using your grammar? Solution. If threads are implemented in user space, the operating system does not need to support threads, since each process manages its own threads, and the OS need not know they exist. Each process can also schedule its own threads as it pleases, and does not have to rely on schedule of the OS. Kernel level threads, on the other hand, must be maintained by the OS which has to keep a thread table in the kernel, which can cause problems if there are many threads, since kernel threads can require some table space and stack space in the kernel. Switching threads in user space threads is also very cheap since the switch is done inside the process, but switching kernel space threads requires a trap, a context switch, a memory ush,...
View Full Document

Page1 / 2

assignment_base - INTRODUCTION TO L A T E X Homework 1 Nafn...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online