Unit Four CSCI523 Operating Systems Lecture 1)Explain the rationale behind ioctl and its associated services. a)Ioctl provides a way the user can change the behavior of a device driver by setting or clearing flags in kernel data structure that is checked by the driver when its activated. b)Sockopt provides similar services for changing the behavior of the network protocol stack. c)Fctl switches synchronous I/O calls to asynchronous calls. d)Linux /proc files can replace all of these kernel services. 2)Desribe the general format of an ioctl call. ioctl(fd, command, p1, p2, ...) fd - opened raw device in /dev/ (link to device driver) command - get or set bit, bit pattern, or data structure p1 - pointer to user's local copy p2 - optional arguments... Linux Kernel Development, 2nd ed. - Robert Love Chapter Ten - Timers and Time Management 1)List the seven step timer algorithm from most urgent to least urgent responsibility. p. 158 a)Increment the jiffy count b)If one second elapsed, update time-of-day c)Check SMP task queues and reshuffle if unbalanced d)Reschedule current task if timeslice expried e)Check for timeouts and execute callbacks f)Update user vs system time g)Update profiling if enabled for this task 2)Describe the system behavior of one second interval timer interrupt versus a one micro second interval timer interrupt on: a)user level interval resolution b)select() system service c)task sheduling latency resolution d)the audio driver e)precent of system overhead or relative time spent in kernel Support or refute the switch in Linux from a timer interval of 10 milliseconds to 1 millisecond. p. 158-161 3)The Pentium series has a microsecond time stamp counter (TSC) register. Explain how to use this register to construct a tickless OS. (hint: rename the register to "jiffies_64.") p. 162-164 4)Describe the problem and solution to using a 1 millisecond timer interval with a 32-bit jiffy counter. p. 164-165 5)Contrast the RTC, PIT, APIC, and TSC. p. 166-167